-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API Gateway request dropping stage from endpoint #1191
Comments
Thanks for reporting this issue @laverboy. It looks like the SDK's behavior of parsing the endpoint URL is stripping out the path. The SDK parsing of endpoint URL to not drop the query Path will need to be investigated to fix this issue. |
I just stumbled across this issue too, is there a workaround for the mean time? |
found the bug in func (m *awsRestjson1_serializeOpGetConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) {
...
opPath, opQuery := httpbinding.SplitURI("/@connections/{ConnectionId}")
// SHOULD BE request.URL.Path + opPath
// otherwise this will override the current path (containing the stage)
request.URL.Path = opPath
...
} Now, if only I knew how this was file auto generated... |
Thanks for the additional information. We created PR #1199 to address this issue. We're researching if this is the correct fix for the SDK, or if alternative solution is needed. In the mean time you can Update your application to depend on this change to see if it addresses the issue you're running into. go get -d github.com/aws/[email protected]
go get -d github.com/aws/aws-sdk-go-v2/service/[email protected] Updated the above command with the latest version of the hashes. |
It's working now! 👍 |
Thanks for the update @youjinp, let us know if you have any additional issues, or feedback. We'll get this fixed merged in and released once we've reviewed it. |
Can I ask how long that might take - thanks |
Updates the Smithy SDK client httpbinding serializers to use the JoinPath and JoinRawQuery utilities to ensure paths and query are joined correctly. Related to # aws/aws-sdk-go-v2#1191
Fixes the API clients to not ignore the resolved endpoint's URL Path and RawQuery parameters. Instead of ignoring the values the SDK will append the operation's modeled Path and Query String. Fixes #1191 Depends on aws/smithy-go#280
|
Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the bug
When using a required custom resolver with apigatewaymanagmentapi service it appears that the stage is being dropped from the url used.
Version of AWS SDK for Go?
v1.2.1
Version of Go (
go version
)?1.15
To Reproduce (observed behavior)
We are using the following custom resolver
And we are making the request like so:
See logs below
Expected behavior
We are expecting to get a successful response from the api.
Additional context
We are seeing the following error logs, it appears that the url no longer includes LATEST which is the name of our stage
The documentation here https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-how-to-call-websocket-api-connections.html clearly shows that the stage is a required element of the url. If we miss it out from cli usage we see the same error as above.
It looks this is a regression since v0.24, as our code using that version works fine.
The text was updated successfully, but these errors were encountered: