Resolving The Engine Mode Serverless You Requested Is Currently Unavailable

Resolving “The Engine Mode Serverless You Requested Is Currently Unavailable” in AWS

Encountering “The engine mode serverless you requested is currently unavailable” error message when working with Amazon Aurora can be a challenge. This issue typically arises when using an unsupported version of Aurora PostgreSQL in serverless mode. To resolve this problem efficiently, it’s essential to identify the versions of Aurora PostgreSQL that are compatible with serverless mode.

Error message example

╷
│ Error: creating RDS Cluster (aurora-postgresql-serverless-aurora-demo-db-435f901a-cluster): InvalidParameterValue: The engine mode serverless you requested is currently unavailable.
│       status code: 400, request id: f244e994-248e-4393-9798-1116ff9d8920
│ 
│   with module.aurora.aws_rds_cluster.aurora_cluster,
│   on ../../aurora/main.tf line 59, in resource "aws_rds_cluster" "aurora_cluster":
│   59: resource "aws_rds_cluster" "aurora_cluster" {
│ 
╵

Identifying Supported Serverless Versions

AWS provides a command-line interface (CLI) tool that can help in listing the supported versions. The required command is as follows:

aws rds describe-db-engine-versions \
	--engine aurora-postgresql \
	--filters Name=engine-mode,Values=serverless \
	--output text \
	--query "DBEngineVersions[].EngineVersion"

This command works by querying the AWS RDS service to list all the database engine versions for Aurora PostgreSQL that support serverless mode. Let’s break down the command for clarity:

  • aws rds describe-db-engine-versions: This is the primary command used to retrieve details about the database engine versions available in Amazon RDS.
  • –engine aurora-postgresql: Specifies that the engine in question is Aurora PostgreSQL.
  • –filters Name=engine-mode,Values=serverless: This filter narrows down the results to only those versions that are compatible with the serverless engine mode.
  • –output text: This option formats the output as plain text, making it easier to read and parse.
  • –query “DBEngineVersions[].EngineVersion”: This query string further refines the output to display only the engine versions.

Utilizing the Output

After running this command, you will receive a list of Aurora PostgreSQL versions available in serverless mode. With this information, you can:

  1. Select a Supported Version: Choose a version from the list for your serverless database instance.
  2. Update Your Configuration: Modify your AWS configuration or deployment templates to use the selected version.

Conclusion

By using the AWS CLI command provided, you can quickly identify the Aurora PostgreSQL versions that support serverless mode, enabling you to bypass the error and proceed with your database setup. This approach not only resolves the immediate issue but also empowers you to make informed decisions about the database version you deploy in your serverless architecture.

Similar Posts