2

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

enter image description here

enter image description here

enter image description here

James Connigan
  • 137
  • 2
  • 13

1 Answers1

1

There are two possibilities:

  1. 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 as aws --region us-east-2 ec2 ... to make it explicit.

  2. 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 :)

MLu
  • 24,849
  • 5
  • 59
  • 86