Skip to content

CLI walkthrough

Progress checklist

Work the pages in order. Each page shows the AWS CLI first, then the matching scripts/demo.sh subcommand. The script echoes every command before it runs — it teaches, it does not hide.

  1. Install tooling — AWS CLI ≥ 2.15.0 (latest fine)
  2. Prerequisites — account, profile, Region, Express AZ
  3. Architecture — what you are building
  4. Then the walkthrough pages below

Every resource name includes a short unique suffix so down only touches this lab run.

ItemValue
Env varLAB_SUFFIX
Used in namess3x-hotlookup-${LAB_SUFFIX}-…, directory bucket s3x-hotlookup-${LAB_SUFFIX}--apse2-az1--x-s3
If unset for demo.sh upAuto-set to $(date +%Y%m%d%H%M%S) and stored in .lab-state.json
Manual CLI pagesYou must export it yourself before copying commands
Terminal window
export AWS_PROFILE=sandbox
export AWS_REGION=ap-southeast-2
# pick one durable value for this run, or generate:
export LAB_SUFFIX=$(date +%Y%m%d%H%M%S)
# example result: 20260920105100

In code samples, $LAB_SUFFIX is that value — not the literal string SUFFIX.

Terminal window
export AWS_PROFILE=sandbox
export AWS_REGION=ap-southeast-2
# optional — omit to let up generate one:
# export LAB_SUFFIX=$(date +%Y%m%d%H%M%S)
./scripts/image.sh up # once: ECR + CodeBuild (durable)
./scripts/image.sh build # push s3x-hotlookup-harness:tag
./scripts/demo.sh up # VPC, endpoints, buckets, IAM, EC2 (pulls image)
./scripts/demo.sh status # read-only
./scripts/demo.sh seed # put bakeoff keys into both buckets
./scripts/demo.sh harness # how to rebuild image / re-pull
./scripts/demo.sh dash # print public dashboard URL (:8080)
./scripts/demo.sh port-forward # SSM tunnel → http://127.0.0.1:8080/
./scripts/demo.sh down # type LAB_SUFFIX — lab resources
./scripts/image.sh down # type s3x-hotlookup-harness — remove everything else
SubcommandMutates?Notes
image.sh upyesDurable ECR + CodeBuild; not removed by demo.sh down
image.sh buildyesCodeBuild → ECR push
demo.sh upyesSets LAB_SUFFIX if missing; pulls harness from ECR; writes .lab-state.json
demo.sh statusnoSafe any time
demo.sh seedyesWrites identical hot keys to Express + Standard
demo.sh harnessnoPrints rebuild / re-pull guidance
demo.sh dashnoPrints the public dashboard URL on port 8080
demo.sh port-forwardnoSSM port-forward to http://127.0.0.1:8080/ (needs Session Manager plugin)
demo.sh downyesConfirms by typing the stored LAB_SUFFIX (lab only)
image.sh downyesConfirms by typing s3x-hotlookup-harness — required to remove everything
ConventionValue
ProfileAWS_PROFILE=sandbox
SuffixLAB_SUFFIX (timestamp or your choice)
Name prefixs3x-hotlookup-${LAB_SUFFIX}-…
TagProject=s3-express-hot-lookup-walkthrough
Default Regionap-southeast-2
Express AZ IDapse2-az1
AWS CLIMinimum 2.15.0 (latest v2 recommended)
Mutation guardS3X_LAB_ALLOW_AWS=1
Local artifacts.lab/ (gitignored)
Lab state.lab-state.json (gitignored) — written by demo.sh
Image state.image-state.json (gitignored) — written by image.sh
ECR repos3x-hotlookup-harness