Skip to content

Instantly share code, notes, and snippets.

@felipekiko
Created November 5, 2020 19:19
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 felipekiko/aee6cc37f278b3b4ea8cb43fec71d3f8 to your computer and use it in GitHub Desktop.
Save felipekiko/aee6cc37f278b3b4ea8cb43fec71d3f8 to your computer and use it in GitHub Desktop.
policies:
- name: IAM-AccessKeys-Older-90-Days
comment: Checks if exists some Access Key older than 90 days
resource: aws.iam-user
filters:
- type: access-key
key: Status
value: Active
- type: access-key
match-operator: and
key: CreateDate
value_type: age
op: greater-than
value: 90
actions:
- type: notify
to:
- event-user
transport:
type: sqs
queue: YOUR-SQS-ARN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment