When I log into my aws console I see the vpc id as "vpc-6856c210" however on my server through the aws cli I see "vpc-82fe07e9"
When I try to run a terraform script I get an error if i use 'vpc-6856c210' saying the VPC does not exist.
If I run the script using the 'vpc-82fe07e9' id it will run and I can see the instances in the cli however not the console.
Shouldn't they match? I am new to AWS and on the free tier
There are two possibilities:
Your cli is set to a different region than the console. Make sure that the console shows Ohio (aka
us-east-2
) in the top-right corner and also run the cli asaws --region us-east-2 ec2 ...
to make it explicit.Your cli credentials are for a different account. Try
aws sts get-caller-identity
and make sure that the output is what you expect, you can check that the account number there matches the one is console.Hope that helps :)