title: Automating Snapshots on Elasticsearch cluster running on EC2
body: <p>I have an Elasticsearch cluster running on EC2 instances and I want to automate snapshots to backup daily.</p>
  
  <p>I've read through the Snapshot and Restore guide and I have the PUT command that'll make a snapshot. From my research I've seen a few ways to automate the backups. One suggestion I found was to use AWS managed Elasticsearch. Unfortunately switching to managed Elasticsearch will not work due to other constraints we have.</p>
  
  <p>The first approach I tried was to set up a cron job on one of the nodes that would make the appropriate REST call. However I realized that if the node running the command were to go down, then the backups wouldn't run.</p>
  
  <p>The next approach I though to use was AWS Datapipeline. The issue is that there doesn't seem to be a way to send REST calls from Datapipeline - I could run an EC2 shell command, but then I'd run into the same problem as before.</p>
  
  <p>The other approach I've thought of is using a CloudWatch event to schedule a lambda function that'll make the REST call. It seems like that might work best, but it also seems overly complicated for automating backups.</p>
  
  <p>Is there a way to automate backups from within Elasticsearch? And if not is there a simpler way of doing this with AWS services?</p>