Adding Swap Space to an EC2 Instance

The t1.micro instance comes with only 602MB of memory. Especially under high load, it is quite easy to deplete the available memory – and since no swap space is enabled by default, this can quickly lead to a server becoming unresponsive. Swap space can also allow the kernel to move unused data out of memory,… Continue reading Adding Swap Space to an EC2 Instance

Shrink EBS Root

My EC2 instances are setup to have only the operating system and program files on the root volume, with all other data (logs, mail, etc.) on a second EBS volume. This leads to a very stable root volume, which sees a minimum of changes. Fully configured, my root volume (using Amazon’s Linux) is 1.2GB. The… Continue reading Shrink EBS Root

Rotating EBS Snapshots: ec2-prune-snapshots

Following the significant disruption of EBS volumes in April, the importance of backups was once again brought to the forefront. Amazon’s method of generating EBS backups is the ‘snapshot’ – a differential backup stored in S3. While Amazon provides tools for creating snapshots (either command line, or via their API), a script that is quite… Continue reading Rotating EBS Snapshots: ec2-prune-snapshots

ec2-consistent-snapshot on Amazon’s Linux AMI

Update: the complementary article to this one, on Rotating EBS snapshots has now been posted. After the recent failure of EBS volumes on Amazon’s cloud, backup is quite likely something to be considering. If, during the aforementioned incident, recent snapshots of the affected EBS volumes were available, it might have been possible to relaunch instances… Continue reading ec2-consistent-snapshot on Amazon’s Linux AMI

AWS Instances with EBS Root Volumes

While instances backed with EBS-root volumes do cost a bit more than the equivalent instance-store images (there is a cost for I/O), they have certain advantages – persistence and ease of replacement being notable. This article will focus on the latter. As a quick side note before proceeding, it is possible to add ephemeral storage… Continue reading AWS Instances with EBS Root Volumes