Security
Amazon Macie
Sensitive Data Discovery trong S3, PII Detection, Compliance
Tổng quan
Amazon Macie là một dịch vụ bảo mật dữ liệu được quản lý hoàn toàn, sử dụng machine learning và pattern matching để tự động phát hiện, phân loại và bảo vệ dữ liệu nhạy cảm trong Amazon S3.
Các chức năng chính
| Chức năng | Mô tả |
|---|---|
| Sensitive Data Discovery | Tự động quét và phát hiện dữ liệu nhạy cảm trong S3 |
| Data Classification | Phân loại dữ liệu theo mức độ nhạy cảm |
| Security Assessment | Đánh giá cấu hình bảo mật S3 bucket |
| Continuous Monitoring | Giám sát liên tục các thay đổi về bảo mật |
| Compliance Support | Hỗ trợ tuân thủ GDPR, HIPAA, PCI-DSS |
Các loại dữ liệu nhạy cảm Macie phát hiện
1. PII (Personally Identifiable Information)
2. Financial Data
| Loại dữ liệu | Ví dụ |
|---|---|
| Credit Card Numbers | 4111-1111-1111-1111 |
| Bank Account Numbers | Số tài khoản ngân hàng |
| CVV/CVC Codes | Mã bảo mật thẻ |
| Financial Statements | Báo cáo tài chính |
3. Credentials & Secrets
4. Healthcare Data (PHI - Protected Health Information)
- Medical records
- Health insurance information
- Prescription data
Kiến trúc hoạt động
Các loại Findings (Phát hiện)
1. Sensitive Data Findings
Phát hiện khi Macie tìm thấy dữ liệu nhạy cảm trong S3 objects.
| Finding Type | Mô tả |
|---|---|
SensitiveData:S3Object/Personal | Phát hiện PII |
SensitiveData:S3Object/Financial | Phát hiện dữ liệu tài chính |
SensitiveData:S3Object/Credentials | Phát hiện credentials |
SensitiveData:S3Object/CustomIdentifier | Phát hiện dữ liệu theo custom pattern |
2. Policy Findings
Phát hiện các vấn đề về cấu hình bảo mật S3.
| Finding Type | Mô tả |
|---|---|
Policy:IAMUser/S3BucketPublic | Bucket được public access |
Policy:IAMUser/S3BucketSharedExternally | Bucket được share ra ngoài AWS account |
Policy:IAMUser/S3BucketReplicatedExternally | Bucket được replicate ra account khác |
Policy:IAMUser/S3BlockPublicAccessDisabled | Block public access bị tắt |
Sensitive Data Discovery Jobs
Cách tạo Discovery Job
Job Types
| Type | Mô tả | Use Case |
|---|---|---|
| One-time Job | Chạy 1 lần duy nhất | Audit ban đầu, kiểm tra ad-hoc |
| Scheduled Job | Chạy theo lịch định kỳ | Monitoring liên tục, compliance |
Custom Data Identifiers
Cho phép bạn tạo regex patterns riêng để phát hiện dữ liệu đặc thù của tổ chức.
Ví dụ Custom Identifiers
Components
| Component | Mô tả | Required |
|---|---|---|
| Regex | Pattern để match dữ liệu | ✅ Yes |
| Keywords | Từ khóa phải xuất hiện gần match | ❌ Optional |
| Ignore Words | Từ để loại trừ kết quả false positive | ❌ Optional |
| Maximum Match Distance | Khoảng cách tối đa giữa keyword và match | ❌ Optional |
Integration với các AWS Services
1. Amazon EventBridge
Use Cases:
- Tự động encrypt S3 object khi phát hiện sensitive data
- Gửi notification khi có policy violation
- Trigger workflow để review và xử lý
2. AWS Security Hub
3. Amazon CloudWatch
- Metrics về số lượng findings
- Alerts khi vượt ngưỡng
- Dashboard monitoring
So sánh với các dịch vụ bảo mật khác
| Service | Focus | Target Resources |
|---|---|---|
| Amazon Macie | Sensitive data discovery | S3 only |
| Amazon GuardDuty | Threat detection | AWS accounts, workloads |
| Amazon Inspector | Vulnerability assessment | EC2, ECR, Lambda |
| AWS Security Hub | Aggregation & Compliance | All security services |
| AWS Config | Configuration compliance | AWS resources |
Pricing Model
Chi phí Macie
| Component | Pricing |
|---|---|
| S3 Bucket Evaluation | Miễn phí (bucket inventory & evaluation) |
| Sensitive Data Discovery | Tính theo GB data được quét |
| First 1 GB/month | Miễn phí (Free Tier) |
Ví dụ tính chi phí
[!TIP] Sử dụng Sampling để giảm chi phí khi quét bucket lớn. Ví dụ: chỉ quét 10% objects thay vì 100%.
Best Practices
1. Thiết lập ban đầu
2. Ongoing Operations
| Practice | Mô tả |
|---|---|
| Scheduled Jobs | Chạy discovery jobs định kỳ (weekly/monthly) |
| Review Findings | Review và triage findings thường xuyên |
| Update Custom Identifiers | Cập nhật patterns khi có data types mới |
| Multi-account | Sử dụng AWS Organizations để quản lý Macie centrally |
3. Cost Optimization
- Sử dụng sampling cho buckets lớn
- Exclude các buckets không chứa user data (logs, backups)
- Chạy one-time jobs thay vì scheduled cho data ít thay đổi
Use Cases thực tế
1. GDPR Compliance
2. Security Audit
3. Data Classification
Exam Tips cho Cloud Practitioner
[!IMPORTANT] Keywords để nhớ Macie:
- S3 + Sensitive Data + Machine Learning
- PII (Personally Identifiable Information)
- Data Discovery & Classification
- Compliance (GDPR, HIPAA, PCI-DSS)
Câu hỏi thường gặp
| Câu hỏi | Trả lời |
|---|---|
| Macie hoạt động với services nào? | Chỉ Amazon S3 |
| Macie dùng công nghệ gì để phát hiện? | Machine Learning + Pattern Matching |
| Macie giúp gì cho compliance? | Phát hiện PII, hỗ trợ GDPR, HIPAA, PCI-DSS |
| Macie findings gửi đi đâu? | EventBridge, Security Hub, CloudWatch |