Lesson 11 of 36 · see all lessons
  1. Start here: cloud concepts (domain 1, 24%)

    1. 1. Start here: the exam, the plan and what you already know
    2. 2. What the cloud is: benefits, service models and deployment models
    3. 3. AWS global infrastructure: Regions, Availability Zones and edge locations
    4. 4. Cloud economics: what you pay for on-premises vs in the cloud
    5. 5. The AWS Well-Architected Framework: six pillars
    6. 6. Moving to AWS: the Cloud Adoption Framework and migration strategies
  2. Security and identity (domain 2, 30%)

    1. 7. The shared responsibility model: who secures what
    2. 8. IAM basics: users, groups, roles and policies
    3. 9. Protecting the root user, MFA and credentials
    4. 10. Identity at scale: IAM Identity Center, federation and cross-account access
    5. 11. Encryption and keys: protecting data at rest and in transit
    6. 12. Threat protection: Shield, WAF, GuardDuty, Inspector and Security Hub
  3. Governance, ways of working and compute (domains 2 and 3)

    1. 13. Logging, auditing and compliance: CloudWatch, CloudTrail, Config and Artifact
    2. 14. Governing many accounts: Organizations, Control Tower and Service Catalog
    3. 15. Ways to use AWS: console, CLI, SDKs and infrastructure as code
    4. 16. Amazon EC2: virtual servers and instance types
    5. 17. Elasticity: Auto Scaling and Elastic Load Balancing
    6. 18. Containers and serverless: ECS, EKS, Fargate, Lambda and more
  4. Storage, databases and networking (domain 3, 34%)

    1. 19. Block and file storage: EBS, instance store, EFS and FSx
    2. 20. Amazon S3: buckets, storage classes and lifecycle policies
    3. 21. Hybrid storage, backup and disaster recovery
    4. 22. Databases: RDS, Aurora, DynamoDB, ElastiCache and more
    5. 23. Networking: VPCs, subnets, gateways and security layers
    6. 24. Connecting and delivering: Route 53, CloudFront, VPN and Direct Connect
  5. Analytics, AI, integration and more (domain 3)

    1. 25. Analytics services: Athena, Glue, Kinesis, Redshift and Quick
    2. 26. AI and machine learning services: SageMaker AI, Lex, Rekognition and Amazon Q
    3. 27. App integration and business apps: SQS, SNS, EventBridge, Connect and SES
    4. 28. Developer tools, end-user computing, Amplify and IoT
  6. Billing, pricing and support, then exam practice (domain 4, 12%)

    1. 29. Pricing models: On-Demand, Savings Plans, Reserved, Spot and Dedicated
    2. 30. Billing and cost tools: Budgets, Cost Explorer, Pricing Calculator and tags
    3. 31. AWS Support plans, Trusted Advisor and where to get help
    4. 32. Final review and exam day: every decision on one page
    5. 33. Mock exam 1
    6. 34. Mock exam 2 Exam Pack · $12
  7. Extra practice: mock exams 3 and 4

    1. 35. Mock exam 3 Exam Pack · $12
    2. 36. Mock exam 4 Exam Pack · $12
See the leaderboard

17 min

Encryption and keys: protecting data at rest and in transit

Explain encryption at rest and in transit and choose between KMS, CloudHSM, ACM and Macie.

By the end of this lesson you can

  • Tell encryption at rest from encryption in transit
  • Choose AWS KMS or AWS CloudHSM from a scenario's key-control needs
  • Recognize when AWS Certificate Manager or Amazon Macie fits
  • Explain who is responsible for turning encryption on

From earlier lessons · 1 of 2

A retailer's staff need one sign-in to eight AWS accounts in AWS Organizations, using their existing Okta logins. Which service fits?

Pick one answer.

From earlier lessons · 2 of 2

A partner company's AWS account needs temporary access to read one of your S3 buckets. What should you set up?

Pick one answer.

Cedar Lane Books is moving its orders database to AWS. It holds names, home addresses and order history for 200,000 customers. The finance director asks two questions. "If someone copies our data, can they read it?" And "Who holds the keys, us or Amazon?"

[3]

At rest and in transit

Exam depth: know it cold.

Encryption scrambles data so only someone with the right key can read it.

  • Encryption in transit protects data while it moves, for example from a shopper's browser to your website. It uses TLS (Transport Layer Security), the padlock you see as HTTPS.
  • Encryption at rest protects stored data on disks, in databases and in backups.

In AWS, encryption is built into the services. Amazon S3 encrypts every new object by default with SSE-S3, which uses keys S3 manages. It has done this since January 5, 2023, at no extra cost. Objects uploaded before then aren't encrypted retroactively.

[100][101]

Where Cedar Lane's data needs protectionShopper's browserWebsite on AWSOrders databaseBook covers in Amazon S3Nightly backupsIn transit: HTTPS with TLS onevery hop.At rest: encrypted on disk.At rest: SSE-S3 on by default.

[100]

Cedar Lane Books wants card checkout pages protected while data travels between the shopper's browser and its website. Which protection is this?

Pick one answer.

Who is responsible for encryption?

Exam depth: know it cold.

Under the shared responsibility model, AWS builds and runs the encryption tools. You manage your data, including your encryption options and network traffic protection.

So you decide what to encrypt, with which kind of key, and who may use that key. AWS turns some encryption on by default, as S3 does. But choosing a key you control and setting its permissions stays your job.

[102][104]

AWS KMS: managed encryption keys

Exam depth: know it cold.

AWS Key Management Service (AWS KMS) lets you create and control the keys that encrypt your data. AWS runs the hardware. Keys are protected by hardware security modules validated to FIPS 140-3 Level 3, a US government security standard. They never leave KMS unencrypted.

Many AWS services, such as Amazon S3, Amazon EBS and Amazon RDS, can encrypt with a KMS key. A key policy says who may use or manage each key.

Every call to KMS, including each use of a key, is recorded by AWS CloudTrail. Auditors can see who used which key, and when.

[103][105]

KMS keys come in three kinds.

Customer managed keyAWS managed keyAWS owned key
Who creates itYou.An AWS service, in your account.An AWS service, in its own account.
Your controlFull: key policy, rotation, disable, delete.View it and audit its use only.None. You don't see it.
RotationOptional, you choose.Automatic, every year.Set by AWS.
CostMonthly fee plus use.No monthly fee.No charge to you.

Decision rule: if the scenario says the company must control who uses the key, rotate it or disable it, pick a customer managed key.

[104]

A company must encrypt data in Amazon S3 and Amazon RDS with keys it controls. It must set who can use each key and see an audit log of every use. Which option meets these requirements with the LEAST operational overhead?

Pick one answer.

[104][105]

AWS CloudHSM: your own dedicated hardware

Exam depth: know it cold.

A hardware security module (HSM) is a tamper-resistant device that stores keys and does encryption. AWS CloudHSM gives you HSMs in the AWS Cloud that are single-tenant: dedicated to you, not shared with other customers.

You get full control of the keys and algorithms. You manage the HSM's users yourself, outside IAM, and AWS can't see your keys. In FIPS mode, the HSMs are validated to FIPS 140-2 or FIPS 140-3 Level 3.

The price of that control is more work for you. If you just want managed keys, AWS itself points you to KMS.

[106]

[103][106]

AWS KMS: AWS runs the vault, you hold the keys. CloudHSM: you get your own vault, and you run it. Picture: Whiteboard doodle style, black and blue marker on white.

AWS Certificate Manager: certificates for HTTPS

Exam depth: know it cold.

An HTTPS site needs an SSL/TLS certificate. It's a file that proves the site is really yours and sets up encryption in transit.

AWS Certificate Manager (ACM) creates, stores and renews these certificates. It works with Elastic Load Balancing, Amazon CloudFront and Amazon API Gateway.

There's no extra charge for the certificates ACM manages. You pay only for the resources that use them. ACM also renews the certificates it issues. With DNS validation, renewal is automatic, so they don't expire by surprise. Certificates you import from another provider aren't renewed for you.

[107][108][109]

Cedar Lane Books puts its website behind an Application Load Balancer. It wants HTTPS with a public certificate that renews automatically, at no extra certificate cost. Which AWS service should it use?

Pick one answer.

[107][109]

Amazon Macie: find sensitive data in S3

Exam depth: know it cold.

You can't protect personal data you don't know you have. Amazon Macie finds it. It uses machine learning and pattern matching to discover sensitive data, such as PII (personally identifiable information: names, addresses, card numbers) in Amazon S3.

Macie also keeps an inventory of your S3 buckets and checks their security. If a bucket becomes public, Macie raises a finding, an alert for you to review.

Macie finds and reports. It doesn't encrypt anything itself. Remember it as: Macie, S3, personal data.

[110]

Pick the encryption tool

Exam depth: know it cold.

Match the need in the question to the service.

The scenario saysPick
Create and control encryption keys, integrated with AWS services, audit key use.AWS KMS
Single-tenant, dedicated HSM, exclusive control of the hardware.AWS CloudHSM
SSL/TLS certificate, HTTPS, free, automatic renewal.AWS Certificate Manager (ACM)
Discover PII or sensitive data in S3.Amazon Macie
Store and rotate a database password.AWS Secrets Manager (lesson 9)

Decision rule: keys for stored data go to KMS unless the word is "dedicated". Certificates go to ACM. Finding personal data goes to Macie.

[103][106][107][110]

Rendering diagram…
Finding data, then certificates, then the word "dedicated". Everything else about keys is KMS.

[106][110]

Exam-style practice

A company has thousands of files in Amazon S3. It needs to find which files contain customer names, addresses and passport numbers. Which AWS service meets this requirement?

Pick one answer.

[110]

A bank's regulator requires that its encryption keys live in single-tenant hardware the bank alone controls, with AWS unable to access the keys. Which AWS service meets this requirement?

Pick one answer.

[106]

Under the AWS shared responsibility model, which task is the customer's responsibility?

Pick one answer.

[102]

FlashcardsIndex cardsFlashcards ⚡

Card 1 of 17

[100][101][104][105][106][107][110]

Worth keeping

  1. In transit means moving (TLS, HTTPS). At rest means stored. You want both.
  2. S3 encrypts new objects by default, but choosing keys and permissions is your job.
  3. KMS for managed keys with CloudTrail logs. CloudHSM only when the word is single-tenant or dedicated.
  4. ACM gives free, auto-renewing TLS certificates. Macie finds personal data in S3.

On the job

Cedar Lane's answer to the finance director fits on one slide. Data is encrypted in transit with ACM certificates and at rest with a KMS customer managed key. Cedar Lane controls the key policy, and CloudTrail shows every use. Macie scans the S3 exports for stray customer data.

Security questionnaires from big customers ask exactly these things. Knowing the four service names lets a salesperson or PM answer without waiting for an engineer.

Encrypted data is safe if stolen. But what about the attacker flooding the site on Black Friday, or probing the search box for a way in? Next lesson: Shield, WAF, GuardDuty and the rest of the security guard team.

Leaderboard

Loading…

50 XP for each lesson you finish, 10 for each right answer. Names show only for learners who turn on Show me on leaderboards.

Embed this practice on your site

Free for classrooms, blogs and study groups. Paste this into any page that accepts HTML.

Report a copyright problem with this lesson

Sources for this lesson (12)

Each fact in the lesson is marked with the number of the page it comes from.

  1. [3]AWS: CLF-C02 Content Domain 2: Security and Compliance
  2. [100]AWS: Protecting data with encryption (Amazon S3)
  3. [101]AWS: Default encryption FAQ (Amazon S3)
  4. [102]AWS: Shared Responsibility Model
  5. [103]AWS: AWS Key Management Service
  6. [104]AWS: AWS KMS keys
  7. [105]AWS: Logging AWS KMS API calls with AWS CloudTrail
  8. [106]AWS: What is AWS CloudHSM?
  9. [107]AWS: What is AWS Certificate Manager?
  10. [108]AWS: Managed automation with integrated services (ACM)
  11. [109]AWS: Managed certificate renewal in AWS Certificate Manager
  12. [110]AWS: What is Amazon Macie?