Explore Courses Blog Tutorials Interview Questions
0 votes
in AWS by (12.9k points)

I have setup a few of the amazon AWS CLI tools (EC2, Auto Scaling, MOnitoring and ELB). The tools are setup correctly and work perfectly. My environment vars are all set, the relevant ones to this Q being:

export EC2_REGION=eu-west-1

export EC2_URL=https://ec2.$

export AWS_ELB_URL=https://elasticloadbalancing.$

When I run ec2-describe-instance-status i-XXXXXXXX for ANY of my instances, I get:

Client.InvalidInstanceID.NotFound: The instance ID 'i-XXXXXXXX' does not exist

I KNOW the instance ID exists, I copied it out of the AWS web console, and it is in the eu-west-1 region, and my env vars are set to this region.

For the life of me I can't figure out why it will not find my instances. Is there anything glaringly obvious that I am doing incorrectly?

UPDATE: recreating x509 cert/pk solved this... for some reason.

1 Answer

0 votes
by (18.2k points)

Defining the region for your commands might solve your issue. The ec2-describe picks up us-west-1 region by default and you probably don’t have any instances in this region, hence the error.

You can either set your region using an environment variable, or you can configure your aws cli using the following commands:


region = eu-west-1

Learn more about AWS by going through AWS course and master this trending technology.

Related questions

0 votes
1 answer

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer

Browse Categories