#AWS #Boto3 #Python - How to Get all the Subnet Details in from All the AWS Regions

#AWS #Boto3 #Python - How to Get all the Subnet Details in from All the AWS Regions

In our previous articles we saw, How to create

  1. VPC/Subnet/IGW/Multiple Routing Table/Default Route and associating subnets in different routing tables location in different AZ. Link
  2. How to Add multiple subnets in different AZ and Routing Tables from CSV File Link

In our day 2 day operations, We may have requirement to fetch all the subnets created across reason for auditing or may be document purpose. For One account you may be happy to do it manually but for multiple account this may sound boring.. Let's have look how to make it bit interesting.


No alt text provided for this image

Here is the output once you run the script. In my free account i have limited subnets, In Your accounts you may have 100 or more subnets in each region or few regions. Adding small csv writer function can help you to write these details in CSV file.

No alt text provided for this image
No alt text provided for this image

Hope this will help. Thank you for viewing this article. If this is productive , please feel free to inbox me for the python file.


要查看或添加评论,请登录

社区洞察

其他会员也浏览了