Skip to content

Add AWS QUERY protocol support#663

Draft
arandito wants to merge 4 commits intosmithy-lang:feat/add-query-protocolfrom
arandito:add-query-protocol
Draft

Add AWS QUERY protocol support#663
arandito wants to merge 4 commits intosmithy-lang:feat/add-query-protocolfrom
arandito:add-query-protocol

Conversation

@arandito
Copy link
Contributor

@arandito arandito commented Mar 19, 2026

Description

This PR adds awsQuery support: a new protocol generator and protocol-test projection, plus smithy-aws-core runtime client protocol support with URL form-encoded request serialization and modeled awsQueryError handling for awsQuery services.

It also includes supporting infrastructure changes: generated operation error schema registration, SigV4 protocol-test config for AWS protocol tests, and shared protocol-test handling for application/x-www-form-urlencoded bodies.

Note

This PR includes the smithy-xml package changes because those changes have not yet been merged and are currently being reviewed in PR #655. Additionally, there are many changes directly ported from the currently open AWS JSON protocol PR #645. This PR will be rebased onced the other is merged and will be marked as ready to review.

Testing

All supported protocol tests are passing. Tests in the explicit skip list remain skipped because they cover features that are not yet supported.

I was also able to generate a client for AWS STS from its Smithy service model and make a successful call:

STS test script

import asyncio

from smithy_aws_core.identity import EnvironmentCredentialsResolver

from aws_sdk_sts.client import STSClient
from aws_sdk_sts.config import Config
from aws_sdk_sts.models import GetCallerIdentityInput


async def main():
    client = STSClient(
        config=Config(
            endpoint_uri="https://sts.us-west-2.amazonaws.com",
            region="us-west-2",
            aws_credentials_identity_resolver=EnvironmentCredentialsResolver(),
        )
    )
    response = await client.get_caller_identity(GetCallerIdentityInput())

    print(response)


asyncio.run(main())

Output

> python test.py
/Users/aearanda/repos/github/smithy-python/packages/aws_sdk_signers/signers.py:794: AWSSDKWarning: Payload signing is enabled. This may result in decreased performance for large request bodies.
  warnings.warn(
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x106caa240>
GetCallerIdentityOutput(user_id='<REDACTED>', account='<REDACTED>', arn='<REDACTED>')

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@arandito arandito changed the base branch from develop to feat/add-query-protocol March 19, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant