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.

preguntada hace un año497 visualizaciones
1 Respuesta
1
Respuesta aceptada

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
respondido hace un año
  • 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.

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas