A hands-on storage lab in fourteen slides, in the console and the CLI: check the project's VPC and role, and launch two web servers in two AZs; create the EFS file system project-efs, mount it on both servers through Session Manager and share a file between them; snapshot a root volume and copy it to us-west-2; build project-web-ami from the web server and launch a server from it; then clean up, keeping the AMI for session 6.
The slides
The tool is a hands-on lab in fourteen slides, one step each, with the steps to follow beside a terminal and a picture
of the VPC's two AZs, the web servers, the file system, the snapshots and the AMI:
- Introduction: what the lab makes.
- 1. What the lab needs
- Check the project's VPC: its four subnets and the NAT gateway, and how to rebuild them.
- Check the role and the security group:
project-web-role for Session Manager, project-web-sg for HTTP. - Launch two web servers:
project-web in private-a from the console, project-web-b in private-b from the CLI.
- 2. One file system in two AZs
- Create the file system's security group:
project-efs-sg, NFS from the web servers. - Create the file system:
project-efs, a mount target in each AZ. - Mount the file system on project-web:
amazon-efs-utils, TLS, a file written. - Mount it on project-web-b: the same file read in the other AZ.
- 3. A snapshot in two Regions
- Take a snapshot of the root volume:
project-web-root. - Copy the snapshot to us-west-2: a new ID in the other Region.
- 4. The web server's AMI
- Build project-web-ami: from the configured server.
- Launch a server from the AMI: the page with no user data.
- 5. Clean up
- Terminate the servers and delete the file system.
- Clean up: the snapshots and the NAT gateway; the AMI stays for session 6.
The buttons on the left and right edges move between slides. So do the arrow keys and a swipe.
The lab uses the VPC of session 4's lab and the role of session 3's second lab, and says how to rebuild them. The slides
Block, File and Hybrid Storage explain what it uses.
The placeholders
The instance, volume, snapshot, file system and AMI IDs are AWS's documentation placeholders (i-1234567890abcdef0,
fs-1234567890abcdef0), and the addresses come from project-vpc's private subnets, 10.0.10.0/24 and 10.0.11.0/24.
The lab has not yet been run in a real account: the outputs follow the CLI's service model and AWS's guides.
Sources