Data protection
Encryption at rest and in transit, secrets, detection and immutable retention. Part of Domain 1: Design Secure Architectures, 30% of the scored content.
AWS KMS
AWS Key Management Service
Managed keys protected by FIPS 140-3 Security Level 3 validated HSMs that never leave the service unencrypted, integrated with most services for encryption at rest.
Key points
- Key policy: every KMS key has exactly one, and it is the primary access control. IAM policies can allow use of a key only if the key policy enables them.
- Envelope encryption:
Encrypttakes at most 4,096 bytes. For larger data,GenerateDataKeyreturns a data key that encrypts locally, and KMS protects the data key. - Rotation: optional for customer managed keys, every 90 to 2,560 days (default 365), plus on-demand rotation. AWS managed keys rotate every year. Old key material stays available to decrypt.
- Multi-Region keys: related keys with the same key ID and key material in several Regions, so data encrypted in one Region decrypts in another without a cross-Region call.
- Sharing: resources encrypted under an AWS managed key cannot be shared with other accounts. Use a customer managed key whose key policy allows the other account.
On the exam
"Share an encrypted snapshot or object with another account" -> customer managed key with the other account in the key policy. AWS managed keys cannot be shared.
KMS key types
| Key type | Control and cost |
|---|---|
| Customer managed |
|
| AWS managed |
|
| AWS owned |
|
Single-tenant hardware security modules in the AWS Cloud for when you must fully control the keys and the HSM users yourself.
Key points
- Single tenant: dedicated HSMs, FIPS 140-2 or FIPS 140-3 Level 3 validated for clusters in FIPS mode.
- Full control: you manage HSM users and keys, and the end-to-end encrypted data plane is not visible to AWS.
- Standard interfaces: PKCS #11, JCE, CNG and KSP ease the migration of existing PKI and cryptographic workloads.
- KMS custom key store: a CloudHSM key store keeps KMS integration while key material stays in your cluster, for low request rate workloads.
- Trade-off: more operational responsibility than KMS, including availability and scaling of the cluster.
On the exam
"Single-tenant HSM", "exclusive control of the keys" or "AWS must not access the keys" -> CloudHSM. Plain encryption at rest with an audit trail is KMS.
Every S3 bucket encrypts new objects by default. Choose the option by who must control the key and how many encryption layers compliance demands.
Key points
- SSE-S3: the default for new uploads since January 5, 2023. AES-256 with keys that S3 manages, at no additional cost.
- SSE-KMS: KMS keys with key policies and CloudTrail records of key use. S3 Bucket Keys reduce KMS request costs by up to 99%.
- DSSE-KMS: 2 independent layers of AES-256 encryption for multilayer compliance. S3 Bucket Keys are not supported.
- SSE-C: you send the key with every request over HTTPS and S3 never stores it. Since April 2026 it is disabled by default on new buckets and must be enabled explicitly.
- Client-side encryption: data is encrypted before upload, so it reaches S3 already encrypted.
On the exam
"Audit every use of the key and control who can decrypt" -> SSE-KMS with a customer managed key. "Two layers of encryption" -> DSSE-KMS. "The company manages its own keys outside AWS" -> SSE-C or client-side encryption.
ACM and TLS
AWS Certificate Manager
Public and private TLS certificates for integrated services at no additional charge, with managed renewal so certificates do not expire unnoticed.
Key points
- Integrated services: Elastic Load Balancing, CloudFront, API Gateway, App Runner, Amplify, Elastic Beanstalk and Network Firewall TLS inspection.
- CloudFront rule: the certificate must be requested or imported in US East (N. Virginia),
us-east-1. - Regional: certificates cannot be copied between Regions. Request one in each Region where a load balancer uses it.
- Managed renewal: automatic for DNS-validated certificates in use. Imported certificates are not renewed by ACM, so track their expiry.
- On EC2: use the ACME protocol for publicly trusted certificates on your own servers. An ACM-managed certificate on an instance requires Nitro Enclaves.
On the exam
"HTTPS on CloudFront with a custom domain" -> ACM certificate in us-east-1. "Avoid outages from expired certificates" -> ACM certificate with DNS validation, not an imported one.
Keep credentials out of code. Secrets Manager rotates secrets automatically, while Parameter Store holds configuration and simple encrypted values.
Key points
- Secrets Manager: KMS-encrypted secrets with automatic rotation, either managed rotation or a Lambda rotation function, with native database integrations.
- Replication: replica secrets in other Regions, and rotation of the primary secret propagates to them.
- Parameter Store:
String,StringListandSecureString(KMS-encrypted) parameters in hierarchies, with no credential rotation. - Tiers: standard is free, with 10,000 parameters of up to 4 KB. Advanced allows 100,000 parameters of up to 8 KB, parameter policies and cross-account sharing, for a charge.
- Cost: Secrets Manager bills per secret per month and per API call.
On the exam
"A database password must rotate automatically" -> Secrets Manager. "Store AMI IDs or configuration values cheaply" -> Parameter Store.
Managed services that find threats, vulnerabilities and sensitive data, then aggregate and investigate the findings.
Key points
- GuardDuty: threat detection from CloudTrail management events, VPC Flow Logs and DNS logs, without enabling those logs yourself. Protection plans add S3, EKS, runtime, malware, RDS and Lambda.
- Inspector: continuous scanning of EC2 instances, ECR container images and Lambda functions for software vulnerabilities and unintended network exposure.
- Macie: discovers sensitive data such as PII in S3 with machine learning and pattern matching, and flags bucket issues such as public access.
- Security Hub CSPM: checks accounts against standards such as AWS Foundational Security Best Practices and CIS, and aggregates findings from GuardDuty, Inspector and Macie. Most controls need AWS Config.
- Detective: builds a behavior graph from CloudTrail, VPC Flow Logs and GuardDuty findings to investigate the root cause.
On the exam
"Find PII in S3" -> Macie. "Compromised credentials or crypto mining" -> GuardDuty. "CVEs in EC2 or container images" -> Inspector. "One view of compliance posture" -> Security Hub. "Root cause of a finding" -> Detective.
Which service answers what
| Service | Typical question |
|---|---|
| GuardDuty | Is something malicious happening in my accounts? |
| Inspector | Which workloads have known vulnerabilities? |
| Macie | Where is sensitive data stored in S3? |
| Security Hub CSPM | Do my accounts follow security best practices? |
| Detective | What caused this finding and what did it touch? |
Immutable storage for regulatory retention and ransomware protection, at the object, vault or backup level.
Key points
- S3 Object Lock: write once, read many per object version, and it requires versioning. Use retention periods, or legal holds that have no expiry and stay until removed.
- Governance mode: users with
s3:BypassGovernanceRetentioncan override the lock. Useful to test retention settings. - Compliance mode: no user, not even the root user, can delete the version or shorten its retention until it expires.
- Glacier Vault Lock: a vault lock policy that becomes unchangeable once you complete the lock within 24 hours. The original vault service no longer accepts new customers, so new designs use Object Lock with S3 Glacier storage classes.
- AWS Backup Vault Lock: governance or compliance mode for backup vaults. In compliance mode the vault becomes immutable after a grace time of at least 72 hours.
On the exam
"Records that nobody, including administrators, may delete for 7 years" -> S3 Object Lock in compliance mode. Governance mode still lets privileged users with the bypass permission remove data.
Self-service portal for AWS compliance reports and agreements, free of charge.
Key points
- Reports: download SOC reports, ISO certifications and PCI DSS documents that show auditors the controls AWS operates.
- Agreements: review, accept and track agreements with AWS for one account or for every account of the organization.
- Shared responsibility: Artifact covers the compliance of AWS. You still document the compliance of your own workloads.
- Marketplace vendors: security and compliance documents of ISVs that sell on AWS Marketplace are also available.
On the exam
"An auditor asks for the AWS SOC report or PCI attestation" -> AWS Artifact. AWS Config and AWS Audit Manager assess your own resources instead.