-
Notifications
You must be signed in to change notification settings - Fork 638
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
dial tcp: lookup sqs..amazonaws.com: no such host #2472
Comments
After running go get github.com/aws/aws-sdk-go-v2@v1.24.0, it works well.
Even my EC2 instance and SQS service are in "us east-1" |
Hi @ChevalierTieto , You must specify a region in your config because the SDK does not "know" where your resources live. The SDK's job is to take in various inputs, like your credentials, the region, and input for the actual operation, form the correct URL and sign the request based on what the Service API requires. Region must be provided like any other input like queue name. Let me know if you have any other question. |
Hi @RanVaknin |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
Running SQS code to receive messages on my EC2 instance encountered an exception.
Expected Behavior
DNS resolution issue
I am testing DNS resolution on the EC2 instance, whether it is "nslookup sqs. us east-1. amazonaws. com" or "dig" https://sqs.us-east-1.amazonaws.com It's all normal.
i update all modules under aws-sdk-go-v2 (including indirects)
Current Behavior
The error message is as follows
Reproduction Steps
I have tried not specifying a region, but still encountered an error because my EC2 instance and SQS service are both in "us east-1" region
However, if i make some changes to the code and log in and run it as SSO on the local machine without changing the version dependency, it can run normally
Possible Solution
Region parsing may have issues
Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
My go version and related dependencies are as follows
Compiler and Version used
go1.20.4 linux/amd64
Operating System and version
Ubuntu 22.04.3 LTS
The text was updated successfully, but these errors were encountered: