Search code examples
postgresqlamazon-web-servicesserverless-framework

Serverless-framework postgresql version upgrading problem


We use serverless-framework and Postgresql.

Type: AWS::RDS::DBInstance
Properties:
  EngineVersion: 11.8

It was 11.8 before, we successfully upgraded it from 11.8 to 11.9 by changing the version in serverless.yml in EngineVersion. But now we need to upgrade it to 11.10 and we have the following issue:

The error message:

Cannot upgrade postgres from 11.9 to 11.1 (Service: AmazonRDS; Status Code: 400; Error Code: InvalidParameterCombination; Request ID: e0d1923a-cf98-44ea-a9e4-bc3871e33bf6; Proxy: null).

So it looks like it tries to upgrade to 11.1 rather than 11.10.


Solution

  • The 11.10 value you're specifying for the EngineVersion property is processed as a number by the YAML engine since you're not using quotes, so the trailing zeros are removed and the resulting value is 11.1. You need to specify the value in quotes, like this: "11.10"