Search code examples
amazon-web-servicesredisautoscalingamazon-elasticache

How to add AWS elasticache autoscaling with target value more then 70?


Due to AWS elasticache autoscaling documentation target metric value must be

greater than or equal to 35 and less than or equal to 70

AWS elasticache autoscaling docs

But value 70 is normal for my cluster.

How can I made elasticache cluster autoscaling with target metric value 90?


Solution

  • After hours of investigation:

    I created a CloudWatch alarm on target value 98. Also, I made an EventBridge event to trigger lambda function on alarm. In the lambda function, I used Python and AWS CLI command

    aws elasticache modify-replication-group-shard-configuration \
    --replication-group-id <name> \
    --node-group-count 3 \
    --apply-immediately
    

    So I created my own autoscaling :)