Block Device Mapping
- A block device mapping defines the block devices (instance store volumes and EBS volumes) to attach to an instance. You can specify a block device mapping as part of creating an AMI so that the mapping is used by all instances launched from the AMI. Alternatively, you can specify a block device mapping when you launch an instance, so this mapping overrides the one specified in the AMI from which you launched the instance. Note that all NVMe instance store volumes supported by an instance type are automatically enumerated and assigned a device name on instance launch; including them in your block device mapping has no effect.
- Each AMI has a block device mapping that specifies the block devices to attach to an instance when it is launched from the AMI. An AMI that Amazon provides includes a root device only. To add more block devices to an AMI, you must create your own AMI.
- You can view only Elastic Block Store volumes attached to an EC2 instance
For root can only change:
- Volume size – only increase, CAN NOT downsize
- Volume type
- 'Delete on Termination' flag
* When creating an AMI off an existing system – all data gets taken along and exists when an instance is launched off the AIM
To
add volumes to an AMI using the console:
1.
Open the Amazon EC2 console.
2.
In the navigation pane, choose Instances.
3.
Select an instance and choose Actions, Image, Create
Image.
4.
In the Create Image dialog box,
choose Add New Volume.
5.
Select a volume type from the Type list
and a device name from the Device list. For an EBS volume, you
can optionally specify a snapshot, volume size, and volume type.
6.
Choose Create Image.
No comments:
Post a Comment