title: How create a Redis ElastiCache cluster using AWS-CLI from snapshots in S3?
body: <p>What I'm trying to do is to use aws-cli to create an ElastiCache cluster based on my ElastiCache snapshots in S3, and my ElastiCache is cluster-enabled mode.</p>
  
  <p>I followed this <a href="http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/Clusters.Create.CLI.html" rel="noreferrer">tutorial</a> to create a cluster-enabled Redis cache and here's my command:
  <code>
  aws elasticache create-cache-cluster --cache-cluster-id stevescachecluster1 --cache-node-type cache.m4.large --engine redis --engine-version 3.2.4 --cache-parameter-group default.redis3.2.cluster.on --num-cache-nodes 1 --snapshot-arns arn:aws:s3:::MY_S3_BUCKET-elasticache/stevesun-elasticache-0002.rdb --cache-subnet-group-name my-cache-dev
  </code></p>
  
  <p>The above command fails due to 
  <code>
  An error occurred (InvalidParameterCombination) when calling the CreateCacheCluster operation: Cluster mode should be disabled in parameter group, but found it is enabled.
  </code></p>
  
  <p>This is what confuses me, the above linked tutorial explicitly said that if yo want a cluster-mode enabled cache, please use <strong><em>.cluster.on</em></strong> option in your arguments.</p>
  
  <p>Then I looked more into this aws-cli command <a href="http://docs.aws.amazon.com/cli/latest/reference/elasticache/create-cache-cluster.html" rel="noreferrer">reference</a>: for this parameter: <code>--cache-parameter-group-name</code>, its documentation says: <code>You cannot use any parameter group which has cluster-enabled='yes' when creating a cluster.</code></p>
  
  <p>Isn't this contradictionary from this cli reference documentation to that cli tutorial?</p>
  
  <p>Please correct me where I understand it wrong.
  And also, how can I create a cluster-mode enabled cache from S3 snapshots?</p>
  
  <p>Thanks.</p>
  
  <p>I checked and found that 3.2.4 is the latest <a href="http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/SelectEngine.RedisVersions.html#SelectEngine.RedisVersions.3-2-4" rel="noreferrer">version</a> that AWS ElatiCache has right now.</p>
  
  <p>Edit 1:</p>
  
  <p>Then I just created a single-node cache using this command:
  <code>aws elasticache create-cache-cluster --cache-cluster-id stevescachecluster1 --cache-node-type cache.m4.large --engine redis --engine-version 3.2.4 --cache-parameter-group default.redis3.2 --num-cache-nodes 1 --snapshot-arns arn:aws:s3:::MY_S3_BUCKET-elasticache/stevesun-elasticache-0002.rdb --cache-subnet-group-name my-cache-dev</code>. </p>
  
  <p>Then I went to the console and selected my newly launched single-node cache and clicked <code>Modify</code>, I tried to change it to cluster.on, but got this exception:
  <code>The parameter cluster-enabled has a different value in the requested parameter group than the current parameter group. This parameter value cannot be changed for a cache cluster.</code></p>
  
  <p>So, my attempt to launch a single-node cache first and then change it to be a cluster mode also failed.</p>
  
  <p>Edit 2:</p>
  
  <p>Then I thought it's that I needed to allocate more than 1 node for a cluster-enabled mode, so I changed this parameter <code>--num-cache-nodes</code> to <code>2</code>, but I got this exception:
  <code>
  An error occurred (InvalidParameterValue) when calling the CreateCacheCluster operation: Cannot create a Redis cluster with a NumCacheNodes parameter greater than 1.
  </code>
  This is even more confusing to me, a cluster definitely needs more than 1 node, then why does it not allow greater than 1??</p>
  
  <p>Although its <a href="http://docs.aws.amazon.com/cli/latest/reference/elasticache/create-cache-cluster.html" rel="noreferrer">documentation</a> says <code>For clusters running Redis, this value must be 1.</code>. Why is this requirement? Then how can we create a new redis cluster from snapshots?
  Help please.</p>
  
  <p>Thanks.</p>