Reputation: 195
I have an s3 bucket where at every 3 min one tar file is getting uploaded. Now I want to set up alarm notification if s3 file does not receive any data for 5 min I should get notified by an email. Unfortunately I am unable to find any such metrics in cloud-watch s3. Please let me know if anyone has solution for this.
Upvotes: 2
Views: 4873
Reputation: 270104
Amazon CloudWatch has a NumberOfObjects
metric for every Amazon S3 bucket.
However, I'm not sure how often it is updated. It certainly wouldn't have 5-minute resolution.
Plus, there is no Alarm that means "if this number has not changed".
If your bucket does not have many objects (eg < 1000), one approach would be:
list_bucket()
to retrieve a list of objects from the bucket, then sort by LastModified
If the bucket has many objects, then:
Upvotes: 2