Change the number of replicas on my cluster without recreate it using CloudFormation

0

I have a CloudFormation stack that creates a AWS::ElastiCache::ReplicationGroup wiht 1 shard (NumNodeGroups) which contains 1 primary nodes and 2 replicas. It have cluster mode enabled and uses multi az.

Every time I need to update the parameter ReplicasPerNodeGroup CloudFormation recreates the entire cluster instead of only change shards adding or deleting replicas. The documentation says that the update requires a replacement.

But adding or deleting replicas from console only modify the current cluster without recreate it, keeping the data.

Is there a way to create a Redis Cluster with cluster mode enabled and multi az, using cloudformation, that allows me to change the number of replicas without recreating the entire cluster ? The current cloudformation behaviour does not make sense at all.

已提问 1 年前497 查看次数
1 回答
1
已接受的回答

Hello,

Currently when CloudFormation requires an REPLACEMENT of a resource, there is no workaround for getting around the replacement of the resource.

For the specific AWS::ElastiCache::ReplicationGroup resource, this resource in the past did not support updating the parameter ReplicasPerNodeGroup via console as well. Upon which the cloudformation resource was designed initially.

That being said the Cloudformation service team is aware of this behavior change for the ReplicasPerNodeGroup parameter via the console and are working towards releasing a fix so that you can update ReplicasPerNodeGroup via Cloudformation without a replacement of the cluster in the same way you are able to do it via the console.

I do not have an ETA when this would be released however as soon as it gets released, it should be publicly announced in either one of the following links:

AWS Blog - https://aws.amazon.com/blogs/aws/ AWS New - https://aws.amazon.com/new/

AWS
已回答 1 年前
  • Searching for a solution for this, I found my own question.

    If I change the replica count using the console to the desired amount and then update the CloudFormation to reflect this change, will it be applied without try to do any change additional change or does it enters in drift ?

    Thanks.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则