Skip to content

Shared buckets

Progress checklist

demo.sh up-shared creates the two buckets, turns on versioning and SSE-S3, wires Syd to Akl replication for demo/, and writes IDs to .lab-state.json (gitignored).

Shared buckets from up-shared Publisher writes to a versioned encrypted S3 primary in Sydney. An IAM replication role copies the demo/ prefix to a versioned encrypted replica in Auckland. up-shared: primary + CRR + replica ap-southeast-2 (Sydney) ap-southeast-6 (Auckland) Icon-Resource/General-Resource/Res_Client_48_Light Publisher CLI / SSO Icon-Architecture/64/Arch_Amazon-Simple-Storage-Service_64 S3 primary versioning + SSE-S3 …-artifacts-…-syd bootstrap policy Icon-Resource/Storage/Res_Amazon-Simple-Storage-Service_S3-Replication_48 Replication demo/ via IAM role Icon-Architecture/64/Arch_Amazon-Simple-Storage-Service_64 S3 replica versioning + SSE-S3 …-artifacts-…-akl bootstrap policy Shared account · public access blocked · VPCE lock applied later in allowlist
  1. Create primary + replica:

    Terminal window
    export AWS_PROFILE=sandbox
    aws sts get-caller-identity
    ./scripts/demo.sh up-shared

    On success the script ends with:

    up-shared complete: ps3a-artifacts-**ACCOUNT**-syd → ps3a-artifacts-**ACCOUNT**-akl
  2. Check state:

    Terminal window
    ./scripts/demo.sh status

    Example (account id redacted):

    {
    "suffix": "20260904200753",
    "name_prefix": "ps3a",
    "primary_region": "ap-southeast-2",
    "replica_region": "ap-southeast-6",
    "demo_prefix": "demo/",
    "consumers": {},
    "primary_bucket": "ps3a-artifacts-**ACCOUNT**-syd",
    "replica_bucket": "ps3a-artifacts-**ACCOUNT**-akl",
    "crr_role_arn": "arn:aws:iam::**ACCOUNT**:role/ps3a-crr-20260904200753",
    "bypass_principal_arn": "arn:aws:iam::**ACCOUNT**:role/aws-reserved/sso.amazonaws.com/ap-southeast-2/AWSReservedSSO_…"
    }
Terminal window
aws s3api head-bucket --bucket "$(jq -r .primary_bucket .lab-state.json)" --region ap-southeast-2
aws s3api head-bucket --bucket "$(jq -r .replica_bucket .lab-state.json)" --region ap-southeast-6
aws s3api get-bucket-versioning --bucket "$(jq -r .primary_bucket .lab-state.json)" --region ap-southeast-2
aws s3api get-bucket-replication --bucket "$(jq -r .primary_bucket .lab-state.json)" --region ap-southeast-2

Expected shape (redacted):

# head-bucket (each Region)
BucketRegion: ap-southeast-2 | ap-southeast-6
# versioning
{ "Status": "Enabled" }
# replication
Rule ID demo-to-akl, Prefix demo/, Destination …-akl, Status Enabled

Both buckets also get SSE-S3 (AES256), public access block, and a bootstrap bucket policy that allows your SSO role plus the CRR role (VPCE lock comes in allowlist).

Consumer