Training / Certifications / AWS Cloud Practitioner / Encryption and Secrets on AWS

AWS Cloud Practitioner (CLF-C02) · Lesson 12 of 26

Encryption and Secrets on AWS

Distinguish encryption at rest from encryption in transit, and identify the AWS services that support them (AWS Certificate Manager, AWS KMS and its key types, AWS CloudHSM), and choose between AWS Secrets Manager and Systems Manager Parameter Store for storing credentials.

Domain 2: Security and Compliance (30%)Task 2.2, 2.3About 5:39CaptionsStatic view for reduced motion
Lesson 12: Encryption and Secrets on AWS Illustrative example: names and values are samples 1. Encrypt dataAt rest: data stored on diskIn transit: data on the move(ACM, AWS KMS, CloudHSM)2. Keep secrets safeDatabase passwords, API keysout of code, rotated for you(Secrets Manager)Domain 2, Tasks 2.2 and 2.3: encryption options, credential storagePlaintextcard ending 4242anyone can read itEncryptalgorithm + keythe keyCiphertextx9#Qf!2kL7…useless without keyWhoever controls the key controls the dataIn transit: data on the moveShopperWeb storeTLS (HTTPS) tunnelStops eavesdropping on the wireNeeds a TLS certificateAt rest: data on diskS3RDSEBSProtects stolen disks or copiesKeys managed by AWS KMSDo both: encrypt in transit AND at restTLS certificateshop.example.comAWS CertificateManager (ACM)Elastic Load BalancingAmazon CloudFrontAmazon API GatewayIssues public and private certificatesRenews managed certificates for youNo charge when used with integrated servicesHTTPS for your site, with no expired certificatesAWS KMScreate and control keyskeys stay inside HSMsmanaged by AWSAmazon S3Amazon EBSAmazon RDSYou decidewho may use each key(key policy + IAM)Every use loggedin AWS CloudTrailIntegrated services encrypt with a KMS key in one settingSee it?Control it?Who manages itAWS ownedShared by a serviceNoNoThe AWS serviceAWS managedaws/s3, aws/rds…YesNoAWS, in your accountCustomer managedYou create itYesYesYou: policy, rotation, deleteNeed your own key policy, rotation or audit control?Choose a customer managed keyAWS KMSManaged, multi-tenant serviceAWS runs the HSMs for youBuilt into many AWS servicesMost companies start hereAWS CloudHSMSingle-tenant HSMs, just yoursIn your VPC; you manage keysand HSM users yourselfStrict compliance, full control“Dedicated hardware” or “single-tenant HSM”in a question: AWS CloudHSMHard-coded in the appdb_pass = "S3cret!"Anyone with the code sees itChanging it means a redeploySecrets Managerencrypted with KMSaccess by IAMrotatesStore appasks at runtimeDatabasepassword changedRotation on a schedule: the app always fetches thecurrent password, so no code changesAWS Secrets ManagerBuilt for secretsDatabase passwordsAPI keys, OAuth tokensAutomatic rotationPay per secretSystems Manager Parameter StoreBuilt for configurationSettings, endpoints, IDsSecureString encrypts with KMSNo automatic rotationStandard tier at no extra costCredentials that must rotate: Secrets ManagerPlain configuration values: Parameter StoreIf the question says……think“Encrypt data in transit / use HTTPS”TLS certificate from ACM“Provision and renew SSL/TLS certificates”AWS Certificate Manager“Create and control encryption keys”AWS KMS“Dedicated, single-tenant HSM”AWS CloudHSM“Store and auto-rotate DB credentials”AWS Secrets Manager“Store configuration values centrally”Parameter Store“Audit who used an encryption key”AWS CloudTrail logsEncryptionIn transit: TLS, certificatesfrom ACM (free when integrated)At rest: keys in AWS KMS(AWS owned, AWS managed,customer managed); CloudHSMSecretsNo passwords in codeSecrets Manager: store, encryptand rotate credentialsParameter Store: configurationvalues, SecureString optionEncrypt everywhere, guard the keys,and fetch secrets at runtime

Tip: turn your phone sideways or use full screen for larger labels.

Captions match the narration word for word. Press Space to play or pause and the arrow keys to change scenes.

Learning objective

Distinguish encryption at rest from encryption in transit, and identify the AWS services that support them (AWS Certificate Manager, AWS KMS and its key types, AWS CloudHSM), and choose between AWS Secrets Manager and Systems Manager Parameter Store for storing credentials.

Exam mapping

Domain 2: Security and Compliance (30%). Task statement 2.2, 2.3 in the official exam guide.

Key takeaways

  • Encryption at rest protects stored data (S3, EBS, RDS); encryption in transit protects data moving over a network, usually with TLS (HTTPS). Use both.
  • AWS Certificate Manager (ACM) provisions, deploys and renews public and private SSL/TLS certificates for integrated services such as Elastic Load Balancing, CloudFront and API Gateway; public certificates used with integrated services cost nothing extra.
  • AWS KMS creates and controls encryption keys, protected by FIPS-validated HSMs that AWS operates. It integrates with many AWS services, and every key use is logged in AWS CloudTrail.
  • KMS keys: AWS owned (used by a service, invisible to you), AWS managed (in your account, managed by AWS, rotated yearly) and customer managed (you control policy, rotation and deletion).
  • AWS CloudHSM provides single-tenant HSMs in your VPC that you manage yourself, for strict compliance or full key control. KMS is the managed, multi-tenant default.
  • AWS Secrets Manager stores credentials encrypted with KMS and can rotate them automatically. Systems Manager Parameter Store holds configuration values (SecureString for encrypted ones) but has no built-in automatic rotation.

Exam tips

How the exam asks about this

Questions describe a situation and expect you to recognize the concept behind it.

If the question mentions…Think
Encrypt traffic between users and a website or load balancerTLS (HTTPS) with a certificate from AWS Certificate Manager
Free, automatically renewed SSL/TLS certificates for CloudFront or a load balancerAWS Certificate Manager (ACM)
Create, manage and control encryption keys used by AWS servicesAWS Key Management Service (AWS KMS)
Dedicated, single-tenant hardware security module that you controlAWS CloudHSM
Store database credentials and rotate them automaticallyAWS Secrets Manager
Central store for configuration data and parametersAWS Systems Manager Parameter Store

Common traps

  • KMS vs. CloudHSM: KMS is a managed, multi-tenant service where AWS runs the HSMs; CloudHSM is single-tenant hardware where you manage the keys and HSM users. 'Dedicated' or 'single-tenant' points to CloudHSM.
  • ACM handles TLS certificates for encryption in transit. It doesn't store passwords or rotate database credentials; that's Secrets Manager.
  • Parameter Store can encrypt values (SecureString) but has no built-in automatic rotation. 'Rotate credentials automatically' means Secrets Manager.
  • Encryption at rest doesn't protect data while it travels, and TLS doesn't protect a stolen disk. A question that asks for both needs both kinds of encryption.

Practice

Exam-style questions

Answer each one before you open the explanation.

Question 1. A company wants to protect customer data as it travels between users' browsers and its Application Load Balancer. Which approach should it use?

  1. Enable server-side encryption on the Amazon S3 bucket
  2. Configure HTTPS on the load balancer with a certificate from AWS Certificate Manager
  3. Store the data in AWS Secrets Manager
  4. Create a customer managed key in AWS KMS and encrypt the EBS volumes
Show answer

B. Configure HTTPS on the load balancer with a certificate from AWS Certificate Manager. Data moving between browsers and the load balancer is in transit, so it needs TLS (HTTPS), and ACM provides and renews the certificate for the load balancer. Encrypting EBS volumes with a KMS key is tempting because it's encryption, but it protects data at rest on disk, not traffic on the network. S3 encryption is also at rest, and Secrets Manager stores credentials.

Question 2. Which AWS service lets a company create and control the encryption keys that services such as Amazon EBS and Amazon RDS use to encrypt data at rest?

  1. AWS Certificate Manager (ACM)
  2. AWS Secrets Manager
  3. AWS Key Management Service (AWS KMS)
  4. AWS Security Token Service (AWS STS)
Show answer

C. AWS Key Management Service (AWS KMS). AWS KMS creates and controls encryption keys and integrates with EBS, RDS, S3 and many other services. ACM is tempting because it's about encryption too, but it manages TLS certificates for encryption in transit. Secrets Manager stores credentials, and STS issues temporary credentials for roles.

Question 3. A financial company must keep its encryption keys in dedicated, single-tenant hardware security modules that it alone manages, to meet regulatory requirements. Which service meets this need?

  1. AWS KMS with AWS managed keys
  2. AWS Secrets Manager
  3. AWS Certificate Manager
  4. Amazon S3 server-side encryption
  5. AWS CloudHSM
Show answer

E. AWS CloudHSM. AWS CloudHSM provides single-tenant HSMs in the customer's VPC, and the customer manages the keys and HSM users. AWS KMS is tempting because its keys are also protected by HSMs, but KMS is a managed, multi-tenant service where AWS operates the hardware, and AWS managed keys give the customer even less control.

Question 4. An application stores a database password in its source code. The security team wants the password stored securely and rotated automatically, without code changes at each rotation. Which service should the company use?

  1. AWS Secrets Manager
  2. AWS Systems Manager Parameter Store with a String parameter
  3. AWS Certificate Manager
  4. An encrypted Amazon S3 object
Show answer

A. AWS Secrets Manager. Secrets Manager stores the secret encrypted with KMS, lets the app fetch it at runtime, and rotates it automatically on a schedule. Parameter Store is tempting because it can hold values, but a plain String parameter isn't encrypted and Parameter Store has no built-in automatic rotation. ACM manages certificates, and an S3 object would need custom rotation code.

Question 5. Which statements about AWS KMS keys are correct? (Select TWO.)

  1. Customer managed keys let the customer control key policies, rotation and deletion
  2. AWS managed keys can be deleted by the customer at any time
  3. Use of KMS keys in your account is recorded in AWS CloudTrail
  4. KMS keys are exported to EC2 instances to encrypt data locally
  5. AWS owned keys appear in the customer's account and can be audited
Show answer

A. Customer managed keys let the customer control key policies, rotation and deletion and C. Use of KMS keys in your account is recorded in AWS CloudTrail. Customer managed keys give you full control, including key policies, rotation and scheduling deletion, and KMS logs key use in your account to CloudTrail. It's tempting to think AWS managed keys are yours to delete because they sit in your account, but AWS manages them. AWS owned keys aren't visible in your account, and KMS keys never leave KMS unencrypted.

Transcript

Lesson transcript

The full narration, scene by scene. The captions file contains the same text with timings.

Scene 1 · 0:00

Lesson 12: Encryption and secrets. Welcome back to Domain 2, Security and Compliance. Last time, roles kept long-term keys out of our store's code. Today we protect the data itself, with two ideas. First, encryption: for data sitting on disk, called at rest, and for data moving across a network, called in transit. Second, secrets: where to keep database passwords and API keys so they never sit in your code. The exam tests both in tasks 2.2 and 2.3.

Scene 2 · 0:32

What encryption does. Encryption turns readable data, called plaintext, into scrambled ciphertext, using an algorithm and a key. A shopper's order details go in, and what comes out is useless to anyone who doesn't hold the key. The matching key turns it back into plaintext. So encryption doesn't remove risk; it moves it to the key. Whoever controls the key controls the data. That's why most of today's services are really about managing keys.

Scene 3 · 1:03

At rest and in transit. Data needs protection in two places. In transit, it travels between the shopper's browser and the store. TLS, the protocol behind HTTPS, wraps that trip in an encrypted tunnel, so nobody on the network can read card details. At rest, data sits in S3 buckets, EBS volumes and RDS databases. Encryption at rest protects it if a disk or copy is stolen. Good security does both, and on AWS both are easy to turn on.

Scene 4 · 1:36

AWS Certificate Manager. HTTPS needs a TLS certificate that proves the site really is shop.example.com. AWS Certificate Manager, or ACM, provisions public and private certificates and deploys them to integrated services such as Elastic Load Balancing, Amazon CloudFront and Amazon API Gateway. ACM renews the certificates it manages, so the site never breaks because a certificate expired. Public certificates used with integrated services cost nothing extra.

Scene 5 · 2:03

AWS Key Management Service. For data at rest, the key service is AWS Key Management Service, or KMS. It creates and controls encryption keys, which are protected by hardware security modules and never leave KMS unencrypted. Services such as S3, EBS and RDS integrate with KMS, so encrypting a volume or database is one setting. You decide who may use each key with key policies and IAM, and every use of a key is logged in AWS CloudTrail.

Scene 6 · 2:35

Three kinds of KMS keys. KMS keys come in three kinds, and the difference is control. AWS owned keys belong to a service and are shared across accounts; you can't see them. AWS managed keys are created in your account by a service, with names like aws/s3. You can see and audit them, but AWS manages them. Customer managed keys are ones you create: you set the policy, turn rotation on or off, and can disable or delete them.

Scene 7 · 3:07

KMS or CloudHSM?. Both services use hardware security modules, or HSMs. AWS KMS is a managed, multi-tenant service: AWS runs the HSMs, and it's built into many AWS services. AWS CloudHSM gives you single-tenant HSMs in your own VPC. You manage the keys and the HSM users yourself, so you get full control and more responsibility. Choose CloudHSM when rules demand dedicated hardware that only you control. For most workloads, KMS is the answer.

Scene 8 · 3:38

AWS Secrets Manager. Now secrets. The store's app needs a database password. Typing it into the code means anyone who reads the code sees it, and changing it means a redeploy. AWS Secrets Manager stores the secret encrypted with KMS, controls access with IAM, and lets the app fetch it at runtime. Its signature feature is automatic rotation on a schedule: it changes the database password, and the app simply fetches the new value.

Scene 9 · 4:09

Secrets Manager or Parameter Store?. Systems Manager Parameter Store looks similar, so the exam likes to compare them. Parameter Store keeps configuration values, such as endpoints and feature settings, and its SecureString type encrypts a value with KMS. But it has no built-in automatic rotation. Secrets Manager is purpose-built for credentials like database passwords and API keys, with rotation included. If a question says rotate credentials automatically, the answer is Secrets Manager.

Scene 10 · 4:38

How the exam asks about this. Here's how the exam asks about this. Encrypt data in transit or use HTTPS: a TLS certificate from ACM. Provision and renew SSL or TLS certificates: AWS Certificate Manager. Create and control encryption keys: AWS KMS. A dedicated, single-tenant HSM: AWS CloudHSM. Store and automatically rotate database credentials: AWS Secrets Manager. Store configuration values centrally: Parameter Store. And audit who used an encryption key: AWS CloudTrail logs.

Scene 11 · 5:08

Recap: encryption and secrets. To recap: encrypt data in transit with TLS, using certificates from ACM, and at rest with keys from AWS KMS. KMS keys are AWS owned, AWS managed or customer managed, depending on how much control you need, and CloudHSM gives you dedicated hardware. Keep credentials out of code: Secrets Manager stores and rotates them, and Parameter Store holds configuration. Next, we'll defend the store's front door with AWS WAF and AWS Shield.

Download captions (WebVTT)

Sources and accuracy

Checked against AWS documentation and the official CLF-C02 exam guide on October 18, 2026. AWS changes often, so confirm details in the current documentation. Diagrams and numbers in the animation are illustrative.

This free course is independent and isn't affiliated with or endorsed by Amazon Web Services. AWS and AWS Certified Cloud Practitioner are trademarks of Amazon.com, Inc. or its affiliates.

← Lesson 11IAM Roles, Federation and Identity Center
Lesson 13Arrives

Preparing a team for AWS certification?

I run hands-on AWS training for teams, from Cloud Practitioner basics to architecture, built around your own environment.