What’s a good way of obtaining count of objects in a bucket (including non-current) created in the last 30 days?
I’m not seeing much on the API to help me with this (no server side filtering on creation date) so it seems I’ll need to list all objects in a bucket and filter client side. Which is problematic for me with >100MM objects. Any suggestions?
I only know of a way to get the count of objects through the GUI.
Is there a metric you could use in cloudwatch?
Theres the NumberOfObjects metric for S3 buckets, if that helps?
I would start in S3 Storage Lens or CloudWatch, depending on the granularity you require – see if either of them have a metric you can use.
Are you familiar with S3 Inventory? That would be (slightly) less hassle than wrangling it through the ListObjects API.
object count metric, if objects aren’t being purged - just added, ought to work for me, actually. thanks.
if not, that’s a good call, I’ll play w/the inventory.