Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

See all AWS resources in/linked to a VPC

I am looking at a VPC in AWS that I am considering to clean up. However, I am struggling to find out what is inside/how it is used.

Is there a way to view all resources 'inside' or 'linked to' this VPC?

Ideally I would use the AWS console, but if needed I can work via the CLI as well. I browsed around a bit, but did not find a place to identify relevant resources.


I am aware that I can go to individual resource types (e.g. EC2 instances) to find the ones that are linked to the VPC, but have no way to know which resource types are possibly used, there could be numerous kinds of resources in this VPC as far as I know.

like image 318
Dennis Jaheruddin Avatar asked Nov 01 '20 14:11

Dennis Jaheruddin


People also ask

How do you find all resources attached to a VPC?

You can use AWS CLI to list all ENIs associated with the VPC and prettify the output using the --query parameter to get a resource list with the desired fields (AZ, instance-id, etc.).

Is there a way to list all resources in AWS?

Yes. Use the Tag Editor. Set "Regions" to "All Regions", "Resource Types" to "All supported resource types" and then click on "Search Resources".


1 Answers

Unfortunately at this time there is no functionality to list all resources in a VPC at the moment. Generally any networking resources that reside within your VPC will have an ENI attached.

By accessing the list of elastic network interfaces you would then need to identify the applications that are bound to that ENI, some services will prefill the description with a reference to the service or resource in question. If no description exists to identify what service you will need to do this investigation yourself.

Outside of this certain resources are associated with your VPC such as internet gateway, security groups and VPNs. These will need to be identified by resource.

like image 63
Chris Williams Avatar answered Oct 17 '22 12:10

Chris Williams