Skip to content
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

"Bad Request - Action: " with GoLang github.com/aws/aws-sdk-go-v2/service/sqs v1.28.0 #281

Closed
keithMqG opened this issue Nov 15, 2023 · 6 comments

Comments

@keithMqG
Copy link

Attempting to use GetQueueUrl with GoLang github.com/aws/aws-sdk-go-v2/service/sqs v1.28.0 causes Bad Request.

Works fine with v1.24.7.

Needs further investigation.

@gitaugakwa
Copy link

Getting the same with a local build from 42f5c2d commit.

Using both the postman collection and the was cli

@gitaugakwa
Copy link

gitaugakwa commented Nov 22, 2023

My bad, I wasn't sending the appropriate body using the collection.

Works with the postman but the cli doesn't work with a command like
aws --endpoint-url http://localhost:4100 --profile Profile --region eu-west-1 sqs list-queues

Env: aws-cli/2.13.38 Python/3.11.6 Windows/10 exe/AMD64 prompt/off

@jrhy
Copy link

jrhy commented Nov 28, 2023

I see a similar response after upgrading from github.com/aws/aws-sdk-go from v1.45.28 to v1.48.6. It could be because the SDK request format has changed, and no longer uses Content-Type: application/x-www-form-urlencoded, but Content-Type: application/x-amz-json-1.0, like:

POST / HTTP/1.1
Host: 127.0.0.1:9324
Accept-Encoding: zstd,gzip
Content-Type: application/x-amz-json-1.0
X-Amz-Date: 20231128T222049Z
X-Amz-Target: AmazonSQS.GetQueueUrl

{"QueueName":"myqueue"}

@jrhy
Copy link

jrhy commented Nov 28, 2023

The AWS SDK for Go began supporting JSON requests for SQS in v1.47.7, and AWS SDK for Go v2 in v1.28.0, according to https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-json-faqs.html .

@iamed2
Copy link

iamed2 commented Jan 25, 2024

AWS changed the service definition in-place for SQS without a version change, switching it from Query to JSON. Most SDKs will not be set up to handle both versions; either they are custom-written (rare) and will continue using the Query protocol, or they are auto-generated and will switch to the JSON protocol when regenerated from recent specs. I haven't yet seen an SDK that supports the JSON protocol for SQS but allows forcing the Query protocol.

Likely there is a significant portion of users in both camps right now.

@Admiral-Piett
Copy link
Owner

I think this is a duplicate of #279 we are working on implementing JSON processing as quickly as we can. Though the work is significant, and I only have so much time. 🙂

There's a feature branch in that issue with the work in progress if anyone would like to track and/or contribute.

Closing as a duplicate.

@Admiral-Piett Admiral-Piett closed this as not planned Won't fix, can't repro, duplicate, stale Jan 26, 2024
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

No branches or pull requests

5 participants