Enable all four bucket public access block settings.
Section: S3API Bucket Commands
Block public access
bash
bash
aws s3api put-public-access-block --bucket my-bucket --public-access-block-configuration BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=trueExplanation
Common baseline security setting for private buckets.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing S3API Bucket Commands