Data encryption at rest for Amazon SES
By default, Amazon SES encrypts all data at rest. Encryption by default helps reduce the operational overhead and complexity involved in protecting data. Encryption also enables you to create Mail Manager archives that meet strict encryption compliance and regulatory requirements.
SES provides the following encryption options:
-
AWS owned keys – SES uses these by default. You can't view, manage, or use AWS owned keys, or audit their use. However, you don't have to take any action or change any programs to protect the keys that encrypt your data. For more information, see AWS owned keys in the AWS Key Management Service Developer Guide.
-
Customer managed keys – SES supports the use of symmetric customer managed keys that you create, own, and manage. Because you have full control of the encryption, you can perform such tasks as:
-
Establishing and maintaining key policies
-
Establishing and maintaining IAM policies and grants
-
Enabling and disabling key policies
-
Rotating key cryptographic material
-
Adding tags
-
Creating key aliases
-
Scheduling keys for deletion
To use your own key, choose a customer managed key when you create your SES resources.
For more information, see Customer managed keys in the AWS Key Management Service Developer Guide.
-
Note
SES automatically enables encryption at rest using AWS owned keys at no charge.
However, AWS KMS charges apply for using a customer managed key. For more information about pricing,
see the AWS Key Management Service pricing
Create a customer managed key
You can create a symmetric customer managed key by using the AWS Management Console, or the AWS KMS APIs.
To create a symmetric customer managed key
Follow the steps for Creating symmetric encryption KMS keys in the AWS Key Management Service Developer Guide.
Note
For archiving, your key must meet the following requirements:
-
The key must be symmetric.
-
The key material origin must be
AWS_KMS
. -
The key usage must be
ENCRYPT_DECRYPT
.
Key policy
Key policies control access to your customer managed key. Every customer managed key must have exactly one key policy, which contains statements that determine who can use the key and how they can use it. When you create your customer managed key, you can specify a key policy. For more information, see Managing access to customer managed keys in the AWS Key Management Service Developer Guide.
To use your customer managed key with Mail Manager archiving, your key policy must permit the following API operations:
-
kms:DescribeKey – Provides the customer managed key details that allow SES to validate the key.
-
kms:GenerateDataKey – Allows SES to generate a data key for encrypting data at rest.
-
kms:Decrypt – Allows SES to decrypt stored data before returning it to API clients.
The following example shows a typical key policy:
{ "Sid": "Allow SES to encrypt/decrypt", "Effect": "Allow", "Principal": { "Service": "ses.amazonaws.com" }, "Action": [ "kms:GenerateDataKey", "kms:Decrypt", "kms:DescribeKey" ], "Resource": "*" },
For more information, see specifying permissions in a policy, in the AWS Key Management Service Developer Guide.
For more information about troubleshooting, see troubleshooting key access, in the AWS Key Management Service Developer Guide.
Specifying a customer managed key for Mail Manager archiving
You can specify a customer managed key as an alternative to using AWS owned keys. When you create an archive, you can specify the data key by entering a KMS key ARN, which Mail Manager archiving uses to encrypt all customer data in the archive.
-
KMS key ARN – A key identifier for an AWS KMS customer managed key. Enter a key ID, key ARN, alias name, or alias ARN.
Amazon SES encryption context
An encryption context is an optional set of key-value pairs that contain additional contextual information about the data.
AWS KMS uses the encryption context as additional authenticated data to support authenticated encryption. When you include an encryption context in a request to encrypt data, AWS KMS binds the encryption context to the encrypted data. To decrypt data, you include the same encryption context in the request.
Note
Amazon SES doesn't support encryption contexts for archive creation. Instead, you use an IAM or KMS policy. For example policies, see Archive creation policies, later in this section.
Amazon SES encryption context
SES uses the same encryption context in all AWS KMS cryptographic operations,
where the key is aws:ses:arn
and the value is the resource Amazon
Resource Name (ARN).
"encryptionContext": { "aws:ses:arn": "arn:aws:ses:us-west-2:111122223333:ExampleResourceName/ExampleResourceID" }
Using encryption context for monitoring
When you use a symmetric customer managed key to encrypt your SES resource, you can also use the encryption context in audit records and logs to identify how the customer managed key is being used. The encryption context also appears in logs generated by AWS CloudTrail or Amazon CloudWatch Logs.
Using encryption context to control access to your customer managed key
You can use the encryption context in key policies and IAM policies as
conditions
to control access to your symmetric customer managed key. You can also use
encryption context constraints in a grant.
SES uses an encryption context constraint in grants to control access to the customer managed key in your account or region. The grant constraint requires that the operations that the grant allows use the specified encryption context.
The following are example key policy statements to grant access to a customer managed key for a specific encryption context. The condition in this policy statement requires that the grants have an encryption context constraint that specifies the encryption context.
{ "Sid": "Enable DescribeKey", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::111122223333:role/ExampleReadOnlyRole" }, "Action": "kms:DescribeKey", "Resource": "*" }, { "Sid": "Enable CreateGrant", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::111122223333:role/ExampleReadOnlyRole" }, "Action": "kms:CreateGrant", "Resource": "*", "Condition": { "StringEquals": { "kms:EncryptionContext:aws:ses:arn": "arn:aws:ses:us-west-2:111122223333:ExampleResourceName/ExampleResourceID" } } }
Archive creation policies
The following example policies show how to enable archive creation. The policies work on all assets.
IAM policy
{ "Sid": "VisualEditor0", "Effect": "Allow", "Action": "ses:CreateArchive", "Resource": [ "*" ] }, { "Effect": "Allow", "Action": [ "kms:DescribeKey", "kms:GenerateDataKey", "kms:Decrypt" ], "Resource": "*", "Condition": { "StringEquals": { "kms:ViaService": "ses.us-east-1.amazonaws.com", "kms:CallerAccount": "012345678910" } } }
AWS KMS policy
{ "Sid": "Allow SES to encrypt/decrypt", "Effect": "Allow", "Principal": { "Service": "ses.amazonaws.com" }, "Action": [ "kms:GenerateDataKey", "kms:Decrypt", "kms:DescribeKey" ], "Resource": "*" },
Monitoring your encryption keys for Amazon SES
When you use an AWS KMS customer managed key with your Amazon SES resources, you can use AWS CloudTrail or Amazon CloudWatch Logs to track requests that SES sends to AWS KMS.
The following examples are AWS CloudTrail events for
GenerateDataKey
, Decrypt
, and DescribeKey
to monitor
KMS operations called by SES to access data encrypted by your customer managed key:
Learn more
The following resources provide more information about data encryption at rest.
-
For more information about AWS Key Management Service basic concepts, see the AWS Key Management Service Developer Guide.
-
For more information about Security best practices for AWS Key Management Service, see the AWS Key Management Service Developer Guide.