SadServers
  • Scenarios
  • Labs
    All Labs Linux & Bash Web Servers Databases Data Processing Docker Kubernetes CI/CD Infrastructure As Code Observability Tooling / Applications
  • Dashboard
  • Solutions
    For Individuals For Businesses
  • Ranking
  • Newsletter
  • FAQ
  • Documentation
    Support Pro Accounts Pro+ Accounts Business Accounts Gift API CLI/TUI Privacy Troubleshooting Interviews
  • Blog
  • Pricing
  • Gift
    Gift Purchase Gift Redeem
  • About
Log In - Sign Up

"Auckland": S3 delete & archive old backups

Scenario: "Auckland": S3 delete & archive old backups

Level: Medium

Type: Do

Tags: aws cli   finops  

Access: Email

Description: Ops left years of database dumps in s3://auckland-backups. Keys use an absolute date prefix:
backups/YYYY-MM-DD/...

Apply this retention policy (use the date in the key, ignore LastModified):

  • Before 2023-01-01 — delete those objects
  • From 2023-01-01 through 2024-12-31 — keep them but set storage class to GLACIER
  • On or after 2025-01-01 — leave as Standard
  • Keys without that date prefix — leave untouched
The AWS CLI is ready (no configuration or authentication needed). You can start with:
aws s3 ls s3://auckland-backups --recursive

NOTE: this scenario uses Floci, a local AWS emulator; there are no real AWS resources.

Root (sudo) Access: True

Test: In s3://auckland-backups: objects with key date < 2023-01-01 are gone; dates 2023-01-01.. 2024-12-31 are GLACIER (or deep archive); dates ≥ 2025-01-01 and non-dated keys remain Standard.

The "Check My Solution" button runs the script /home/admin/agent/check.sh, which you can see and execute.

Time to Solve: 20 minutes.

Send Us Feedback
Get Notified
For announcements like new scenarios. We'll never share your email with anyone else.
SadServersSadServers

Real-world Linux and DevOps scenarios for hands-on learning and technical assessment.

Uptime Robot ratio (30 days)
Product
  • Scenarios
  • For Individuals
  • For Businesses
  • Pricing
Resources
  • FAQ
  • Blog
  • Newsletter
Company
  • About Us
  • Support
  • Privacy Policy
  • Terms of Service
  • Contact
Connect With Us
info@sadservers.com

Made in Canada 🇨🇦
Updated: 2026-09-27 14:36 UTC – c78fe89