Monday, 30 June 2025

Architecture Pattern - Securing Data

 Securing data in AWS involves a multi-layered strategy across three key dimensions: 

🔒 1. Data at Rest 
🔐 2. Data in Transit 
🕵️‍♂️ 3. Data in Use & Access Control 

Below is a concise, practical checklist with tools, actions, and best practices for securing data in AWS. 

 

✅ 1. Data at Rest (stored data) 

🔹 a. Encrypt Everything 

Service 

How to Secure 

Tool 

S3 

Enable server-side encryption (SSE) 

SSE-S3, SSE-KMS, or SSE-C 

RDS 

Enable encryption at creation 

Use KMS key 

EBS 

Encrypt EBS volumes 

Enable during volume creation 

DynamoDB 

Enable encryption by default 

AWS managed or KMS key 

Redshift, EFS, FSx 

Support built-in encryption 

Use KMS 

Glue, Athena 

Encrypt output in S3 

KMS key 

Backups (e.g., AWS Backup) 

Use encrypted vaults 

KMS-integrated 

Best Practice: Use customer-managed KMS keys for control and audit. 

 

✅ 2. Data in Transit (moving data) 

🔹 a. Use TLS Everywhere 

Channel 

How to Secure 

API Gateway, Load Balancer 

Use HTTPS with ACM certs 

S3 Upload/Download 

Use HTTPS endpoints 

RDS/Aurora 

Use SSL connections from apps 

Lambda to DB/API 

Use VPC + TLS connection string 

VPC Peering/VPN/Direct Connect 

Use IPSec VPN, TLS, or Transit Gateway with encryption 

IoT/MQTT 

Use TLS on MQTT endpoint 

Best Practice: Enforce minimum TLS 1.2 via policies and configurations. 

 

✅ 3. Data in Use & Access Control 

🔹 a. Least Privilege IAM Access 

Control 

Best Practice 

IAM Roles 

Use fine-grained, role-based access 

S3 Policies 

Restrict access by IP, user, time, or condition 

Bucket Ownership 

Enable bucket ownership enforcement 

Data Tags 

Use resource-based tags to enforce access via tag policies 

Temporary Access 

Use STS and IAM roles for short-lived credentials 

🔹 b. Audit Everything 

  • Enable AWS CloudTrail to log data access (e.g., GetObject, PutItem). 

  • Use S3 server access logs or CloudWatch logs. 

  • Enable KMS key usage logging. 

  • Turn on GuardDuty and Macie for threat detection and PII classification. 

 

✅ 4. Additional Data Protection Strategies 

🔹 a. Data Masking & Tokenization 

  • Use Glue, Macie, or custom Lambda to mask PII before storage. 

  • Use Format-Preserving Encryption (FPE) or tokenization for sensitive fields. 

🔹 b. Object Lock & Immutability 

Use Case 

AWS Feature 

Protect from deletion (e.g. logs, compliance) 

Enable S3 Object Lock (WORM) 

Long-term audit data 

Store in AWS Backup Vault with lock enabled 

🔹 c. Cross-region Backup & DR 

  • Enable cross-region replication for S3, RDS snapshots, etc. 

  • Store backups in separate AWS accounts using AWS Backup + KMS. 

 

✅ 5. Security Monitoring 

Tool 

What it Does 

Macie 

Detects sensitive data (e.g., PII, secrets) in S3 

GuardDuty 

Monitors for unusual activity 

Security Hub 

Aggregates findings from Macie, GuardDuty, Inspector 

CloudTrail + CloudWatch 

Logs access to all data resources 

 

🎯 TL;DR: AWS Data Security Best Practices 

Area 

Action 

At Rest 

Use KMS encryption for S3, RDS, EBS, etc. 

In Transit 

Use HTTPS/TLS for all communications 

IAM 

Apply least privilege with roles and conditions 

Audit 

Enable CloudTrail, CloudWatch, and key logging 

Detection 

Use GuardDuty + Macie for security anomalies 

 

No comments:

Post a Comment