Last active
June 27, 2019 22:52
-
-
Save akloya/8e19fb58f1f168dfb92d86684cc83a15 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
ec2 = boto3.client("ec2") | |
ec2_resource = boto3.resource('ec2') | |
for vpc in ec2.describe_vpcs()['Vpcs']: | |
vpc = ec2_resource.Vpc(vpc['VpcId']) | |
network_acl_iterator = vpc.network_acls.all() | |
for i in network_acl_iterator: | |
response = ec2.describe_network_acls( | |
NetworkAclIds=[ | |
i.id | |
] | |
) | |
for acls in response['NetworkAcls']: | |
print(acls) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment