サービス アカウントを使用しており、で始まるユーザー アカウントに対してのみこのポリシーを実行したいと考えていますsvc_
。
以下のコードは、アクセス キーが 90 を超えるすべてのユーザー アカウントに対して機能します。
policies:
- name: iam-user-access-keys-older-than-90days
description: |
Retrieve all IAM user accounts whom have active access keys that are
older than 90days
resource: iam-user
filters:
- type: access-key
key: Status
value: Active
- type: access-key
match-operator: and
key: CreateDate
value: 90
op: greater-than
value_type: age