AWS Builder Center
AES Encryption Explained: How AWS Uses It to Protect Your Data

AES Encryption Explained: How AWS Uses It to Protect Your Data

A practical breakdown of how AES encryption works under the hood, and how AWS services like KMS, S3, EBS, and RDS use it to keep your data secure at rest and in transit.

I am passionate learner

Body

Encryption is one of those things builders rely on constantly but rarely stop to understand. Every time you enable "encrypt at rest" on an S3 bucket, spin up an encrypted EBS volume, or open an HTTPS connection, there's a good chance AES is doing the heavy lifting behind the scenes. This article breaks down what AES actually is, how it works at a conceptual level, and where you'll find it powering security across AWS.

What Is AES?

AES (Advanced Encryption Standard) is a symmetric block cipher — meaning the same key is used to encrypt and decrypt data, and it processes data in fixed-size chunks called blocks. It was selected by NIST in 2001 as the successor to DES (Data Encryption Standard) after a public competition, and it has since become the global standard for symmetric encryption.
Key characteristics of AES:
  • Block size: 128 bits (16 bytes), regardless of key size
  • Key sizes: 128, 192, or 256 bits — commonly referred to as AES-128, AES-192, and AES-256
  • Symmetric: the encryption key and decryption key are identical
  • Widely trusted: used by governments, financial institutions, and virtually every major cloud provider
AWS almost exclusively uses AES-256, the strongest variant, across its encryption services.

How AES Works (Conceptually)

AES encrypts data through a series of transformation rounds applied to each 128-bit block. The number of rounds depends on key size — 10 rounds for AES-128, 12 for AES-192, and 14 for AES-256.
Each round applies four operations to the block:
  1. SubBytes — every byte in the block is substituted using a fixed lookup table (the S-box), which introduces non-linearity and makes the cipher resistant to algebraic attacks.
  1. ShiftRows — the rows of the data block are shifted cyclically, spreading byte positions around.
  1. MixColumns — columns of the block are mathematically mixed together, so a change in one byte affects multiple output bytes.
  1. AddRoundKey — the block is combined (XORed) with a round-specific key derived from the original encryption key.
Repeating this process across multiple rounds creates what's known as the avalanche effect — a single bit change in the input produces a drastically different, unpredictable output. This is what makes AES computationally infeasible to break with current technology when used correctly.

Modes of Operation

AES itself only defines how to encrypt a single 128-bit block. To encrypt real-world data (which is rarely exactly 16 bytes), it's combined with a mode of operation. The mode matters a lot for security:
  • GCM (Galois/Counter Mode) — the modern standard. Provides both confidentiality and built-in authentication (it detects if ciphertext has been tampered with). This is what AWS uses almost everywhere.
  • CBC (Cipher Block Chaining) — chains blocks together using an initialization vector (IV). Still used in some legacy systems but requires separate authentication.
  • ECB (Electronic Codebook) — encrypts each block independently. Avoid this — identical plaintext blocks produce identical ciphertext blocks, leaking patterns in the data.
If you're ever implementing AES yourself (rather than relying on a managed AWS service), GCM is almost always the right choice.

How AWS Uses AES

AWS doesn't just support AES — it's the backbone of encryption across nearly the entire platform. Here's where you'll encounter it:

AWS Key Management Service (KMS)

KMS is the central hub for encryption key management in AWS. When you create a KMS key, it's an AES-256 key under the hood. KMS uses envelope encryption:
  1. Your data is encrypted with a unique, randomly generated data key (AES-256).
  1. That data key is itself encrypted ("wrapped") using your KMS key, which never leaves KMS's hardware security modules (HSMs).
  1. The encrypted data key is stored alongside your encrypted data.
  1. To decrypt, KMS unwraps the data key (using the KMS key) and returns it so your application can decrypt the actual data.
This pattern means large amounts of data never need to touch the KMS service directly for the actual encryption/decryption — only the small data key does, which is far more efficient and scalable than encrypting everything directly with a KMS key.

Amazon S3

S3 supports several encryption options, all AES-256 based:
  • SSE-S3 — Amazon manages the keys entirely; data is encrypted with AES-256 automatically.
  • SSE-KMS — encryption keys are managed through KMS, giving you audit trails (via CloudTrail) and fine-grained access control over who can use the key.
  • SSE-C — you supply your own encryption key with each request; AWS uses it to encrypt/decrypt but doesn't store it.

Amazon EBS and EC2

EBS volume encryption uses AES-256, encrypting data at rest on the volume, data in transit between the volume and the instance, and any snapshots taken from it. Once enabled on a volume, encryption is transparent to the operating system and applications.

Amazon RDS and Aurora

Database encryption at rest uses AES-256 via KMS-integrated keys. This covers the underlying storage, automated backups, read replicas, and snapshots.

DynamoDB

DynamoDB encrypts all table data at rest by default using AES-256, with keys managed through KMS (either AWS-owned, AWS-managed, or customer-managed keys, depending on your configuration).

AWS CloudHSM

For workloads with strict compliance requirements (like FIPS 140-2 Level 3), CloudHSM gives you dedicated hardware security modules where you control AES key generation and storage directly, without AWS having access to the key material.

TLS and Data in Transit

Beyond data at rest, AES is also the workhorse behind TLS connections used across AWS — API calls, load balancer traffic, and service-to-service communication typically negotiate an AES-GCM cipher suite to encrypt data as it moves across the network.

AWS Encryption SDK

For developers who need to implement envelope encryption in their own applications (client-side, before data ever reaches AWS), the AWS Encryption SDK provides libraries that handle AES-256-GCM encryption, data key generation, and integration with KMS, following AWS's recommended best practices out of the box.

Best Practices When Working With AES on AWS

  • Prefer SSE-KMS over SSE-S3 when you need audit logging and granular access control over who can decrypt data.
  • Use customer-managed KMS keys for sensitive workloads instead of AWS-managed keys, so you control key policies and rotation.
  • Enable automatic key rotation on KMS keys (annual rotation is supported natively).
  • Apply least privilege to key policies — separate who can manage a KMS key from who can use it to encrypt/decrypt.
  • Use envelope encryption for large datasets rather than encrypting everything directly with a KMS key — it's both more secure and more performant.
  • Default to GCM mode if you're implementing AES outside of a managed AWS service.
  • Enable encryption by default — many services (like EBS and S3) let you set account-level defaults so new resources are encrypted automatically.

Wrapping Up

AES-256 is quietly everywhere in AWS — from the S3 bucket storing your static assets to the EBS volume backing your EC2 instance to the TLS handshake securing your API calls. Understanding how it works, and how AWS layers services like KMS on top of it through envelope encryption, makes it much easier to reason about your security posture and make informed decisions about which encryption options fit your workload.
If you're building something that handles sensitive data, start with AWS KMS and let it manage the complexity of key generation, rotation, and access control — it's built on the same AES-256 foundation described here, with the operational overhead already solved for you.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article