How do I troubleshoot "400 Error Code" errors that I receive when I use CloudFormation for ElastiCache?

6 minute read
0

I want to troubleshoot "400 Error Code" errors that I receive when I use AWS CloudFormation for Amazon ElastiCache.

Short description

When you start an AWS API request directly or use a CloudFormation stack, AWS performs initial syntax checks. These checks verify that the request is complete and has all mandatory parameters. If a check fails, then you receive an error. To resolve the error, find the specific error that you received, and then take the appropriate actions.

Resolution

The following are common 400 Error Code errors and the reasons that they occur when you send an API request for Amazon ElastiCache:

  • Throttling - Your request was denied because of API request throttling.
  • InsufficientCacheClusterCapacity - AWS doesn't have enough available capacity to complete your request.
  • SubnetInUse - The subnet that you're trying to remove currently has instances associated with it.
  • InvalidParameterValue - You used a parameter value that's not valid, is unsupported, or can't be used in your request.
  • InvalidParameterCombination - Your request has an incorrect combination of parameters or a missing parameter.

To troubleshoot 400 Error Code errors, identify the specific ElastiCache invoke API error that you received. Then, complete the following steps:

Note: For a list of possible errors and their descriptions, see Common errors.

Throttling

If you receive the following 400 Error Code: Throttling, then your request was denied because of API request throttling. These account-level API call limits aren't specific to any service.

"Rate exceeded (Service: AmazonElastiCache; Status Code: 400; Error Code: Throttling; Request ID: ###)"

Note: You can't increase or modify limits for a specific API call. API calls can't exceed the maximum allowed API request rate. These limitations also apply to API calls that come from an application, command line interface (CLI), or the AWS Management Console.

To resolve this error, take the following actions:

  • Retry your call with exponential backoff and jitter.
  • Distribute your API calls evenly over time, and avoid making several API calls in a short time period.

InsufficientCacheClusterCapacity

If you receive the following 400 Error Code: InsufficientCacheClusterCapacity, then AWS doesn't currently have enough available on-demand capacity to complete your request.

"cache.### (VPC) is not currently supported in the availability zone ###. Retry the launch with no availability zone or target: ###. (Service: AmazonElastiCache; Status Code: 400; Error Code: InsufficientCacheClusterCapacity; Request ID: ###)."

To resolve this error, take the following actions:

  • Wait a few minutes, and then submit your request again. Note that capacity shifts frequently.
  • Use another cache node type, and then submit your request again.
  • Use another subnet and Availability Zone, and then submit your request again.

For more information, see the InsufficientCacheClusterCapacity section of Amazon ElastiCache error messages.

SubnetInUse

If you receive the following 400 Error Code: SubnetInUse, then you tried to remove a subnet from an ElastiCache subnet group that currently has instances associated with it.

"The subnet ID subnet-### is in use (Service: AmazonElastiCache; Status Code: 400; Error Code: SubnetInUse; Request ID: ###)".

To resolve this error, remove all associated resources from the subnet, and then submit your request again. For more information, see Examples.

InvalidParameterValue

If you receive a 400 Error Code: InvalidParameterValue, then a parameter value is not valid, is unsupported, or can't be used in your request. Make sure that you check each parameter for your request call. If you used an unsupported parameter value, then see the following errors and associated methods to resolve them:

"Invalid AuthToken provided. (Service: AmazonElastiCache; Status Code: 400; Error Code: InvalidParameterValue"; Request ID: ###)".

This error shows that the auth-token setting doesn't meet constraints when you use AUTH with ElastiCache for Redis. For more information, see Authenticating with the Redis AUTH command.

"The snapshot window and maintenance window must not overlap. (Service: AmazonElastiCache; Status Code: 400; Error Code: InvalidParameterValue; Request ID: ###)".

To resolve this error, separate your snapshot windows and maintenance windows into different time periods. Snapshot windows and maintenance windows can't be set up at the same time.

"The number of replicas per node group must be within 0 and 5. (Service: AmazonElastiCache; Status Code: 400; Error Code: InvalidParameterValue; Request ID: ###)".

This error occurs when you add more than five replica nodes. ElastiCache for Redis supports one primary node and from zero to five replica nodes per shard. For more information, see Understanding Redis replication.

InvalidParameterCombination

If you receive a 400 Error Code: InvalidParameterCombination, then your request call has an incorrect combination of parameters or a missing parameter. To resolve this error, see the following error messages that you might receive and the associated methods to resolve them:

"Cannot find version 5.0.0 for redis (Service: AmazonElastiCache; Status Code: 400; Error Code: InvalidParameterCombination; Request ID: ###)."

This error shows that the version of Redis in your request call isn't supported. For more information, see Supported ElastiCache for Redis versions and Supported ElastiCache for Memcached versions.

"Cannot restore redis from 6.0.5 to 5.0.6. (Service: AmazonElastiCache; Status Code: 400; Error Code: InvalidParameterCombination; Request ID: ###)."

To resolve this error, make sure that the Redis engine version is newer than or equal to the current engine version. ElastiCache for Redis doesn't support downgraded Redis engine versions when you use a backup to create a new Redis cluster. Also, ElastiCache for Redis doesn't support downgrading the Redis engine on a running Redis cluster.

"When using automatic failover, there must be at least 2 cache clusters in the replication group. (Service: AmazonElastiCache; Status Code: 400; Error Code: InvalidParameterCombination; Request ID: ###)."

To resolve this error, turn on the automatic failover option in a Redis cluster that has at least one available read replica on it. Verify that your Redis replication group has more than one replica node, and then submit your request again. For more information, see Minimizing downtime in ElastiCache for Redis with Multi-AZ.

Related information

Quotas for ElastiCache

Additional troubleshooting steps

Troubleshoot AWS CLI errors

AWS OFFICIAL
AWS OFFICIALUpdated 8 days ago