Skip to content
Advertisement

aws boto3 grab subnet info

Im trying to grab a list of subnets from aws, I have a working version for VPC that I have modified:

JavaScript

I keep getting:

subnets = list(ec2.Subnet.filters(Filters=filters)) AttributeError: ‘function’ object has no attribute ‘filters’

From everything im reading and other examples this should work

Any ideas?

Advertisement

Answer

To access the subnets collection of ec2 resource,

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement