Lesson 1 of 4 Data Classification and Encryption at Rest

Implementing a Data Classification Scheme

This lesson explains how a data classification scheme assigns each data set a sensitivity level and required controls, and how CloudOps engineers implement and enforce it.

Learning outcomes

After completing this lesson, you will be able to:

  • Map classification levels to controls.
  • Enforce classification with tags.
  • Discover sensitive data with Amazon Macie.

Classification levels and controls

A typical scheme has four levels, such as Public, Internal, Confidential and Restricted. Each level maps to required controls: encryption with a customer managed key, access limited to named roles, logging of data access, retention periods, permitted Regions and whether data may leave the organisation. The following table shows an example mapping.

LevelExample dataRequired controls
PublicMarketing imagesIntegrity protection; public access allowed only through CloudFront
InternalInternal reportsEncryption at rest, organisation-only access
ConfidentialCustomer recordsCustomer managed KMS key, CloudTrail data events, no public access
RestrictedPayment or health dataDedicated accounts, strict key policies, Macie discovery, Object Lock where required
Sort into groups

Classify the data

Exam skills 4.2.1

Assign each kind of data to a classification level.

Log in to try this activity Interactive activities are free with an account.

Tags as the enforcement mechanism

The classification is recorded as a tag on accounts, buckets, databases, volumes and other resources, for example DataClassification=Confidential. Tag policies in AWS Organizations standardise the key and allowed values, and enforcement prevents non-compliant values on supported resource types. An SCP or IAM policy can deny creating resources without the tag, using the aws:RequestTag and aws:TagKeys condition keys, and deny removing or changing it. Attribute-based access control (ABAC) then grants access when a principal's tag matches the resource's tag, for example only principals tagged Clearance=Confidential can read resources tagged Confidential. AWS Config rules such as required-tags report untagged resources.

{
  "Sid": "DenyBucketCreationWithoutClassification",
  "Effect": "Deny",
  "Action": "s3:CreateBucket",
  "Resource": "*",
  "Condition": {"Null": {"aws:RequestTag/DataClassification": "true"}}
}

The following diagram compares a request with the tag and one without it.

Enforcing a classification tag. A tag policy standardises the DataClassification key and its allowed values. An SCP denies creating resources without the tag, using aws:RequestTag and aws:TagKeys, and denies removing or changing it, so attribute-based access control can rely on it.
Denying tag removal as well keeps the classification from being changed after creation.

Discovering sensitive data with Amazon Macie

Classification labels can be wrong or missing. Amazon Macie discovers sensitive data in S3 using managed data identifiers (names, addresses, passport and national ID numbers, credit card numbers, credentials and keys) and custom data identifiers (regular expressions with keywords, for example internal customer numbers). Automated sensitive data discovery samples objects across all buckets continuously and gives each bucket a sensitivity score; sensitive data discovery jobs analyse chosen buckets fully, once or on a schedule. Macie also produces policy findings for buckets that are public, unencrypted or shared externally. Findings go to Security Hub and EventBridge, so a Macie finding in a bucket tagged Internal can trigger reclassification and stricter controls.

Select all that apply

What Macie does

Exam skills 4.2.1 · 4.2.5

Identify what Amazon Macie provides.

Log in to try this activity Interactive activities are free with an account.
Worked example

Misclassified data

Macie's automated discovery reports high-severity findings for credit card numbers in a bucket tagged DataClassification=Internal. An EventBridge rule on Macie findings with severity High starts an Automation runbook that changes the tag to Restricted, enables default encryption with the Restricted customer managed key, turns on CloudTrail data events for the bucket and notifies the data owner. Because ABAC policies grant access by classification tag, principals without Restricted clearance lose access immediately.

Check yourself

How does ABAC grant access?

Show answer

When the principal's tags match the resource's tags.

Exam Tips

Remember for the exam

  • Record classification as tags; enforce with tag policies and SCP conditions on aws:RequestTag.
  • ABAC grants access when principal and resource tags match.
  • Macie discovers sensitive data in S3 with managed and custom data identifiers.
  • Route Macie findings through EventBridge to remediate misclassified data.