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:

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?


To access the subnets collection of ec2 resource,

Leave a Reply