1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【AWS】IAM Policyめも

1
Posted at

IAMのPolicyに関する設定方法を忘れないようにめもしていきます。

S3編

参考

http://docs.aws.amazon.com/ja_jp/IAM/latest/UserGuide/access_policies_examples.html

{
    "Version": "2012-10-17",
    "Statement": [
        {
            # AWSマネージメントコンソールでS3を操作するための設定
            "Effect": "Allow",
            "Action": "s3:ListAllMyBuckets",
            "Resource": "*",
            "Condition": {
                "IpAddress": {
                    "aws:SourceIp": [
                        "【IP1】",
                        "【IP2】"
                    ]
                }
            }
        },
        {
            # ディレクトリ一覧表示をするための設定
            # Resourceにディレクトリを指定することも可能(arn:aws:s3:::【バケット名】/【ディレクトリ名】/*)
            "Effect": "Allow",
            "Action": [
                "s3:ListBucket",
                "s3:ListBucketVersions"
            ],
            "Resource": "arn:aws:s3:::【バケット名】",
            "Condition": {
                "IpAddress": {
                    "aws:SourceIp": [
                        "【IP1】",
                        "【IP2】"
                    ]
                }
            }
        },
        {
            # バケットとディレクトリに対する操作設定
            "Effect": "Allow",
            "Action": "s3:*",
            "Resource": [
                "arn:aws:s3:::【バケット名】",
                "arn:aws:s3:::【バケット名】/*"
            ],
            "Condition": {
                "IpAddress": {
                    "aws:SourceIp": [
                        "【IP1】",
                        "【IP2】"
                    ]
                }
            }
        }
    ]
}

マネージメントコンソールのバケット一覧を限定(指定したバケットのみ表示)をやりたかったのですが
方法が見つかりませんでした。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?