11

I have an AWS account which is used for development. Because the developers are in one timezone, we switch off the resources after hours to conserve usage.

Is it possible to temporarily switch off nodes in elasticache cluster? all i found in cli reference was 'delete cluster': http://docs.aws.amazon.com/cli/latest/reference/elasticache/index.html

zaitsman
  • 7,571
  • 4
  • 35
  • 64

2 Answers2

15

ElastiCache clusters cannot be stopped. They can only be deleted and recreated. You can use this pattern to avoid paying for time when you're not using the cluster.

If you are using a Redis ElastiCache cluster, you can create a snapshot as the cluster is being deleted. Then, you can restore the cluster from the snapshot when you create it. This way, you preserve the data in the cluster.

The cluster endpoints are derived from a combination of

  • the cluster IDs,
  • the region,
  • the AWS account.

So as long as you delete and re-create clusters with those parts being constant, then the clusters will maintain the same endpoint.

Matt Houser
  • 28,384
  • 5
  • 53
  • 70
7

At this time there is not a way to STOP and EMR cluster in the same sense you can with EC2 instances. The EMR cluster uses instance-store volumes and the EC2 start/stop feature relies on the use of EBS volumes which are not appropriate for high-performance, low-latency HDFS utilization.

The best way to simulate this behavior is to store the data in S3 and then just ingest as a start up step of the cluster then save back to S3 when done.

Documentation Reference:

https://forums.aws.amazon.com/thread.jspa?threadID=149772

Hope it helps.

EDIT1:

If you want to maintain the same dns, you can use the API/CLI to update the elastic cluster.

Reference:

http://docs.aws.amazon.com/cli/latest/reference/es/update-elasticsearch-domain-config.html

Hope it helps.

Kannaiyan
  • 10,588
  • 2
  • 35
  • 69
  • This is quite a fair bit annoying as there is no way to specify the DNS when creating a cluster, meaning that the configuration for the app should be updated each day. – zaitsman Oct 03 '17 at 00:14
  • Updated answer to change domain information. Once the elastic cluster is up, you can update the name with domain config. That should solve your issue. – Kannaiyan Oct 03 '17 at 00:18
  • @Kannaiyan that doesn't update the DNS. And that's also for ElasticSearch, not ElastiCache. – Mark B Oct 03 '17 at 00:51
  • @zaitsman I would recommend attaching a Route53 private hosted zone to your VPC and updating records in that zone to point to your resources like ElastiCache clusters, RDS instances, etc. Then you don't have to update your code, just the Route53 record. – Mark B Oct 03 '17 at 00:53