aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

aws-cdk-lib.aws_redshiftserverless module - Query History Empty in the AWS Console

Open entest-hai opened this issue 2 years ago • 1 comments

Describe the bug

When creating an Amazon Redshift Serverless namespace and workgroup, the Query History in the AWS console is empty. This is the Query History in the AWS Console. However, when creating Amazon Serverless manually, the Query History in the AWS console is fully detailed information.

I think that when creating Redshift Serverelss by CDK or CloudFormation (L1 Construct), it does not enable monitoring query history from the AWS Console

Expected Behavior

Query History should show historical queries

Current Behavior

Query History is empty from the AWS Console

Reproduction Steps

Just create a simple Amazon Redshift Serverless like below

export class RedshiftServerlessStack extends Stack {
  constructor(scope: Construct, id: string, props: RedshiftServerlessProps) {
    super(scope, id, props);

    // security block this
    const namespace = new aws_redshiftserverless.CfnNamespace(
      this,
      "RedshiftNameSpace",
      {
        namespaceName: "demo",
        adminUsername: "admin",
        adminUserPassword: "Admin2023",
        dbName: "demo",
        defaultIamRoleArn: props.defaultRole.roleArn,
        iamRoles: props.roles.map((role) => role.roleArn),
        logExports: ["userlog", "connectionlog", "useractivitylog"],
      }
    );

    const workgroup = new aws_redshiftserverless.CfnWorkgroup(
      this,
      "RedshiftWorkGroup",
      {
        workgroupName: "demo",
        baseCapacity: 32,
        namespaceName: "demo",
        subnetIds: props.vpc.publicSubnets.map((subnet) => subnet.subnetId),
        publiclyAccessible: false,
        securityGroupIds: [props.sg.securityGroupId],
      }
    );

    workgroup.addDependency(namespace);
  }
}

Possible Solution

No response

Additional Information/Context

I do not know

CDK CLI Version

2.87.0

Framework Version

typescript

Node.js Version

v18.16.1

OS

Amazon 2023

Language

Typescript

Language Version

TypeScript 5.1.3

Other information

No response

entest-hai avatar Aug 16 '23 13:08 entest-hai

I checked the CFN doc for AWS::RedshiftServerless::Namespace and AWS::RedshiftServerless::Workgroup but I can't find any relevant property for this configuration.

We probably need to make sure cloudformation does support that before we are allowed to use CDK L1 construct to enable that.

I assume this feature is probably not supported by CFN yet.

pahud avatar Aug 16 '23 15:08 pahud