How Do You Find if Your EC-2 Servers Are in a VPC?

Problem scenario
You want to know if your EC-2 servers are in a VPC or not. What do you do to determine if your EC-2 servers are in a VPC?

Possible Solution #1
To use the web console, see this external posting.

Possible Solution #2
This is a programmatic, character-based solution.

This assumes that you have installed the AWS CLI. If you need assistance, see this posting.

This assumes that your AWS CLI has been configured for the region that you want to query. You may need to repeat this process for each region of the EC-2 servers that you are concerned about.

Run this command:
aws ec2 describe-instances | grep -i vpc

Leave a comment

Your email address will not be published. Required fields are marked *