Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AWS::RDS::DBClusterParameterGroup] - [Bug Report] Creating invalid cluster parameter group triggers null reference #591

Open
jglien opened this issue Jan 16, 2025 · 1 comment

Comments

@jglien
Copy link

jglien commented Jan 16, 2025

Bug

Given an invalid cluster parameter group (AWS::RDS::DBClusterParameterGroup), in our case a Postgres v16 cluster parameter group with rds.pg_stat_ramdisk_size variable deprecated in Postgres v15, creating the cluster parameter group triggers the following internal error in CloudFormation:

Resource handler returned message: "Cannot invoke "software.amazon.rds.common.logging.RequestLogger.log(String, String)" because "this.requestLogger" is null" (RequestToken: ***, HandlerErrorCode: InternalFailure)

Interestingly, AWS::RDS::DBParameterGroup does not appear to have this issue.

I think this is the line of code that is throwing.

Expected Behavior

Creating an invalid parameter group triggers an error similar to the following, helpful error:

Resource handler returned message: "Invalid / Unmodifiable / Unsupported DB Parameter: rds.pg_stat_ramdisk_size" (RequestToken: ***, HandlerErrorCode: InvalidRequest)

Steps to Reproduce

We used AWS CDK for Typescript (aws-cdk-lib) version 2.171.1 to create a Postgres v16 cluster.

const version = rds.AuroraPostgresEngineVersion.of("16.6", "16");

const clusterParameterGroup = new rds.ParameterGroup(this, "ClusterParameterGroup", {
  engine: rds.DatabaseClusterEngine.auroraPostgres({ version }),
  description: "Cluster Parameter Group",
  parameters: {
    "rds.pg_stat_ramdisk_size": "256",
  },
});

const aurora16 = new rds.DatabaseCluster(this, "DatabaseCluster16", {
  engine: rds.DatabaseClusterEngine.auroraPostgres({ version }),
  writer: rds.ClusterInstance.serverlessV2("writer16", {
    scaleWithWriter: true,
  }),
  serverlessV2MinCapacity: 0.5,
  serverlessV2MaxCapacity: 64,
  vpc,
  parameterGroup: clusterParameterGroup,
  cloudwatchLogsExports: ["postgresql"],
  deletionProtection: false,
  enableDataApi: false,
});

The template that is deployed triggers this error on creation.

@angusy29
Copy link
Contributor

The team is aware that the recent change in DBClusterParameterGroup to fix resetting of parameters has introduced this bug where creating an invalid cluster parameter group triggers a null pointer exception in the requestLogger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants