Hikaru's notes

A collection of notes and resources

View the Project on GitHub HikaruMizoe/notes

IAMポリシーのtips

各論

Conditionに書くこと

タグベースのアプローチ

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "secretsmanager:GetSecretValue",
      "Resource": "arn:aws:secretsmanager:us-east-1:123456789012:secret:MySecret-*",
      "Condition": {
        "StringEquals": {
          "aws:PrincipalTag/Department": "Engineering", // IAMユーザーとかアプリケーションにつけたタグ
          "aws:ResourceTag/Application": "web-app" // リソースタグ
        }
      }
    }
  ]
}