Publish
Progress checklist
Overview
Section titled “Overview”demo.sh publish uploads a file to the Sydney primary under demo/ with
aws s3 cp, then polls Auckland until the same key shows up (CRR).
- Default: writes a small text file to a temp path, uploads it, deletes the
temp file. Key looks like
demo/see-<UTC-timestamp>.txt. - Optional argument:
./scripts/demo.sh publish /path/to/fileuploads that file instead (samedemo/see-<timestamp>.txtkey naming).
Body is plain text (Content-Type: text/plain). The key lands in
.lab-state.json as demo_key for prove.
-
Publish (generated demo object):
Terminal window export AWS_PROFILE=sandbox./scripts/demo.sh publishLab run:
upload: /tmp/... to s3://ps3a-artifacts-**ACCOUNT**-syd/demo/see-20260904T205809Z.txtwaiting for CRR to ps3a-artifacts-**ACCOUNT**-akl ...replicated: s3://ps3a-artifacts-**ACCOUNT**-akl/demo/see-20260904T205809Z.txt
Verify
Section titled “Verify”Set once:
PRIMARY="$(jq -r .primary_bucket .lab-state.json)"REPLICA="$(jq -r .replica_bucket .lab-state.json)"KEY="$(jq -r .demo_key .lab-state.json)"-
Confirm state recorded the key:
Terminal window jq '{demo_key, primary_bucket, replica_bucket}' .lab-state.json{"demo_key": "demo/see-20260904T205809Z.txt","primary_bucket": "ps3a-artifacts-**ACCOUNT**-syd","replica_bucket": "ps3a-artifacts-**ACCOUNT**-akl"} -
Head the primary object:
Terminal window aws s3api head-object --bucket "$PRIMARY" --key "$KEY" --region ap-southeast-2 \--query '{ContentLength:ContentLength,ContentType:ContentType,ReplicationStatus:ReplicationStatus}' \--output json{"ContentLength": 144,"ContentType": "text/plain","ReplicationStatus": "COMPLETED"} -
Read the primary body:
Terminal window aws s3 cp "s3://${PRIMARY}/${KEY}" - --region ap-southeast-2private-s3-artifact-store demo objectcreated_utc=20260904T205809Zprimary_bucket=ps3a-artifacts-**ACCOUNT**-sydprimary_region=ap-southeast-2 -
Head the replica object:
Terminal window aws s3api head-object --bucket "$REPLICA" --key "$KEY" --region ap-southeast-6 \--query '{ContentLength:ContentLength,ContentType:ContentType,ReplicationStatus:ReplicationStatus}' \--output json{"ContentLength": 144,"ContentType": "text/plain","ReplicationStatus": "REPLICA"} -
Read the replica body (same content):
Terminal window aws s3 cp "s3://${REPLICA}/${KEY}" - --region ap-southeast-6private-s3-artifact-store demo objectcreated_utc=20260904T205809Zprimary_bucket=ps3a-artifacts-**ACCOUNT**-sydprimary_region=ap-southeast-2 -
Replication status query used by the short check:
Terminal window aws s3api head-object --bucket "$REPLICA" --key "$KEY" \--region ap-southeast-6 --query ReplicationStatus --output textREPLICA