Data Management in EC2

EC2 instances do not store data in the same way as physical servers. It is vital to understand how data storage works in your instances to manage your data efficiently and keep it as safe as possible.

Storage Locations

Data storage resources are made available to your instances as standard Linux partitions. These partitions are virtual disk drives that exist for the lifetime of your instance. Table 6-3 lists the storage partitions available to EC2 instances of different types.

Table 6-3. EC2 storage partitions by instance type

LocationMount PointSmall InstanceLarge InstanceExtra-Large Instance
/dev/sda1root (/)10 GB10 GB10 GB
/dev/sda2/mnt150 GB--
/dev/sda3/swap0.9 GB--
/dev/sdb/mnt-420 GB420 GB
/dev/sdc--420 GB420 GB
/dev/sdd---420 GB
/dev/sde---420 GB

Partitions automatically associated with a mount point by EC2 are formatted with the ext3 filesystem. Partitions that are not mounted, such as /dev/sdc for the large and extra-large instance types, are not preformatted. These partitions are available for use in a RAID configuration, or you can manually format and mount them yourself.

The root partition plays a vital role in EC2 instances. When you launch an AMI, the image’s data files are copied from S3 to this partition, mounted as the instance’s root partition, and run as the instance’s boot volume. When your instance starts, the root partition will have the contents originally saved to the AMI. The root volume has a maximum size of 10 GB in all instance types, ...

Get Programming Amazon Web Services now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.