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-msk-alpha: msk cluster fails to deploy in ap-southeast-1 with Response object is too long error #28108

Closed
rudrateja-clickup opened this issue Nov 22, 2023 · 2 comments · Fixed by #28112
Labels
@aws-cdk/aws-msk Related to Amazon Managed Streaming for Apache Kafka (Amazon MSK) bug This issue is a bug. effort/medium Medium work item – several days of effort p1

Comments

@rudrateja-clickup
Copy link

Describe the bug

When trying to deploy an MSK Cluster, in ap-southeast-1 & ap-southeast-2, the ZookeeperConnect configuration using a custom resource results in Response object is too long.

Adding any additional tags is further increasing the size of the response body and exceeding the 4096 bytes limit

Example response body:

{
    "Status": "SUCCESS",
    "Reason": "OK",
    "PhysicalResourceId": "ZooKeeperConnectionString",
    "StackId": "",
    "RequestId": "",
    "LogicalResourceId": "",
    "NoEcho": false,
    "Data": {
        "region": "ap-southeast-1",
        "$metadata.httpStatusCode": 200,
        "$metadata.requestId": "",
        "$metadata.cfId": "",
        "$metadata.attempts": 1,
        "$metadata.totalRetryDelay": 0,
        "ClusterInfo.BrokerNodeGroupInfo.BrokerAZDistribution": "DEFAULT",
        "ClusterInfo.BrokerNodeGroupInfo.ClientSubnets.0": "subnet-",
        "ClusterInfo.BrokerNodeGroupInfo.ClientSubnets.1": "subnet-",
        "ClusterInfo.BrokerNodeGroupInfo.ClientSubnets.2": "subnet-",
        "ClusterInfo.BrokerNodeGroupInfo.ConnectivityInfo.PublicAccess.Type": "DISABLED",
        "ClusterInfo.BrokerNodeGroupInfo.ConnectivityInfo.VpcConnectivity.ClientAuthentication.Sasl.Iam.Enabled": false,
        "ClusterInfo.BrokerNodeGroupInfo.ConnectivityInfo.VpcConnectivity.ClientAuthentication.Sasl.Scram.Enabled": false,
        "ClusterInfo.BrokerNodeGroupInfo.ConnectivityInfo.VpcConnectivity.ClientAuthentication.Tls.Enabled": false,
        "ClusterInfo.BrokerNodeGroupInfo.InstanceType": "kafka.m5.large",
        "ClusterInfo.BrokerNodeGroupInfo.SecurityGroups.0": "sg-",
        "ClusterInfo.BrokerNodeGroupInfo.StorageInfo.EbsStorageInfo.VolumeSize": 250,
        "ClusterInfo.BrokerNodeGroupInfo.ZoneIds.0": "apse1-az1",
        "ClusterInfo.BrokerNodeGroupInfo.ZoneIds.1": "apse1-az2",
        "ClusterInfo.BrokerNodeGroupInfo.ZoneIds.2": "apse1-az3",
        "ClusterInfo.ClientAuthentication.Sasl.Scram.Enabled": true,
        "ClusterInfo.ClusterArn": "",
        "ClusterInfo.ClusterName": "",
        "ClusterInfo.CurrentBrokerSoftwareInfo.KafkaVersion": "2.8.1",
        "ClusterInfo.CurrentVersion": "",
        "ClusterInfo.EncryptionInfo.EncryptionAtRest.DataVolumeKMSKeyId": ",
        "ClusterInfo.EncryptionInfo.EncryptionInTransit.ClientBroker": "TLS",
        "ClusterInfo.EncryptionInfo.EncryptionInTransit.InCluster": true,
        "ClusterInfo.EnhancedMonitoring": "PER_TOPIC_PER_PARTITION",
        "ClusterInfo.LoggingInfo.BrokerLogs.CloudWatchLogs.Enabled": false,
        "ClusterInfo.LoggingInfo.BrokerLogs.Firehose.Enabled": false,
        "ClusterInfo.LoggingInfo.BrokerLogs.S3.Bucket": "",
        "ClusterInfo.LoggingInfo.BrokerLogs.S3.Enabled": true,
        "ClusterInfo.LoggingInfo.BrokerLogs.S3.Prefix": "amazon_msk",
        "ClusterInfo.NumberOfBrokerNodes": 3,
        "ClusterInfo.OpenMonitoring.Prometheus.JmxExporter.EnabledInBroker": true,
        "ClusterInfo.OpenMonitoring.Prometheus.NodeExporter.EnabledInBroker": true,
        "ClusterInfo.State": "ACTIVE",
        "ClusterInfo.StorageMode": "LOCAL",
        "ClusterInfo.Tags.Business Unit": "product",
        "ClusterInfo.ZookeeperConnectString": "",
        "ClusterInfo.ZookeeperConnectStringTls": ""
    }
}

Expected Behavior

MSK cluster gets deployed to ap-southeast-1 & ap-southeast-2 with all the required tags.

Current Behavior

The MSK cluster fails with Response object is too long.

Reproduction Steps

const tags = {
      Name: 'MyMskCluster',
      Environment: 'Env'
      // Add more tags as needed to achieve the limit size 
};

const cluster = new msk.Cluster(this, mskClusterId, {
      clusterName: mskClusterId
      instanceType,
      vpc,
      ebsStorageInfo,
      vpcSubnets: subnetGroup,
      securityGroups: [securityGroup],
      encryptionInTransit: {
        clientBroker: msk.ClientBrokerEncryption.TLS,
      },
      clientAuthentication: msk.ClientAuthentication.sasl({
        scram: true,
      }),
      monitoring,
      logging,
      tags: tags,
    });

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.64.0

Framework Version

No response

Node.js Version

v18.17.1

OS

MacOS 13.4.1

Language

TypeScript

Language Version

No response

Other information

No response

@rudrateja-clickup rudrateja-clickup added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 22, 2023
@github-actions github-actions bot added the @aws-cdk/aws-msk Related to Amazon Managed Streaming for Apache Kafka (Amazon MSK) label Nov 22, 2023
@jeisson-clickup
Copy link

Same here, Also, we realized that in the ap-southeast-1 region, the response has additional information that is not present in other regions.

"ClusterInfo.BrokerNodeGroupInfo.ConnectivityInfo.VpcConnectivity.ClientAuthentication.Sasl.Iam.Enabled": false,
"ClusterInfo.BrokerNodeGroupInfo.ConnectivityInfo.VpcConnectivity.ClientAuthentication.Sasl.Scram.Enabled": false,
"ClusterInfo.BrokerNodeGroupInfo.ConnectivityInfo.VpcConnectivity.ClientAuthentication.Tls.Enabled": false,
"ClusterInfo.BrokerNodeGroupInfo.ZoneIds.0": "ap",
"ClusterInfo.BrokerNodeGroupInfo.ZoneIds.1": "ap",
"ClusterInfo.BrokerNodeGroupInfo.ZoneIds.2": "ap",
"ClusterInfo.StorageMode": "LOCAL",

@pahud pahud added p1 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Nov 22, 2023
@mergify mergify bot closed this as completed in #28112 Nov 27, 2023
mergify bot pushed a commit that referenced this issue Nov 27, 2023
The reason is that the `AwsCustomResource` that this construct library uses calls `describeCluster`, which passes back all responses to CloudFormation, even if they are unused.

This PR restricts the return value to only the outputs that are actually read.

Fixes #28108

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-msk Related to Amazon Managed Streaming for Apache Kafka (Amazon MSK) bug This issue is a bug. effort/medium Medium work item – several days of effort p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants