I want to list down all open ports for an ec2 instance using cloud custodian policy.. Is there a possible way to do this in single step
policies:
name: ec2-by-port
resource: ec2
filters:
type: security-group
match-resource: true
key: FromPort
value: 80
key: ToPort
value: 80
here is the policy file I tried, But I get all the ec2 instances instead of the instances filtered according to port openness.. Please help me with this