WordPress on Amazon EC2: Naming Your EC2 Instances

This is part of my Introduction to Hosting WordPress on Amazon Web Services (AWS) tutorial.

In Launch an Amazon Web Services (AWS) EC2 Instance to Create a WordPress Site we set up an EC2 instance as a resource for a WordPress site. Regardless of what your EC2 instance is a resource for, these tips can help you better manage your EC2 instances. I am using Firefox on a Mac, but these steps are platform- and browser-agnostic. In addition, you will need an AWS account and you will need to log in to that account as a root user or as an IAM user with admin privileges.

Naming Instances and Volumes

  1. Log in to your AWS account.
  2. From the AWS Management Console, type EC2 into the AWS services search box.
  3. Select EC2 from the results to load the EC2 Management Console.
  4. Click Instances on the EC2 Dashboard to view your instances.
  5. When this instance was launched, I did not give it a name. So I will do that by clicking on the row of the instance (where the name is blank), and then click the pencil icon when it appears.
  6. Type in the name you want to give the instance into the box.
  7. I am calling mine tuesdays. After entering a name, click the checkmark to accept the change.
  8. Now the instance has a name that you can recognize. But AWS uses the Instance ID, and you will need to use that Instance ID to identify other components that are a part of this instance. Click the instance. Under the Description tab, if you hover over the Instance ID field, you will see a copy icon; click the copy icon to copy the instance ID. Paste it into a text editor so you can easily refer to it.
  9. In the EC2 Dashboard on the left side of the screen, click Volumes.
  10. Volumes are the storage drives that are attached your instances. Click the volume without a name.
  11. Look at the information about the volume in the Description tab. If this volume is attached to an instance, the Attachment Information field displays the Instance ID for that instance. In this example, you can see the Instance ID of my tuesdays instance and, since I named the instance, it also displays tuesdays.
  12. I am going to give this volume the same name as the instance, tuesdays. Click the Name field.
  13. Click the pencil icon that appears, type in the name, and click the checkmark to accept the change.
  14. Now the volume has an easily recognizable name that you can associate with the instance that it is attached to.

Create a Snapshot of an EC2 Volume

Another important part of running your EC2 instances is keeping backups. AWS makes this easy for EC2 instances with “snapshots.” A snapshot is what it sounds like: a “picture,” or image, of a storage volume. Snapshots are a crucial tool for recovering your data when something goes wrong. Take a snapshot after creating your instance, and take them regularly going forward. I especially recommend taking a snapshot of the instance’s volume every time you are about to do something major to your instance, like installing a new WordPress site or making significant updates to an existing site, creating an SSL certificate for a site, or making significant changes to the instance’s settings. Then, when you have succeeded in whatever you wanted to do, take another snapshot. You can read more about snapshots in the AWS User Guide.

It is important to remember not to create snapshots while the intance is busy or while you are writing data to it. Take snapshots during downtime.

The create a snapshot of a volume:

  1. In the EC2 Dashboard on the left side of the screen, click Volumes.
  2. Click the volume that you want to create a snapshot for.
  3. Click the Actions button and select Create Snapshot from the pop-up.
  4. In the Create Snapshot window, enter some text in the Description field, such as the name of the volume and the date of the snapshot. You can also add tags to the snapshot.
  5. Click Create Snapshot.
  6. A Create Snapshot Request Succeeded message will appear. Click Close to return to your list of volumes.
  7. Depending on the size of your volume, it can take some time for the snapshot creation process to complete, so check the Started and Status fields under the Description tab to make sure that the snapshot process has completed.
  8. Wait until the Status displays completed.
  9. This new snapshot does not have a Name, so click on the row of the snapshot (where the name is blank), and then click the pencil icon when it appears.
  10. Type in the Name you want to give the snapshot into the box. I am using the same name that I used for the Description and click the checkmark to accept the change.
  11. Your snapshot now has a Name.