Lesson 3 of 4 Amazon EBS and Instance Store

Encrypting EBS Volumes and Snapshots

This lesson explains how EBS encryption protects data at rest on volumes and snapshots, and in transit between an instance and its volumes, with no performance impact on current instances.

Learning outcomes

After completing this lesson, you will be able to:

  • Identify what EBS encryption covers.
  • Explain how existing unencrypted data is encrypted.
  • Explain how encrypted snapshots are shared and copied.

What is encrypted

When an EBS volume is encrypted, the encryption covers the data at rest on the volume, data moving between the instance and the volume, every snapshot taken from the volume, and every volume created from those snapshots. Encryption is handled by the infrastructure, with negligible effect on performance.

The keys are AWS KMS keys: either the AWS managed aws/ebs key or a customer managed key, which is needed for sharing encrypted snapshots across accounts. Enabling encryption by default in each Region ensures that every new volume is encrypted, whoever creates it.

Select all that apply

What EBS encryption covers

Exam skills 1.3.2

Identify what EBS encryption protects.

Log in to try this activity Interactive activities are free with an account.

Encrypting existing data

An unencrypted volume cannot be encrypted in place. Instead, its data is moved to an encrypted copy.

  1. Snapshot

    Take a snapshot of the unencrypted volume.

  2. Copy with encryption

    Copy the snapshot with encryption enabled, choosing the KMS key.

  3. Replace the volume

    Create a new volume from the encrypted copy and attach it in place of the original volume.

The same approach encrypts an existing Amazon RDS database: its snapshot is copied with encryption, and a new, encrypted instance is restored from the copy.

The following diagram shows the three steps as a flow.

Encrypting an existing EBS volume. Because a volume cannot be encrypted in place, a snapshot of the unencrypted volume is copied with encryption enabled under a chosen KMS key, a new volume is created from the encrypted copy, and it replaces the original on the instance.
Enabling encryption by default for the account makes every new volume encrypted, so the process is needed only for older volumes.
Put in order

Encrypting a volume

Exam skills 1.3.2

Put the steps of encrypting an existing unencrypted volume in order.

Log in to try this activity Interactive activities are free with an account.

Sharing and copying

Encrypted snapshots carry their key with them, which restricts how they can be shared and copied. Snapshots encrypted with the AWS managed key cannot be shared with other accounts, because that key's policy cannot grant access to them; they are first copied and re-encrypted with a customer managed key, whose policy can allow the other account.

KMS keys are Regional, so copying an encrypted snapshot to another Region requires a KMS key in the destination Region, and the copy is re-encrypted with that key.

Worked example

Encrypting an unencrypted volume

An audit finds an unencrypted EBS volume attached to a database instance. EBS cannot encrypt an existing volume in place.

StepAction
1Create a snapshot of the volume
2Copy the snapshot with encryption enabled, using a KMS key
3Create a new volume from the encrypted snapshot
4Stop the instance, swap the volumes, start the instance
5Enable EBS encryption by default so new volumes are always encrypted

Instance store, by contrast, is the right place only for temporary data such as caches and scratch files, because its contents are lost when the instance stops.

Check yourself

How can every new EBS volume in a Region be encrypted automatically?

Show answer

Enable EBS encryption by default for the account in that Region, optionally choosing the KMS key.

Exam Tips

Remember for the exam

  • To encrypt an existing unencrypted volume, make an encrypted copy of a snapshot and create a new volume from it.
  • To ensure every new volume is encrypted, turn on EBS encryption by default in each Region.
  • To share an encrypted snapshot with another account, use a customer managed key.