Add new AWS exercises and questions

SSIA :)
This commit is contained in:
abregman
2021-11-18 10:36:41 +02:00
parent 6464994b4c
commit 430fc77733
8 changed files with 352 additions and 16 deletions

View File

@ -0,0 +1,20 @@
## EC2 - Create an AMI
### Requirements
One running EC2 instance
### Objectives
1. Make some changes in the operating system of your instance (create files, modify files, ...)
2. Create an AMI image from running EC2 instance
3. Launch a new instance using the custom AMI you've created
### Solution
1. Connect to your EC2 instance (ssh, console, ...)
2. Make some changes in the operating system
3. Go to EC2 service
4. Right click on the instance where you made some changes -> Image and templates -> Create image
5. Give the image a name and click on "Create image"
6. Launch new instance and choose the image you've just created

View File

@ -0,0 +1,29 @@
## AWS EC2 - EBS Volume Creation
### Requirements
One EC2 instance that you can get rid of :)
### Objectives
1. Create a volume in the same AZ as your instance, with the following properties:
1. gp2 volume type
2. 4 GiB size
2. Once created, attach it to your EC2 instance
3. Remove your EC2 instance. What happened to the EBS volumes attached to the EC2 instance?
### Solution
1. Go to EC2 service
2. Click on "Volumes" under "Elastic Block Store"
3. Click on "Create Volume"
4. Select the following properties
1. gp2 volume type
2. 4 GiB size
3. The same AZ as your instance
5. Click on "Create volume"
6. Right click on the volume you've just created -> attach volume -> choose your EC2 instance and click on "Attach"
7. Terminate your instance
8. The default EBS volume (created when you launched the instance for the first time) will be deleted (unless you didn't check "Delete on termination"), but the volume you've created as part of this exercise, will remain
Note: don't forget to remove the EBS volume you've created in this exercise

View File

@ -0,0 +1,25 @@
## AWS EC2 - Hibernate an Instance
### Objectives
1. Create an instance that supports hibernation
2. Hibernate the instance
3. Start the instance
4. What way is there to prove that instance was hibernated from OS perspective?
### Solution
1. Create an instance that supports hibernation
1. Go to EC2 service
2. Go to instances and create an instance
3. In "Configure instance" make sure to check "Enable hibernation as an additional stop behavior"
4. In "Add storage", make sure to encrypt EBS and make sure the size > instance RAM size (because hibernation saves the RAM state)
5. Review and Launch
2. Hibernate the instance
1. Go to the instance page
2. Click on "Instance state" -> "Hibernate instance" -> Hibernate
3. Instance state -> Start
4. Run the "uptime" command, which will display the amount of time the system was up

View File

@ -0,0 +1,33 @@
## AWS EC2 - EBS Snapshots
### Requirements
EBS Volume
### Objectives
A. Create a snapshot of an EBS volume
B. Verify the snapshot was created
C. Move the data to another region
D. Create a volume out of it in a different AZ
### Solution
A.
1. Go to EC2 service
2. Click on "Volumes" under "Elastic Block Store"
3. Right click on the chosen volume -> Create snapshot
4. Insert a description and click on "Create Snapshot"
B.
1. Click on "Snapshots" under "Elastic Block Store"
2. You should see the snapshot you've created
C.
1. Select the snapshot and click on Actions -> Copy
2. Select a region to where the snapshot will be copied
D.
1. Select the snapshot and click on Actions -> Create volume
2. Choose a different AZ
3. Click on "Create Volume"