hhrzc
hhrzc

Reputation: 2050

You do not have any instances in this region

I have created EC2 instance in the my office PC. It was successfully and I used it well. But when I logged to the AWS console from my home laptom - no one instance exist there and I have the error You do not have any instances in this region. I try to search instance information in other regions but do not found any.

enter image description here

How I can found my created instance or list all instances independently of region?

Upvotes: 0

Views: 557

Answers (1)

Sathyajith Bhat
Sathyajith Bhat

Reputation: 21851

Quick way would be to use combination of AWS CLI, jq and a simple Bash for loop to iterate through each region and list the instances. Be sure to set your credentials before running

for region in `aws ec2 describe-regions | jq .Regions\[\].RegionName -r`
do
    echo -e "\tRegion: ${region}"
    aws ec2 describe-instances --query "Reservations[*].Instances[*].{InstanceID:InstanceId}" --output=table --region ${region}
done

You can copy post the code in your Linux shell, or run them in AWS CloudShell which gives you an authenticated shell with aws cli preinstalled

Upvotes: 2

Related Questions