The requirement - A customer requires an automated mechanism that takes a manual snapshot of an AWS ElasticSearch domain (production) on a daily basis. The target of the snapshot is an AWS S3 bucket.
- Schedule Daily @ 2am --> start process --> take snapshot --> wait 5 min --> check snapshot status (success/in_progress/failed)
state==IN_PROGRESS, check snapshot status again, up to 10 times, interval of 5 mins
state==SUCCESS- end process (success)
state==IN_PROGRESS- when reaching 10 retries (50 mins), end process (failed)
state==FAILED- end process (failed)
- If previous step failed, send push notification (Slack/Teams/Email/etc.)
Motivation - The automated snapshots that are taken by AWS can be used for disaster recovery or a failure in an upgrade, they cannot be used if someone by accident (yes, it happened) deleted the whole ElasticSearch cluster.
Haven't found an out-of-the-box Lambda/mechanism that meets the requirements. Suggestions? Thoughts?
p.s- I did a POC with AWS Step Functions + Lambda in VPC, which seems to be working, but I'd rather use a managed service or a living open-source project.
Originally posted at stackoverflow