Search code examples
aws-cdkamazon-elasticache

How to update parameter group for a ElastiCache (redis) cluster via CDK


I would like to close idle db connections to redis. timeout parameter let's you do that and CfnParametreGroup seems to be the way for it.

But my Redis Cluster is created via CfnReplicationGroup. How can I associate CfnParametreGroup with CfnReplicationGroup? There seems to be no way from the docs.

Looking for guidance on what's the correct procedure to update parameters for redis cluster via CDK ?


Solution

  • By passing the cacheParameterGroupName prop.

    ...
    cacheParameterGroupName=myParameterGroup.ref,
    ...