ユーザーポリシーの例 - Amazon Simple Storage Service
{
"Version":"2012-10-17",
"Statement":[
{
"Effect":"Allow",
"Action":[
"s3:PutObject",
"s3:GetObject",
"s3:GetObjectVersion",
"s3:DeleteObject",
"s3:DeleteObjectVersion"
],
"Resource":"arn:aws:s3:::awsexamplebucket1/Alice/*"
}
]
}
AWSではセキュリティ保全に関するベストプラクティスとして”最小限の権限設定” [1] を推奨しております
特定のS3バケットにファイルのアップロードや更新等の作業を行うユースケースでございましたら、FullAccessではない権限設定でお客様のご要望を満たせる可能性があるかと存じます。
◆ 参考ドキュメント
[1] IAM でのセキュリティのベストプラクティス - 最小限の特権を認める
https://docs.aws.amazon.com/ja_jp/IAM/latest/UserGuide/best-practices.html#grant-least-privilege
[2] ユーザーポリシーの例 - バケット の 1 つへのアクセスを IAM ユーザーに許可する
https://docs.aws.amazon.com/ja_jp/AmazonS3/latest/userguide/example-policies-s3.html#iam-policy-ex0
[3] AWS managed policies for Amazon S3 - AWS managed policy: AmazonS3FullAccess
https://docs.aws.amazon.com/AmazonS3/latest/userguide/security-iam-awsmanpol.html#security-iam-awsmanpol-amazons3fullaccess
[4] IAM JSON ポリシーの要素: Action
https://docs.aws.amazon.com/ja_jp/IAM/latest/UserGuide/reference_policies_elements_action.html
[5] Amazon S3 のアクション、リソース、条件キー
https://docs.aws.amazon.com/ja_jp/service-authorization/latest/reference/list_amazons3.html
[6] Amazon S3 Object Lambda のアクション、リソース、条件キー
https://docs.aws.amazon.com/ja_jp/service-authorization/latest/reference/list_amazons3objectlambda.html