By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
For AWS Solutions Architect – Associate (SAA-C03) and Real-World Deployments
You’re a cloud engineer at a SaaS company. Your team stores 10TB of user-uploaded files in S3—logs, backups, and media assets. Over time: - Costs explode because old files sit in expensive Standard storage.- Compliance audits fail because you can’t prove data is retained (or deleted) per policy.- A region outage wipes out critical backups because they weren’t replicated.
Standard
S3 Lifecycle Policies and Replication (CRR/SRR) are your tools to: ✅ Slash storage costs by automatically moving data to cheaper tiers (e.g., Glacier Deep Archive).✅ Enforce retention/deletion rules (e.g., "Delete logs after 90 days").✅ Survive regional disasters by replicating data to another AWS region (CRR) or account (SRR).
Glacier Deep Archive
Ignoring this?- Your AWS bill will look like a phone number.- You’ll fail compliance (GDPR, HIPAA, SOC2).- A single AZ failure could mean permanent data loss.
Production Insight:- Never store short-lived data (e.g., logs <30 days) in Standard-IA—you’ll pay the 30-day minimum charge.- Glacier Deep Archive is cheaper than tape—use it for 7+ year retention (e.g., medical records).
Definition: Rules that automatically transition or expire objects based on age or tags.Key Actions:- Transition: Move to a cheaper storage class (e.g., Standard → Glacier).- Expiration: Permanently delete objects (e.g., "Delete logs after 90 days").- Noncurrent Version Expiration: Delete old versions of objects (for versioned buckets).
Glacier
Production Insight:- Lifecycle policies are free—but misconfigurations cost thousands.- Always test with a small subset of data before applying to production.
us-east-1
eu-west-1
Key Requirements:1. Source and destination buckets must have versioning enabled.2. IAM role must have s3:GetObject (source) and s3:ReplicateObject (destination).3. Replication only applies to new objects (unless you use S3 Batch Operations to backfill).
s3:GetObject
s3:ReplicateObject
Production Insight:- CRR is not a backup—if you delete an object in the source, it deletes in the destination (unless you use MFA Delete).- SRR is great for multi-account setups (e.g., centralizing logs from dev/staging/prod accounts).
✅ AWS account with admin IAM permissions.✅ Two S3 buckets (one source, one destination for CRR).✅ AWS CLI installed (aws --version).
aws --version
Goal: Automatically move logs older than 30 days to Glacier Flexible Retrieval and delete them after 365 days.
Glacier Flexible Retrieval
aws s3api create-bucket --bucket my-logs-bucket-$(date +%s) --region us-east-1
aws s3api put-bucket-versioning --bucket my-logs-bucket-123456789 --versioning-configuration Status=Enabled
echo "Test log entry" > test-log.txt aws s3 cp test-log.txt s3://my-logs-bucket-123456789/logs/2023-10-01.log
{ "Rules": [ { "ID": "MoveOldLogsToGlacier", "Status": "Enabled", "Filter": { "Prefix": "logs/" }, "Transitions": [ { "Days": 30, "StorageClass": "GLACIER" } ], "Expiration": { "Days": 365 } } ] }
Save as lifecycle-policy.json.
lifecycle-policy.json
aws s3api put-bucket-lifecycle-configuration \ --bucket my-logs-bucket-123456789 \ --lifecycle-configuration file://lifecycle-policy.json
aws s3api get-bucket-lifecycle-configuration --bucket my-logs-bucket-123456789
Expected Output:
Goal: Replicate all objects from us-east-1 to eu-west-1 for disaster recovery.
aws s3api create-bucket --bucket my-logs-bucket-replica-$(date +%s) --region eu-west-1 --create-bucket-configuration LocationConstraint=eu-west-1
aws s3api put-bucket-versioning --bucket my-logs-bucket-replica-123456789 --versioning-configuration Status=Enabled --region eu-west-1
trust-policy.json
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "s3.amazonaws.com" }, "Action": "sts:AssumeRole" } ] }
aws iam create-role --role-name S3ReplicationRole --assume-role-policy-document file://trust-policy.json
replication-policy.json
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetReplicationConfiguration", "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::my-logs-bucket-123456789" ] }, { "Effect": "Allow", "Action": [ "s3:GetObjectVersion", "s3:GetObjectVersionAcl", "s3:GetObjectVersionTagging", "s3:PutObject", "s3:PutObjectAcl", "s3:PutObjectTagging", "s3:ReplicateObject", "s3:ReplicateDelete", "s3:ReplicateTags" ], "Resource": [ "arn:aws:s3:::my-logs-bucket-123456789/*", "arn:aws:s3:::my-logs-bucket-replica-123456789/*" ] } ] }
aws iam put-role-policy --role-name S3ReplicationRole --policy-name S3ReplicationPolicy --policy-document file://replication-policy.json
{ "Role": "arn:aws:iam::123456789012:role/S3ReplicationRole", "Rules": [ { "ID": "ReplicateAllLogs", "Status": "Enabled", "Priority": 1, "Filter": { "Prefix": "logs/" }, "Destination": { "Bucket": "arn:aws:s3:::my-logs-bucket-replica-123456789", "StorageClass": "STANDARD" } } ] }
Save as replication-config.json.
replication-config.json
aws s3api put-bucket-replication --bucket my-logs-bucket-123456789 --replication-configuration file://replication-config.json
echo "Replication test" > test-replication.txt aws s3 cp test-replication.txt s3://my-logs-bucket-123456789/logs/
aws s3 ls s3://my-logs-bucket-replica-123456789/logs/ --region eu-west-1
2023-10-01 12:00:00 18 test-replication.txt
Intelligent-Tiering
Standard-IA
StorageClassAnalysis
bash aws s3api put-bucket-analytics-configuration --bucket my-bucket --id "MoveToGlacier" --analytics-configuration file://analytics-config.json
bash aws s3api put-bucket-lifecycle-configuration --bucket my-bucket --lifecycle-configuration '{ "Rules": [{ "ID": "DeleteIncompleteUploads", "Status": "Enabled", "AbortIncompleteMultipartUpload": { "DaysAfterInitiation": 7 } }] }'
bash aws s3api put-object-tagging --bucket my-bucket --key "logs/2023-10-01.log" --tagging 'TagSet=[{Key=Environment,Value=Prod}]'
Prefix
logs/
S3 Batch Operations
bash aws s3control create-job --account-id 123456789012 --operation '{ "S3ReplicateObject": {} }' --report '{ "Bucket": "arn:aws:s3:::my-replication-report-bucket", "Prefix": "replication-job-report", "Format": "Report_CSV_20180820" }' --manifest '{ "Spec": { "Format": "S3BatchOperations_CSV_20180820", "Fields": ["Bucket", "Key"] }, "Location": { "ObjectArn": "arn:aws:s3:::my-manifest-bucket/manifest.csv", "ETag": "etag-from-manifest-file" } }' --priority 10
ReplicationLatency
BytesPendingReplication
bash aws s3api put-bucket-notification-configuration --bucket my-bucket --notification-configuration '{ "EventBridgeConfiguration": {} }'
bash aws s3api put-bucket-inventory-configuration --bucket my-bucket --id "WeeklyInventory" --inventory-configuration '{ "Destination": { "S3BucketDestination": { "Bucket": "arn:aws:s3:::my-inventory-bucket", "Prefix": "inventory-reports", "Format": "CSV" } }, "IsEnabled": true, "Filter": { "Prefix": "logs/" }, "Id": "WeeklyInventory", "IncludedObjectVersions": "Current", "Schedule": { "Frequency": "Weekly" }, "OptionalFields": ["Size", "StorageClass", "ReplicationStatus"] }'
AccessDenied
❌ Standard-IA (too expensive for rare access).
"How do you ensure objects are replicated to another region for disaster recovery?"
❌ Enable S3 Versioning alone (only protects against accidental deletions).
"A company wants to delete logs after 90 days. What’s the most cost-effective way?"
Expiration
"You have a bucket (my-app-logs) with 10,000 log files. You need to: 1. Move logs older than 30 days to Glacier Flexible Retrieval.
my-app-logs
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.