Encrypting Data at Rest and in Transit
This lesson explains how data services integrate with AWS KMS for encryption at rest and with TLS for encryption in transit, protecting data if storage media, backups or network traffic are exposed.
Learning outcomes
After completing this lesson, you will be able to:
- Choose between SSE-S3 and SSE-KMS.
- Grant the permissions needed to read encrypted data across accounts.
- Enforce encryption in transit.
Encryption at rest with KMS
Every data service can encrypt stored data with AWS KMS. Amazon S3 encrypts all new objects with SSE-S3 by default; SSE-KMS uses KMS keys instead, giving control over who can decrypt and an audit trail. S3 Bucket Keys reduce the number of KMS requests, and so the cost, for buckets with many objects.
AWS Glue uses security configurations to encrypt job output in S3, CloudWatch logs and job bookmarks, and encrypts the Data Catalog separately. Amazon EMR security configurations encrypt EBS volumes, local disks and data written through EMRFS. Redshift, Kinesis, DynamoDB, Athena query results, MWAA and SageMaker all support KMS encryption too. The following table summarises the options.
| Service | Encryption |
|---|---|
| S3 | SSE-S3 by default; SSE-KMS, with S3 Bucket Keys to cut KMS request costs |
| Glue | Security configurations encrypt S3 output, CloudWatch logs and job bookmarks; Data Catalog encryption |
| EMR | Security configurations for EBS, local disks and EMRFS |
| Others | Redshift, Kinesis, DynamoDB, Athena results, MWAA, SageMaker |
Customer managed keys give you control of key policies, rotation and auditing.
Encryption at rest
Cross-account encrypted data
Reading data encrypted with SSE-KMS from another account requires permissions on both sides, because decrypting needs access to the KMS key as well as to the object. In the owning account, the KMS key policy must allow the other account's role to use the key. In the other account, IAM policies must allow that role to call kms:Decrypt and to read the S3 objects, and the bucket policy must allow the access too.
If any of these is missing, the request fails with access denied, which is a common cause of cross-account pipeline failures. AWS managed keys, such as aws/s3, cannot be shared across accounts at all, so data that will be read by other accounts must be encrypted with a customer managed key.
The following diagram shows the three permissions an analytics account needs to read an SSE-KMS bucket in a data lake account, and the account that grants each.

Cross-account access denied
Encryption in transit
Data must also be protected while it moves between services. TLS should be used everywhere: Amazon Redshift's require_ssl parameter rejects unencrypted client connections, and Amazon EMR security configurations enable in-transit encryption between cluster nodes. For Amazon S3, bucket policies deny any request where aws:SecureTransport is false, so data can be read and written only over HTTPS.
When data must be protected even from the storage service, for example because of strict regulatory requirements, client-side encryption with the AWS Encryption SDK encrypts data before it leaves the producer, so it is stored and transferred only in encrypted form.
Encryption in transit
Sharing encrypted data with another account
An analytics account must read a curated bucket in the data lake account. The bucket uses SSE-KMS with a customer managed key. The following table lists the permissions required and where each is granted.
| Permission | Where |
|---|---|
| Bucket policy allowing the analytics account's role to read | Data lake account |
Key policy allowing that role to use kms:Decrypt | Data lake account |
| IAM policy allowing the role to read the bucket and use the key | Analytics account |
Missing the key policy is the usual cause of AccessDenied in this setup, even when the bucket policy is correct; an AWS managed key could not be used at all.
How can KMS request costs be reduced for an SSE-KMS bucket?
Show answer
By enabling S3 Bucket Keys.
Exam Tips
Remember for the exam
- Cross-account SSE-KMS access needs a key policy that allows the account and an IAM policy that allows kms:Decrypt.
- To encrypt Glue job outputs and logs, use a Glue security configuration.
- To reduce KMS costs for SSE-KMS buckets, enable S3 Bucket Keys.
- To require TLS for a bucket, deny requests where aws:SecureTransport is false.
- AWS managed keys cannot be shared across accounts.