Uploaded files in your bucket must be deleted after 90 days and old versions after 30. How do you do that?
BeginnerScenarioS3, RDS and DynamoDB
Answer
Situation read → S3 lifecycle rules.
What I'd do →
- Enable versioning
- Add a rule: expire current objects after 90 days,
NoncurrentVersionExpiration30 days, and abort incomplete multipart uploads after 7 days - Apply:
aws s3api put-bucket-lifecycle-configuration --bucket app-uploads --lifecycle-configuration file://lifecycle.json - Verify with
get-bucket-lifecycle-configuration
Why → Lifecycle is free automation that stops storage costs creeping up.
Interview tip → Mention incomplete multipart uploads as hidden cost.
More on S3, RDS and DynamoDB
You need to host a static website with HTTPS and low latency worldwide. Which services do you use?BeginnerSomeone deleted objects from a versioned bucket. How do you recover and prevent repeats?IntermediateMillions of small objects are being uploaded and S3 returns 503 Slow Down. What do you do?IntermediateLarge 50 GB files upload slowly from remote offices to S3. How do you speed it up?IntermediateDesign a cross-region DR strategy for a critical S3 bucket with a 15-minute RPO.AdvancedAn analytics team needs query access to 10 TB of logs in S3 without loading a warehouse. What do you propose?Intermediate