The shop's server, shop-18d0v7t, must show today's menu, which is in S3: s3://monster-market-18d0v7t/menu.html. The role shop-role-18d0v7t can read S3 and talk to Session Manager. Its instance profile has the same name.
- Find the server's id, then give it the instance profile
shop-role-18d0v7t. - Open a shell on the server:
New command
aws ssm start-session
Opens a shell on an instance through Session Manager. Commands you type now run on the server, until you type exit.
Usageaws ssm start-session --target instance-id
Example
aws ssm start-session --target i-0f3c9a71e2b84d605
- On the server, copy the menu from S3 into the website's folder. That folder belongs to root, so put
sudoin front:
sh
sudo aws s3 cp s3://monster-market-18d0v7t/menu.html /var/www/html/menu.htmlThe server has no keys: the aws command on it uses the role.
- Type
exitto come back to CloudShell.
Objectives
shop-18d0v7twears the roleshop-role-18d0v7t.- The website shows the menu at
/menu.html.