aws s3api get-public-access-block --bucket
aws s3api get-public-access-block --bucket <bucket>
Risk: Safe
What it does
Shows the four Block Public Access locks of a bucket.
When to use it
To make sure nothing can go public. All four should say true.
Example
$ aws s3api get-public-access-block --bucket amzn-s3-demo-bucketRead the four locks.
$ aws s3api put-public-access-block --bucket amzn-s3-demo-bucket --public-access-block-configuration "BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true"Turn all four locks on.
Learn it in: S3 buckets and Block Public Access · Official docs