aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

AWS::ElastiCache::ReplicationGroup - failed node type update is recorded as success by CloudFormation

Open
#2,273 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### Name of the resource

AWS::ElastiCache::ReplicationGroup

### Resource Name

_No response_

### Issue Description

As explained in https://repost.aws/knowledge-center/elasticache-redis-change-node-errors, if, for example, you apply a change to reduce the instance size to one with insufficient memory, ElastiCache will fail to deploy this change, and you get a message in the "Events" section of ElastiCache to say:

> Failed to scale down to cache node type Replication Group [myreplicationgroup] because the node has insufficient memory. Please select a different node type or reduce current memory usage and retry

However, CloudFormation doesn't detect this as an error and records the resource change as "UPDATE_COMPLETE" even though the change has not been applied and there is now drift between CloudFormation and ElastiCache.

### Expected Behavior

If the update fails to apply, CloudFormation should notice this and record that the update failed.

### Observed Behavior

The update fails to apply but CloudFormation says it completed.

### Test Cases

- Create a ReplicationGroup using a large instance type
- Use it such that it consumes lots of memory
- Apply a change using CloudFormation to use a small instance type
- See that CloudFormation sees the change as successful, but that the change isn't actually applied, and there's an error in the "Events" tab in ElastiCache.

### Other Details

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.