BrainyBeeBrainyBee
ExploreBlogStart Studying
HomeAWS Certified DevOps Engineer - Professional (DOP-C02)Data Management and Security: Classification, Encryption, and Access Control
Study Guide945 words

Data Management and Security: Classification, Encryption, and Access Control

Data management (for example, data classification, encryption, key management, access controls)

Data Management and Security: Classification, Encryption, and Access Control

This study guide focuses on the critical pillars of data protection within the AWS ecosystem, specifically tailored for the DevOps Engineer Professional (DOP-C02) exam. We explore how to automate data discovery, manage encryption lifecycles, and enforce robust access controls.

Learning Objectives

After studying this guide, you should be able to:

  • Automate the discovery and classification of sensitive data using Amazon Macie.
  • Differentiate between AWS KMS key types (Customer Managed, AWS Managed, and AWS Owned).
  • Implement envelope encryption and explain the relationship between KMS keys and data keys.
  • Configure automated key rotation and secret rotation for machine identities.
  • Design access control strategies combining IAM policies, KMS key policies, and Secrets Manager.

Key Terms & Glossary

  • Envelope Encryption: The practice of encrypting plaintext data with a data key, and then encrypting that data key under another key (KMS Key).
  • KMS Key: A logical representation of a master key, containing the key ID, creation date, description, and key material.
  • Amazon Macie: A fully managed data security and data privacy service that uses machine learning to discover and protect sensitive data in S3.
  • AWS Secrets Manager: A service used to manage, rotate, and retrieve database credentials, API keys, and other secrets.
  • CMK (Customer Master Key): The older term for KMS keys. Note that modern documentation uses "KMS Key."

The "Big Idea"

Data management in AWS is a defense-in-depth strategy. It isn't just about "turning on encryption." It is a lifecycle that begins with Classification (knowing what data is sensitive), followed by Protection (encrypting at rest and in transit), and finalized by Governance (auditing via CloudTrail and controlling access via IAM/KMS policies). Automation is the glue that ensures these controls remain consistent across multi-account and multi-region environments.

Formula / Concept Box

ConceptApplicationLogic
Envelope EncryptionProtecting large datasetsData is encrypted locally with a Data Key; Data Key is protected by KMS
KMS Key RotationSecurity ComplianceCustomer Managed Keys can rotate once per year (365 days)
Secrets RotationCredential SecuritySecrets Manager uses Lambda to update credentials in the DB and AWS simultaneously

Hierarchical Outline

  1. Data Discovery & Classification
    • Amazon Macie: Scans S3 buckets for PII (Personally Identifiable Information).
    • Automated Remediation: Triggering Lambda functions when Macie finds unencrypted sensitive data.
  2. Encryption at Rest
    • AWS KMS: Managed service for creating and controlling keys.
    • CloudHSM: Single-tenant hardware security module for strict compliance (FIPS 140-2 Level 3).
  3. Encryption in Transit
    • AWS Certificate Manager (ACM): Provisioning and renewing SSL/TLS certificates.
    • Integration: ALB, CloudFront, and API Gateway integration.
  4. Access Control & Auditing
    • Key Policies: Resource-based policies that define who can use/manage a KMS key.
    • IAM Policies: User-based permissions.
    • AWS CloudTrail: Logs every API call made to KMS for auditing.

Visual Anchors

The Envelope Encryption Flow

Loading Diagram...
Figure 1 — Mermaid diagram

KMS Key Hierarchy & Responsibility

Compiling TikZ diagram…
⏳
Running TeX engine…
This may take a few seconds
Figure 2 — TikZ diagram

Definition-Example Pairs

  • Data Classification: The process of labeling data based on sensitivity.
    • Example: Using Amazon Macie to tag S3 objects as "PII" or "Internal Only" based on content patterns like credit card numbers.
  • Attribute-Based Access Control (ABAC): Controlling access based on tags rather than fixed names.
    • Example: Allowing a developer to use a KMS key only if the key's tag Project matches the user's Project tag.
  • Automated Credential Rotation: Updating secrets without manual intervention.
    • Example: Configuring AWS Secrets Manager to rotate an RDS password every 30 days via a Lambda function.

Worked Examples

Example 1: Creating a Cross-Account KMS Key Policy

To allow an IAM role in Account B (555566667777) to use a KMS key in Account A, you must update the Key Policy in Account A:

json
{ "Sid": "Allow use of the key", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::555566667777:role/ExternalAppRole" }, "Action": [ "kms:Encrypt", "kms:Decrypt", "kms:ReEncrypt*", "kms:GenerateDataKey*", "kms:DescribeKey" ], "Resource": "*" }

[!IMPORTANT] For cross-account access to work, the IAM role in Account B also needs an identity-based policy allowing the kms actions on the Key's ARN.

Checkpoint Questions

  1. What is the maximum size of data that can be directly encrypted using a KMS Key without envelope encryption? ($4 KB$)
  2. Which KMS key type allows the customer to define the rotation schedule and key policy? (Customer Managed Key)
  3. How does AWS CloudHSM differ from AWS KMS regarding tenancy? (CloudHSM is single-tenant/dedicated; KMS is multi-tenant).
  4. Which service would you use to automatically discover unencrypted sensitive data in S3? (Amazon Macie).

Muddy Points & Cross-Refs

  • AWS Managed vs. AWS Owned Keys: You can see AWS Managed Keys (e.g., aws/s3) in your account and view their policies, but you cannot change them. You cannot see or manage AWS Owned Keys; they are used by AWS services behind the scenes.
  • Key Deletion: You cannot delete a KMS key immediately. There is a mandatory waiting period of 7 to 30 days to prevent accidental data loss.
  • CloudHSM Integration: Use KMS with a "Custom Key Store" if you need to use KMS APIs but want the keys stored on a dedicated CloudHSM cluster.

Comparison Tables

KMS Key Type Comparison

FeatureCustomer ManagedAWS ManagedAWS Owned
Visible in Account?YesYesNo
Manage Permissions?Yes (Key Policies)No (View only)No
Automatic Rotation?Optional (yearly)Required (every 3 years)Managed by AWS
Audit in CloudTrail?YesYesNo

KMS vs. Secrets Manager

FeatureAWS KMSAWS Secrets Manager
Primary UseEncrypting small data or Data KeysManaging credentials (API keys, DB passwords)
Rotation LogicRotates key material onlyRotates the secret value (e.g., resets DB password)
Max Payload4 KB64 KB
All AWS Certified DevOps Engineer - Professional (DOP-C02) Study Resources

Related Notes

  • Mastering AWS Alerting and Automated Remediation1,050 words
  • Study Guide: Analyzing Failed Deployments in AWS940 words
  • Incident Analysis: Troubleshooting Failed Processes in AWS1,050 words
  • Mastering AWS Monitoring & Security Analytics: Logs, Metrics, and Findings1,050 words
  • AWS Log Analysis: Athena, CloudWatch Insights, and OpenSearch920 words
  • Analyzing Real-Time Log Streams with Amazon Kinesis Data Streams985 words
  • CloudWatch Anomaly Detection Alarms: Professional Study Guide820 words
  • AWS Application Storage Patterns: EBS, EFS, and S31,054 words
  • Lab: Automating Security Controls and Data Protection with AWS Secrets Manager and Config942 words
  • Master Study Guide: Automating Security Controls & Data Protection (AWS DOP-C02)1,184 words
  • Mastering AWS CloudFormation StackSets: Multi-Account & Multi-Region Orchestration895 words
  • Mastering System Configuration Changes in AWS945 words

Ready to study AWS Certified DevOps Engineer - Professional (DOP-C02)?

Practice tests, flashcards, and all study notes — free, no sign-up.

Start Studying

Ready to study AWS Certified DevOps Engineer - Professional (DOP-C02)?

Practice tests, flashcards, and all study notes — free, no sign-up needed.

Start Studying — Free
AWS Certified DevOps Engineer - Professional (DOP-C02) ResourcesExplore All HivesBlogHome

© 2026 BrainyBee. Free AI-powered exam prep.

Loading Diagram...
Flowchart, top to bottom. KMS Service connects to KMS Key (GenerateDataKey). B connects to Encrypted Data Key (Encrypted). B connects to Plaintext Data Key (Plaintext). D connects to Encryption Engine. Plaintext Data connects to E. E connects to Encrypted Data Storage. C connects to G.