I’m using Boto3 of AWS to describe the security group and trying to access the FromPort key for all the security groups available in a particular region. But when I’m trying to do so it will list some of the ports and then throws the KeyError. Code: Output: Answer Your code is assuming that the entry you are trying to
Tag: aws-sdk
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? Answer To access the subnets collection of ec2 resource,