Need alarm for AWS S3 bucket if less than 4 files created per day

1.2k views Asked by At

I have some script which generate 4 csv files per day in a AWS S3 Bucket. I am trying to create a Alarm in Amazon AWS with Cloudwatch to find if on any given day less than 4 files are generated in that particular S3 bucket. I tried to create a alarm but the alarm surprisingly had sum and other options but no option to have specific number check per given time amount (say 24 hours).

P.S. I have seen the average function in alarm but it does not give daily average of object created in the bucket.

Is it possible to create the alarm in a way I need ? I tried googling but didnt found exact solution for this problem.

1

There are 1 answers

0
Nishit On

You can use the 'PutRequests' metric to create your alarm. This metric provides the number of times PUT api was called on the S3 bucket (In your case 4).

  1. Set the Statistic to Sum
  2. Period is 1 day
  3. Threshold as Lower than 4.

Attaching an example screenshot for you to refer. enter image description here