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-cdk-lib: MSK Connectors update fails due to Invalid Request #28128

Closed
AleX77NP opened this issue Nov 24, 2023 · 2 comments
Closed

aws-cdk-lib: MSK Connectors update fails due to Invalid Request #28128

AleX77NP opened this issue Nov 24, 2023 · 2 comments
Labels
aws-cdk-lib Related to the aws-cdk-lib package bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@AleX77NP
Copy link

AleX77NP commented Nov 24, 2023

Describe the bug

We are deploying MSK Connectors via AWS CDK Typescript library. Everything was working perfectly until 2 days ago. Suddenly, we started getting the following error:

"responseElements": { "Access-Control-Expose-Headers": "x-amzn-errortype,x-amzn-requestid,x-amzn-errormessage,x-amzn-trace-id,x-amz-apigw-id,date", "message": "Invalid parameter autoScaling: The specified parameter value is identical to the current value for the connector. Specify a different value, then try again." },

We were not changing anything related to autoScaling configuration, we were only updating some other properties, like: debezium table list.

Expected Behavior

cdk deploy is successful with updated MSK Connectors.

Current Behavior

cdk deploy fails due to mentioned error

Reproduction Steps

private createKafkaConnector(
        vpc: ec2.IVpc,
        config: Config,
        key: string,
        plugin: string,
        pluginRevision: number,
        roleArn: string,
        logGroup: string,
        connectorConfig: {
            [key: string]: string
        },
        cluster: string,
        version?: string
    ) {
        return {
            connectorDescription: `MSK ${key} connector for cluster ${cluster}`,
            capacity: {
                autoScaling: {
                    mcuCount: config.mskConnectorsConfig.mcuCount,
                    minWorkerCount: config.mskConnectorsConfig.workerCount,
                    maxWorkerCount: config.mskConnectorsConfig.workerCount + 1,
                    scaleInPolicy: {
                        cpuUtilizationPercentage: 20
                    },
                    scaleOutPolicy: {
                        cpuUtilizationPercentage: 80
                    }
                }
            },
            connectorConfiguration: connectorConfig,
            connectorName: `fdp-etb-${key}-connector-${version ? version : config.mskConnectorsConfig.connectorVersion}`,
            kafkaCluster: {
                apacheKafkaCluster: {
                    bootstrapServers: config.mskConnectorsConfig.kafkaBrokers,
                    vpc: {
                        securityGroups: config.mskConnectorsConfig.securityGroups,
                        subnets: vpc.privateSubnets.map(subnet => subnet.subnetId),
                    },
                },
            },
            kafkaClusterClientAuthentication: {
                authenticationType: 'IAM',
            },
            kafkaClusterEncryptionInTransit: {
                encryptionType: 'TLS',
            },
            kafkaConnectVersion: config.mskConnectorsConfig.kafkaConnectVersion,
            plugins: [{
                customPlugin: {
                    customPluginArn: plugin,
                    revision: pluginRevision ? pluginRevision : 1,
                },
            }],
            serviceExecutionRoleArn: roleArn,

            logDelivery: {
                workerLogDelivery: {
                    cloudWatchLogs: {
                        enabled: true,
                        // the properties below are optional
                        logGroup: logGroup,
                    },
                },
            },
        }
    }

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.110.0

Framework Version

v18.13.0

Node.js Version

v18.13.0

OS

Windows/Linux/MacOS

Language

TypeScript

Language Version

No response

Other information

Update works fine if we toggle autoScaling config, but this should not be required to update other properties.

@AleX77NP AleX77NP added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 24, 2023
@github-actions github-actions bot added the aws-cdk-lib Related to the aws-cdk-lib package label Nov 24, 2023
@pahud
Copy link
Contributor

pahud commented Nov 27, 2023

Are you able to provide a full minimal reproducible code snippet we can deploy in our account? Looks like the provided code is just a private method and we will need a full deployable code before we can diagnose. Thank you.

@pahud pahud added p2 effort/medium Medium work item – several days of effort response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed needs-triage This issue or PR still needs to be triaged. labels Nov 27, 2023
Copy link

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Nov 29, 2023
@github-actions github-actions bot added closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Dec 4, 2023
@github-actions github-actions bot closed this as completed Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws-cdk-lib Related to the aws-cdk-lib package bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

2 participants