Too many VPC's in my account

0

I have more than 10 VPC in my account. Is there any smart way I could figure out which VPC's are in use and which are not or not linked to any resource?

1 個回答
0

An AWS CLI command like this would describe every instance that has a network interface in the VPC (this would be a pretty good indicator that the service is active):

aws ec2 describe-network-interfaces --filters Name=vpc-id,Values=vpc-12345678910abcdef

If this is too verbose you could filter this with -query 'NetworkInterfaces[*].[RequesterId,Description]'

This is one of several good suggestions from https://stackoverflow.com/questions/61997608/how-can-i-list-all-resources-that-belongs-to-a-certain-vpc

profile picture
專家
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南