18

I setup an AWS Elasticsearch Domain recently but I didn't see a way to stop it (like you can with an EC2 instance), which means I'm continuously billed. At this stage I just need to do some testing and don't require a full-time cluster.

The only option I see is to delete the domain, am I missing something?

codecraig
  • 377
  • 2
  • 4
  • 7
  • 3
    http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-gsg-deleting.html states "delete the domain when you are finished experimenting with it or you might incur charges", which would seem to indicate deletion is required. I'm not aware of a way to stop AWS ElasticSearch temporarily. – ceejayoz Aug 06 '17 at 01:02
  • ES in AWS is probably shared instance. Thus, you can't just stop own one. – ipeacocks Jun 23 '21 at 16:27

2 Answers2

14

You will have to delete the cluster for billing to stop. However, if you want to backup the data for later experiments, you can take manual snapshots (link rotten, check archived page here) of the indices to your S3 buckets.

The next time you spawn a cluster, just restore the snapshot :)

hjpotter92
  • 660
  • 1
  • 10
  • 20
  • I also realized that - I deleted the ES domain manually in my test environment to save money. But I had a hard time deploying anything afterwards, as CloudFormation would not recreate it because of the mess I made by manually deleting it and not being able to redeploy all the lambda functions that depend on the ES domain. Any suggestions to fix that? – Esben von Buchwald Aug 19 '20 at 13:54
  • @EsbenvonBuchwald haven't worked at all with cloudformation. sorry :( – hjpotter92 Aug 19 '20 at 15:38
  • @hjpotter92 - That link is dead, is it still possible to do manual snapshots of indicies and restore them? – timhj Jan 07 '22 at 00:54
  • 1
    @timhj hmm, I can't find the link for older ES service on wayback anymore, but if you've moved to opensearch (which i haven't tried); the equivalent docs are here: https://docs.aws.amazon.com/opensearch-service/latest/developerguide/managedomains-snapshots.html#managedomains-snapshot-create – hjpotter92 Jan 07 '22 at 05:31
  • 1
    @timhj nvm, updated the reply with archived link (https://web.archive.org/web/20170810131300/https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-managedomains.html#es-managedomains-snapshots) – hjpotter92 Jan 07 '22 at 05:37
  • @hjpotter92 - thanks, the AWS link is perfect. – timhj Jan 07 '22 at 06:04
5

There is no way to stop the cluster today. What I did to reduce my bill was that I edited the cluster to reduce the instance type to a t2.small instance which is significantly cheaper than the previous instance.

Then when I needed to resume testing I changed the instance type back to what I required.

  • this is the best solution actually. I had read somewhere that I needed a t2.medium but I'm reducing the instance to the smallest (nano) and will take it from there. – Alex B Oct 20 '20 at 11:15