CloudWatchTimerLambda is an AWS-Lambda Java base class that disables its CloudWatch Rule (the rule that triggers your Lambda with a ScheduledEvent) after a timed expiration:
If for no other reason, use CloudWatchTimerLambda to lower billed AWS resources.
Detailed Usage: https://github.com/cellepo/CloudWatchTimerLambda/wiki
Extend CloudWatchTimerLambda by implementing its abstract #process method (to do your concrete Lambda's job).
Your Lambda will then have these benefits when it is run (all occur after processing):
- Stores (if not already stored) an expiration time for the triggering CloudWatch Rule to expire and be disabled
- The expiration is the sum of the time that storage of the expiration occurs, plus a duration:
- Duration is configured by Lambda Environment Variable: "SCHEDULED_EVENT_RULE_EXPIRY_DURATION_MILLIS"
- The expiration is stored in S3
- Name of its S3 bucket is configured by Lambda Environment Variable: "S3_BUCKET_NAME"
- The expiration is the sum of the time that storage of the expiration occurs, plus a duration:
- If expiration is already stored, and current time is after it, then the triggering CloudWatch Rule expires:
- CloudWatch Rule is disabled
- Stored expiration is deleted from S3