0 votes
1 view
in AWS by (8.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.$EC2_REGION.amazonaws.com

export AWS_ELB_URL=https://elasticloadbalancing.$EC2_REGION.amazonaws.com

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.5k 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.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !