Amazon Machine Image (AMI) Flashcards
What are AMIs?
Images of EC2 instances that can launch more EC2 instance.
Are AMIs regional, global or AZ based?
AMIs are regional with a unique ID.
What kind of permissions can you find in an AMI?
- Default only your account can use it.
- Can be set to be public.
- Can have specific AWS accounts on the AMI.
What is a common use of AMIs?
Can create an AMI from an existing EC2 instance to capture the current config (baking).
Describe the lifecycle of AMIs:
- Launch: EBS volumes are attached to EC2 devices using block IDs.
- Configure: customize the instance from applications or volume sizes.
- Create Image or AMI
- Launch: When launching an instance, the snapshots are used to create new EBS volumes in the AZ of the EC2 instance and contain the same block device mapping.
What do AMIs contain?
- Permissions: who can use it, is it public or private
- EBS snapshots are created from attached EBS volumes
How are Snapshots referenced inside the AMI?
using block device mapping.
What is a block device mapping?
Table of data that links the snapshot IDs that you’ve just created when making that AMI and it has for each one of those snapshots, a device ID that the original volumes had on the EC2 instance.
If you create an AMI in a region, can this be used in a different region?
No, AMIs are regional.
What is AMI baking?
creating an AMI from a configuration instance, with packages installed, etc.
Can you edit an AMI?
An AMI cannot be edited. If you need to update an AMI, launch an instance, make changes, then make new AMI
We said that AMIs are regional, what can you do to use an AMI in another region?
AMIs can be copied between regions
What is the default permission attached to AMIs?
Only access to your account.
Based on what are AMIs billed?
Billing is for the storage capacity for the EBS snapshots the AMI references.
Is it recommendable to create AMIs from instances that are running? and why?
No, it is recommendable to create an AMI from instances that are stopped, so all the data is written to the EBS volumes.