The shop's setup script is ready in ~/setup.sh. Look at it with cat ~/setup.sh.
- Make a security group for the shop:
New command
aws ec2 create-security-group
Makes an empty security group. Its answer holds the new group's id, GroupId.
Usageaws ec2 create-security-group --group-name name --description text
Example
aws ec2 create-security-group --group-name test-sg --description 'Test web server'
Call it shop-sg-rilzi, with the description 'Shop web server'.
- Let anyone in on port 80, with the
GroupIdfrom its answer. - Launch a
t3.microfromami-0c7217cdde317cfec, namedshop-rilzi, in that group, with~/setup.shas its user data. - When it is
running, wait a few seconds, thencurl -m 5 http://<its IP>/.
Objectives
shop-sg-rilzilets anyone in on port 80.shop-rilziserves the shop's page.