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

ec2..amazonaws.com: no such host #2437

Closed
Horiodino opened this issue Dec 26, 2023 · 4 comments
Closed

ec2..amazonaws.com: no such host #2437

Horiodino opened this issue Dec 26, 2023 · 4 comments
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@Horiodino
Copy link

Describe the bug

I was working on an issue and using aws-sdk-go-v2, I was using Linux previously and everything working fine but now I shifted to windows and getting this error message:

https response error StatusCode: 0, RequestID  request send failed, Post https://ec2..amazonaws.com: dial tcp: lookup ec2..amazo

Expected Behavior

should accept Api calls.

Current Behavior

returns http error code 0

Reproduction Steps

use windows-10 and try to access list of Aws-regions.

Possible Solution

may be the https://ec2..amazonaws.com should be using one . and then everything works!

Additional Information/Context

No response

SDK version used

aws-sdk-go-v2

Environment details (Version of Go (go version)? OS name and version, etc.)

windows-10

@Horiodino Horiodino added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Dec 26, 2023
@lucix-aws lucix-aws transferred this issue from aws/aws-sdk-go Dec 26, 2023
@matthewkmayer
Copy link

I'm seeing a similar error with the S3 download manager.

        getObjReq := s3.GetObjectInput{
		Bucket: aws.String(bucket),
		Key:    aws.String(key),
	}

	_, err = downloader.Download(ctx, fd, &getObjReq)
	if err != nil {
		log.Infof(ctx, "Couldn't download file: %v", err.Error())
		return err
	}
Couldn't download file: operation error S3: GetObject, https response error StatusCode: 0, RequestID: , HostID: , request send failed, 
Get "https://s3/..amazonaws.com/(snip)image.bin?x-id=GetObject": dial tcp: lookup s3..amazonaws.com: no such host

Using:

github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.9

github.com/aws/aws-sdk-go-v2/service/s3 v1.47.7

This is in a Go binary in a Docker container from a scratch image running on ECS.

@Horiodino
Copy link
Author

I'm seeing a similar error with the S3 download manager.

        getObjReq := s3.GetObjectInput{
		Bucket: aws.String(bucket),
		Key:    aws.String(key),
	}

	_, err = downloader.Download(ctx, fd, &getObjReq)
	if err != nil {
		log.Infof(ctx, "Couldn't download file: %v", err.Error())
		return err
	}
Couldn't download file: operation error S3: GetObject, https response error StatusCode: 0, RequestID: , HostID: , request send failed, 
Get "https://s3/..amazonaws.com/(snip)image.bin?x-id=GetObject": dial tcp: lookup s3..amazonaws.com: no such host

Using:

github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.9

github.com/aws/aws-sdk-go-v2/service/s3 v1.47.7

This is in a Go binary in a Docker container from a scratch image running on ECS.

you find any solution? or its due to aws!

@matthewkmayer
Copy link

@Horiodino in my case the AWS_REGION environment variable wasn't set on the running container. I proved this by going from

awsConfig, err := config.LoadDefaultConfig(ctx)

to

awsConfig, err := config.LoadDefaultConfig(ctx, config.WithRegion("us-east-1"))

And the request was able to be sent.

Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants