Background Information

How do you know what instances have a swap partition and what instances do not? How can I create a swap partition of my EC2 instance?


The default swap partitions in Amazon EC2 are defined by the instance type used. Only m1.small and c1.medium instance types provide a swap partition by default.

Adding a swap partition

For all other instance types, a swap partition can be created using LVM and the ephemeral storage provided with the instance.  RightScale provides the following RightScript for adding a swap partition:

Before you run the SYS Add Swap Partition RightScript, you must first execute the [SYS lvm install]( RightScript.  If those scripts are not available in the current RightScale account, you will need to import them from the MultiCloud Marketplace.  Please note that this method is rarely practiced now and creating a swap file instead is best practice.

Adding a swap file

RightScale OSS provides the following RightScript for adding a swap file to your instance:

See also