Skip to content

Commit

Permalink
docs(awscli): ✨ Add listbucket permissions to the example
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisguest75 committed May 7, 2024
1 parent f70b905 commit b6ff97c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion 33_awscli/S3.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,9 @@ done

## Create Public Bucket

NOTE: Before creating a public bucket take a moment to understand what you are doing.

```sh
# TODO: This fails - you need allow public access first before setting this.
export BUCKET_NAME=mybucket
aws s3 mb s3://${BUCKET_NAME}

Expand All @@ -247,6 +248,12 @@ cat <<- EOF > ${TEMPFILE}
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::${BUCKET_NAME}/*"
},
{
"Effect": "Allow",
"Principal": "*",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::${BUCKET_NAME}"
}
]
}
Expand Down

0 comments on commit b6ff97c

Please sign in to comment.