The market moves from a bucket to a server. Build it end to end; the script is in ~/web.sh and the EC2 trust document in ~/ec2-trust.json.
- A security group
market-web-1w8y8f6that allows TCP 80 from anywhere and nothing else inbound. - A role
market-ssm-1w8y8f6trusted by EC2 withAmazonSSMManagedInstanceCore, in an instance profile of the same name. - A
t3.micronamedmarket-web-1w8y8f6from the current Amazon Linux 2023 image, launched with that group, that profile andweb.shas user data. - An Elastic IP associated with it, and termination protection on.
- The page answering with the Monster Market heading on the Elastic IP.
sh
curl -s http://<elastic ip>/
aws ssm start-session --target <id>Finish from inside the instance: read its own instance id from the metadata service with a token.