|
| 1 | +To use the Amazon S3 console to add an access policy that allows all authenticated AWS IAM users in the |
| 2 | +corresponding AWS account to read and write to an existing S3 bucket, do the following. |
| 3 | + |
| 4 | +<Info>Your organization might have stricter bucket policy requirements. Check with your AWS account |
| 5 | + administrator if you are unsure.</Info> |
| 6 | + |
| 7 | +1. Sign in to the [AWS Management Console](https://console.aws.amazon.com/). |
| 8 | +2. Open the [Amazon S3 Console](https://console.aws.amazon.com/s3/home). |
| 9 | +3. Browse to the existing bucket and open it. |
| 10 | +4. Click the **Permissions** tab. |
| 11 | +5. In the **Bucket policy** area, click **Edit**. |
| 12 | +6. In the **Policy** text area, copy the following JSON-formatted policy. |
| 13 | + To change the following policy to restrict it to a specific user in the AWS account, change `root` to that |
| 14 | + specific username. |
| 15 | + |
| 16 | + In this policy, replace the following: |
| 17 | + |
| 18 | + - Replace `<my-account-id>` with your AWS account ID. |
| 19 | + - Replace `<my-bucket-name>` in two places with the name of your bucket. |
| 20 | + |
| 21 | + ```json |
| 22 | + { |
| 23 | + "Version": "2012-10-17", |
| 24 | + "Statement": [ |
| 25 | + { |
| 26 | + "Sid": "AllowAuthenticatedUsersInAccountReadWrite", |
| 27 | + "Effect": "Allow", |
| 28 | + "Principal": { |
| 29 | + "AWS": "arn:aws:iam::<my-account-id>:root" |
| 30 | + }, |
| 31 | + "Action": [ |
| 32 | + "s3:GetObject", |
| 33 | + "s3:PutObject", |
| 34 | + "s3:ListBucket", |
| 35 | + "s3:DeleteObject" |
| 36 | + ], |
| 37 | + "Resource": [ |
| 38 | + "arn:aws:s3:::<my-bucket-name>", |
| 39 | + "arn:aws:s3:::<my-bucket-name>/*" |
| 40 | + ], |
| 41 | + "Condition": { |
| 42 | + "StringEquals": { |
| 43 | + "aws:PrincipalType": "IAMUser" |
| 44 | + } |
| 45 | + } |
| 46 | + } |
| 47 | + ] |
| 48 | + } |
| 49 | + ``` |
| 50 | + |
| 51 | +7. Click **Save changes**. |
| 52 | + |
| 53 | + |
0 commit comments