0
votes

Good day! i try to build packer image from JSON to AWS but I have a strange problem: Build 'amazon-ebs' errored: error validating regions: RequestError: send request failed caused by: Post https://ec2.us-east-1a.amazonaws.com/: dial tcp: lookup ec2.us-east-1a.amazonaws.com: no such host

2

2 Answers

1
votes

You are using an invalid region, replace us-east-1a with us-east-1.

us-east-1a is the name of an availability zone (AZ). Those doesn't have an API endpoint.

0
votes

linux:

run export AWS_REGION=us-east-1 on your console OR Edit /etc/environment with export AWS_REGION="us-east-1"

Windows:

run set AWS_REGION=us-east-1 on your console OR edit C:\Users\USERNAME.aws\config with [default] region = your_aws_region