AWS::RDS::DBCluster fails to modify existing Serverless cluster when updating any parameters
AWS::Cloudformation::Stack - can modify Aurora Serverless cluster, but not via CloudFormation Stack
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.
You currently can't modify MaintenanceWindow with Aurora Serverless. (Service: AmazonRDS; Status Code: 400; Error Code: InvalidParameterCombination; Request ID: 31efe4ae-538a-416e-9a6f-cf1210c7ba6c)
Mentioned on forums here: https://forums.aws.amazon.com/thread.jspa?messageID=911260
DB (Aurora Serverless)
Management (CloudFormation)
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.
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
PreferredBackupWindowis 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.
Most helpful comment
Any news on this?