Skip to content

Instantly share code, notes, and snippets.

@kapilt
Created August 29, 2016 22:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kapilt/972bf118898dc31eb7100e1bb4860e06 to your computer and use it in GitHub Desktop.
Save kapilt/972bf118898dc31eb7100e1bb4860e06 to your computer and use it in GitHub Desktop.
policies:
- resource: eni
name: all-nics
- resource: eni
description: Amazon ELB
name: elb-nics
filters:
- RequesterManaged: true
- "Attachment.InstanceOwnerId": "amazon-elb"
- resource: eni
name: rds-nics
filters:
- RequesterManaged: true
- "Attachment.InstanceOwnerId": "amazon-rds"
- resource: eni
name: cache-nics
filters:
- RequesterManaged: true
- "Attachment.InstanceOwnerId": "amazon-elasticache"
- resource: eni
name: nat-nics
filters:
- RequesterManaged: true
- "Attachment.InstanceOwnerId": "amazon-aws"
- resource: eni
name: redshift-nics
filters:
- RequesterManaged: true
- "Attachment.InstanceOwnerId": "amazon-redshift"
- resource: eni
name: amazon-unattached
filters:
- RequesterManaged: true
- Attachment: absent
- type: value
key: "Attachment.InstanceOwnerId"
op: not-in
value:
- "amazon-rds"
- "amazon-elb"
- "amazon-elasticache"
- "amazon-aws" # primarily nat gateway afaics
- "amazon-redshift"
- resource: eni
name: amazon-nics
filters:
- RequesterManaged: true
- type: value
key: "Attachment.InstanceOwnerId"
op: not-in
value:
- "amazon-rds"
- "amazon-elb"
- "amazon-elasticache"
- "amazon-aws" # primarily nat gateway afaics
- "amazon-redshift"
- resource: lambda
name: vpc-lambdas
filters:
- VpcConfig: not-null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment