Weekly Amazon S3 storage audit email

Every Monday, get a plain-English review of your S3 storage with a prioritized cleanup list, so you stop paying for forgotten files.

Agentic Task
Amazon S3GmailOperationsEngineeringAI ReportsDaily DigestsEmail Automation
PromptCreate

Every Monday morning at 8am, run a weekly Amazon S3 storage audit and email me a prioritized cleanup recommendation. Let me configure the recipient email address, the stale threshold in days (default 90), and the maximum bucket count to scan (default 25).

First, enumerate every bucket in the connected AWS account using amazon-s3 List Buckets. Cap the scan at the configured maximum bucket count so a very large account does not blow the run out.

For each bucket, use amazon-s3 List Objects (V2) with pagination to walk the object list. Track total object count, total size, the largest keys, and per-prefix roll-ups. Follow the continuation token far enough to build a representative view of the bucket instead of stopping at the first page.

For a sample of the largest keys in each bucket (roughly the top 10), call amazon-s3 Head Object (Get Metadata) to confirm the exact size and last-modified timestamp.

Then reason about the data. Call out what is growing, which prefixes look stale (nothing modified inside the stale threshold window), which log dumps or forgotten backups look oversized, and which top offenders are worth cleaning up first. Draft a prioritized cleanup recommendation with plain-English rationale so a non-technical owner can act on it without opening the AWS console.

Compose the report as an HTML email with a subject like "S3 audit for week of <Monday's date>". Use gmail Create a Draft to build the draft addressed to the configured recipient, then gmail Send a Draft to deliver it.

Additional information

What does this prompt do?
  • Scans every bucket in your AWS account each Monday morning and rolls up what is stored where
  • Flags stale folders that have not changed in months plus oversized log dumps and forgotten backups
  • Writes a prioritized cleanup list in plain English so you know exactly what to delete or archive first
  • Emails the report straight to the account owner so it lands in the right inbox without any manual work
What do I need to use this?
  • An AWS account with S3 access connected to General Input
  • A Google account for sending the weekly email report
  • The email address of whoever should receive the audit
How can I customize it?
  • Change who receives the report or send it to more than one person
  • Adjust the stale threshold; the default flags anything untouched for 90 or more days
  • Cap how many buckets get scanned each week (default 25) if you have a very large account
  • Move the send time to a different day or hour

Frequently asked questions

Do I need to set up AWS Storage Lens or S3 Inventory first?
No. The audit runs directly against your existing S3 access, so there is no extra AWS setup beyond connecting your account.
Will this delete anything in my buckets?
No. The workflow is read only. It lists buckets and reads object metadata but never touches or modifies files. The email tells you what is worth cleaning up; the deletion is entirely up to you.
How does it decide a folder is stale?
It looks at the last-modified timestamp of the objects in each folder. Anything with nothing updated in the past 90 days gets flagged, and you can tune that window to whatever fits your team.
What if my account has hundreds of buckets?
Set a maximum bucket count so each run stays focused on the biggest offenders. You can raise the cap once you have worked through the initial cleanup.
Does this work with any Gmail account?
Yes. Any personal or Google Workspace inbox works. The report arrives as a normal email you can archive, forward, or reply to.

Stop paying for S3 files you forgot about.

Turn one prompt into a weekly audit that names exactly what to clean up first.