The market's bucket, monster-market-1mmg6ir, holds the shop's pages. Visitors need to read them. A policy is ready in ~/public.json, but it names the wrong bucket.
- Open the policy with
nano ~/public.json, and change the bucket name inResourcetomonster-market-1mmg6ir. - Attach the policy. It fails: read the error.
- The safety switch is on. Turn off the two parts that block public policies, and keep the other two on:
aws s3api put-public-access-block
Sets a bucket's four Block Public Access switches. BlockPublicPolicy and RestrictPublicBuckets stop public policies; the other two stop an older way of sharing, which you never need.
For a website, the switches are one long word, with no spaces:
aws s3api put-public-access-block --bucket dragon-photos-2026 --public-access-block-configuration BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=false,RestrictPublicBuckets=false- Attach the policy again.
Objectives
- The safety switch lets public policies through on
monster-market-1mmg6ir. - Anyone can read the objects in
monster-market-1mmg6ir, and do nothing else.