AWS Learning
Storage

S3 Storage Lens

Organization-wide Storage Analytics, 60+ Metrics, Cost & Security Recommendations

Tổng quan

S3 Storage Lens là tính năng analytics cho S3, cung cấp visibility toàn bộ storage của organization với 60+ metricsrecommendations để tối ưu cost và security.

┌─────────────────────────────────────────────────────────────────┐
│                    S3 STORAGE LENS                              │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│   ┌─────────────────────────────────────────────────────────┐   │
│   │                   AWS Organization                      │   │
│   │   ┌─────────┐  ┌─────────┐  ┌─────────┐  ┌─────────┐    │   │
│   │   │Account 1│  │Account 2│  │Account 3│  │Account N│    │   │
│   │   │┌───────┐│  │┌───────┐│  │┌───────┐│  │┌───────┐│    │   │
│   │   ││Bucket ││  ││Bucket ││  ││Bucket ││  ││Bucket ││    │   │
│   │   │└───────┘│  │└───────┘│  │└───────┘│  │└───────┘│    │   │
│   │   └─────────┘  └─────────┘  └─────────┘  └─────────┘    │   │
│   └─────────────────────────────────────────────────────────┘   │
│                             │                                   │
│                              ▼                                  │
│   ┌─────────────────────────────────────────────────────────┐   │
│   │              S3 Storage Lens Dashboard                  │   │
│   │                                                         │   │
│   │   📊 60+ Metrics    📈 Trends    💡 Recommendations     │   │
│   │                                                         │   │
│   └─────────────────────────────────────────────────────────┘   │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Key Features

FeatureMô tả
Organization-wide visibilityXem tất cả accounts, buckets trong 1 dashboard
60+ metricsUsage, activity, cost optimization, security
RecommendationsActionable suggestions để tối ưu
Historical dataLưu đến 15 tháng (với Advanced)
Drill-downTừ Organization → Account → Bucket → Prefix

Dashboards

Default Dashboard

AWS tự động tạo default dashboard miễn phí cho mỗi account:

  • Cập nhật hàng ngày
  • 14 ngày historical data
  • Free metrics only

Custom Dashboards

Bạn có thể tạo custom dashboards với:

ScopeMô tả
Single Account1 account, specific Region hoặc all Regions
OrganizationTất cả accounts trong AWS Organizations
Dashboard Scopes:

Organization Dashboard:
├── Account 1 (us-east-1, eu-west-1)
├── Account 2 (ap-southeast-1)
└── Account 3 (all regions)

Account Dashboard:
├── Bucket A
├── Bucket B
└── Bucket C

Metrics Categories

Free Metrics (28 metrics)

CategoryMetrics ví dụ
SummaryTotal storage, Object count
Cost OptimizationIncomplete MPU bytes, Noncurrent version bytes
Data ProtectionVersioned bytes, Encrypted bytes

Advanced Metrics (thêm 35+ metrics) - $0.20/million objects

CategoryMetrics ví dụ
ActivityGET requests, PUT requests, Bytes downloaded/uploaded
Detailed Status Codes4xx errors, 5xx errors
Advanced Cost OptimizationPer storage class breakdown
Advanced Data ProtectionReplication status, Object Lock status

So sánh Free vs Advanced

FeatureFreeAdvanced
Metrics2860+
Historical data14 days15 months
Prefix aggregation
CloudWatch publishing
Activity metrics
CostFree$0.20/million objects monitored

Recommendations

Storage Lens cung cấp contextual recommendations để tối ưu:

Cost Optimization

┌──────────────────────────────────────────────────────────────────┐
│                    COST RECOMMENDATIONS                          │
├──────────────────────────────────────────────────────────────────┤
│                                                                  │
│  ⚠️ 500GB incomplete multipart uploads found                     │
│     └── Recommendation: Create lifecycle rule to abort           │
│                                                                  │
│  ⚠️ 2TB noncurrent versions in bucket-logs                       │
│     └── Recommendation: Review versioning, add lifecycle         │
│                                                                  │
│  ⚠️ 80% of bucket-archive not accessed in 90 days                │
│     └── Recommendation: Transition to Glacier                    │
│                                                                  │
└──────────────────────────────────────────────────────────────────┘
RecommendationAction
Incomplete MPUAbort multipart uploads không hoàn thành
Noncurrent versionsClean up old versions với lifecycle
Infrequent accessChuyển sang IA/Glacier
Delete markersRemove expired delete markers

Security & Data Protection

RecommendationAction
Unencrypted bucketsEnable SSE
No versioningEnable versioning cho critical data
No replicationSetup CRR/SRR cho DR
Public bucketsReview và restrict access

Pricing

ComponentPrice
Default dashboardFree
Free metricsFree
Advanced metrics$0.20/million objects monitored/month
CloudWatch publishing+ CloudWatch charges

Ví dụ

10 million objects với Advanced metrics:
= 10 × $0.20 = $2.00/month

100 million objects với Advanced metrics:
= 100 × $0.20 = $20.00/month

Use Cases

Use CaseMô tả
Cost optimizationTìm storage không cần thiết, optimize lifecycle
Security auditKiểm tra encryption, public access
Capacity planningTrack growth trends, forecast
ComplianceVerify replication, versioning status
TroubleshootingActivity metrics để debug issues

Export Options

Storage Lens có thể export metrics ra:

DestinationFormatUse Case
S3 BucketCSV, ParquetLong-term storage, custom analysis
CloudWatchMetricsAlarms, dashboards integration
Export to S3:
Storage Lens → Daily Export → S3 Bucket → Athena/QuickSight

Export to CloudWatch:
Storage Lens → CloudWatch Metrics → Alarms → SNS → Email

Liên kết

  • S3 - Main S3 documentation
  • CloudWatch - Monitoring integration

Tài liệu tham khảo