Took me a long time to find out how to do this.
A few people have re-posted a lot of this AWS article but missed out some crucial details: http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-managedomains.html#es-managedomains-snapshots
The general idea is:
- Create an AWS bucket and put the snapshot files into it (don’t use a subdirectory, the .dat files should be in the bucket root). No need to change permissions on the bucket or anything.
- Create an IAM role and policy as per the documentation in the AWS docs link above. When creating the role using web management console you need to choose EC2 role type and manually modify the trust relationship after creating it.
- Run a python script (can find this in the docs link above) using the boto library to register the bucket as a snapshot repository in ES. You need to sign the request regardless of the ES access policy you are using. HOWEVER set `is_secure` to `True`. Without this I was getting `<html></html>` returned instead of any error messages.
- Use curl to do the restore (no need to sign restore/backup requests if your access policy is open / IP-based). Again check the doc for the exact curl command, but as above use https instead of http to get real error messages.