Upgrade to Pro — share decks privately, control downloads, hide ads and more …

バケットポリシーの記述を誤りマネコンからS3バケットを操作できなくなりそうになり、ルートアクセ...

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.

 バケットポリシーの記述を誤りマネコンからS3バケットを操作できなくなりそうになり、ルートアクセス管理を有効にしたおひとり様Organizationsの話

2026/4/10 AWS Community Builders Night #3 登壇資料

Avatar for amarelo_n24

amarelo_n24

April 10, 2026

More Decks by amarelo_n24

Other Decks in Education

Transcript

  1. 自己紹介 藤田 直幸 X:@amarelo_n24  ・AWS Community Builders(Security)  ・JAWS-UG 彩の国埼玉支部 運営  ・コーヒー焙煎人兼エンジニア

    ・おひとり様BuilderCards Player 好きなAWSサービス:IAM、S3、Organizations 好きなこと:コーヒー豆の焙煎
  2. 特定のVPCエンドポイントを経由した場合にオブジェクトの参照と格納を許可する 適用したS3バケットポリシー { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow",

    "Principal": "*", "Action": [ "s3:GetObject", "s3:ListBucket", "s3:PutObject" ], "Resource": [ "arn:aws:s3:::bucket-name", "arn:aws:s3:::bucket-name/*" ], "Condition": { "StringEquals": { "aws:sourceVpce": "vpce-xxxxxxxxx" } } }, { "Effect": "Deny", "Principal": "*", "Action": "s3:*", "Resource": [ "arn:aws:s3:::bucket-name", "arn:aws:s3:::bucket-name/*" ], "Condition": { "StringNotEquals": { "aws:sourceVpce": "vpce-xxxxxxxxx" } } } ] }
  3. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": "*",

    "Action": [ "s3:GetObject", "s3:ListBucket", "s3:PutObject" ], "Resource": [ "arn:aws:s3:::bucket-name", "arn:aws:s3:::bucket-name/*" ], "Condition": { "StringEquals": { "aws:sourceVpce": "vpce-xxxxxxxxx" } } }, ・ルートユーザでログイン後にバケットポリシーを削除。 ・バケットポリシーを編集。 { "Effect": "Deny", "Principal": "*", "Action": "s3:*", "Resource": [ "arn:aws:s3:::bucket-name", "arn:aws:s3:::bucket-name/*" ], "Condition": { "StringNotLike": { "aws:userId": "XXXXXXXXXXXXXXXXXXX:*" }, "StringNotEquals": { "aws:sourceVpce": "vpce-xxxxxxxxx" } } } ] } 復旧方法 以下のいずれかに合致しないアクセ スを拒否 ・特定のVPCエンドポイント経由 ・特定のIAMロール