Cloudformation-coverage-roadmap: AWS::RDS::DBCluster fails to modify existing Serverless cluster when updating any parameters

Created on 27 Feb 2020  路  15Comments  路  Source: aws-cloudformation/cloudformation-coverage-roadmap

1. Title

AWS::RDS::DBCluster fails to modify existing Serverless cluster when updating any parameters

2. Scope of request

AWS::Cloudformation::Stack - can modify Aurora Serverless cluster, but not via CloudFormation Stack

3. Expected behavior

when updated/modified via CF stack, AWS::RDS::DBCluster doesn't try to modify the following values in the CF stack if they have not changed.

  • Port
  • PreferredBackupWindow
  • PreferredMaintenanceWindow

4. Suggest specific test cases

  1. Create a Aurora Serverless Cluster via CF Stack that defines one of the vaules above. (let use Preffered Maintenance Window for now)
  2. Modify the Aurora Cluster via the stack (update MaxCapacity for example
  3. Get UpdateRollback with following error:
You currently can't modify MaintenanceWindow with Aurora Serverless. (Service: AmazonRDS; Status Code: 400; Error Code: InvalidParameterCombination; Request ID: 31efe4ae-538a-416e-9a6f-cf1210c7ba6c)

5. Helpful Links to speed up research and evaluation

Mentioned on forums here: https://forums.aws.amazon.com/thread.jspa?messageID=911260

6. Category (required) - Will help with tagging and be easier to find by other users to +1

DB (Aurora Serverless)
Management (CloudFormation)

7. Any additional context (optional)

I have opened a Enterprise support ticket and the support agent confirmed this is a bug and tracked on the internal bug tracker.

I haven't tested this with other Aurora engine modes, but it does seem like it would affect any Aurora cluster.

bug? database

Most helpful comment

Any news on this?

All 15 comments

Reproduced with these templates for whoever picks up this bug:

Resources:
  Resource:
    Type: AWS::RDS::DBCluster
    Properties:
      Engine: aurora
      PreferredMaintenanceWindow: sun:01:00-sun:03:00
      MasterUserPassword: abcabcabc
      MasterUsername: abc
      EngineMode: serverless
Resources:
  Resource:
    Type: AWS::RDS::DBCluster
    Properties:
      Engine: aurora
      PreferredMaintenanceWindow: sun:01:00-sun:03:00
      MasterUserPassword: abcabcabc
      MasterUsername: abc
      EngineMode: serverless
      EnableCloudwatchLogsExports:
        - error

Someone also reported that they found a workaround by commenting out PreferredMaintenanceWindow

I attempted to enable EnableIAMDatabaseAuthentication in CFN via an update-stack command and got:

You currently can't modify IAM Authentication with Aurora Serverless. (Service: AmazonRDS; Status Code: 400; Error Code: InvalidParameterCombination; Request ID: a36df001-63d3-4ef7-b2c5-xxxxx)

This also happens when trying to update an existing CloudFormation with PreferredBackupWindow value.

You currently can't modify BackupWindow with Aurora Serverless. (Service: AmazonRDS; Status Code: 400; Error Code: InvalidParameterCombination; Request ID: ...

Commenting that property out on upcoming CloudFormation helps solved it as mentioned by @PatMyron.

My CloudFormation template now looks like this:

AuroraCluster:
    Type: AWS::RDS::DBCluster
    Properties:
      Engine: aurora-postgresql
      DatabaseName: mydatabase
      EngineMode: serverless
      EngineVersion: 10.7
      # PreferredBackupWindow: 01:00-02:00
      # PreferredMaintenanceWindow: sun:02:00-sun:03:00
      ......

The AWS CDK also produces this error.
You currently can't modify IAM Authentication with Aurora Serverless. (Service: AmazonRDS; Status Code: 400; Error Code: InvalidParameterCombination;

Ditto with the Maintenance window arg using terraform!

* aws_rds_cluster.aurora_serverless_cluster: error modifying RDS Cluster (coronavirus-dev-three-20200730103832403800000002): InvalidParameterCombination: You currently can't modify MaintenanceWindow with Aurora Serverless.
    status code: 400, request id: bfa8ba44-4476-4471-97e0-313afac70d9d

In the case of terraform this might be a documentation fail as it does not state that when engine_mode = "serverless". preferred_maintenance_window and preferred_backup_window are not applicable.

https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html#aurora-serverless.maintenance

Given documented limitations of Aurora in "serverless" engine mode, I believe most, or possibly all of these errors are to be expected, and are not CloudFormation bugs.

Maintenance windows don't apply to Aurora Serverless.

... from Aurora Serverless and Maintenance

The port number for connections must be: 3306 for Aurora MySQL [and] 5432 for Aurora PostgreSQL

... and ...

Aurora Serverless doesn't support the following features: [...] IAM database authentication

... from Limitations of Aurora Serverless

I haven't yet been able to find documentation to indicate whether the PreferredBackupWindow is similarly unsupported, but given the similarity in error returned, I'm guessing perhaps yes.

@rhbecker this all now makes sense. The error should probably mention it's an unsupported property or something more meaningful.

_preferred_maintenance_window_ and _preferred_backup_window_ are both visible in the AWS Console, under the "Maintenance & backups" tab, for serverless clusters, so they're not fully unsupported.

Given documented limitations of Aurora in "serverless" engine mode, I believe most, or possibly all of these errors are to be expected, and are not CloudFormation bugs.

Maintenance windows don't apply to Aurora Serverless.

... from Aurora Serverless and Maintenance

The port number for connections must be: 3306 for Aurora MySQL [and] 5432 for Aurora PostgreSQL

... and ...

Aurora Serverless doesn't support the following features: [...] IAM database authentication

... from Limitations of Aurora Serverless

I haven't yet been able to find documentation to indicate whether the PreferredBackupWindow is similarly unsupported, but given the similarity in error returned, I'm guessing perhaps yes.

You are correct, my IAM issue was caused by lack of serverless support in the CDK.

Any news on this?

Same problem when updating the BackupRetentionPeriod, I get rejected with DBCluster UPDATE_FAILED: You currently can''t modify BackupWindow with Aurora Serverless.

Is there any update?

Same here when trying to update Minimum Aurora capacity unit it failed with You currently can't modify BackupWindow with Aurora Serverless

Any news here?

Same problem when updating the BackupRetentionPeriod, I get rejected with DBCluster UPDATE_FAILED: You currently can't modify EndpointPort with Aurora Serverless.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

luiseduardocolon picture luiseduardocolon  路  4Comments

rjpereira picture rjpereira  路  4Comments

johnkoehn picture johnkoehn  路  3Comments

baxang picture baxang  路  3Comments

san-san picture san-san  路  3Comments