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/aws-eks: Cluster fail to deploy with lambda layer v27 and v26 #26787

Closed
lmouhib opened this issue Aug 17, 2023 · 2 comments
Closed
Labels
@aws-cdk/aws-lambda Related to AWS Lambda bug This issue is a bug.

Comments

@lmouhib
Copy link

lmouhib commented Aug 17, 2023

Describe the bug

Cluster fail to deploy with error from the customer resource responsible for managing the lifecycle of the cluster. The error is as follow:

09:44:24 | CREATE_FAILED        | Custom::AWSCDK-EKS-Cluster                  | Cluster9EE0221C
Received response status [FAILED] from custom resource. Message returned: ProxyAgent is not a constructor

If I remove the kubectl layer and rely on the the one part of CDK which is kubectl 1.20, the cluster successfully deploy.

Expected Behavior

Cluster deploy without issues.

Current Behavior

Cluster fail to deploy with the following error:

09:44:24 | CREATE_FAILED        | Custom::AWSCDK-EKS-Cluster                  | Cluster9EE0221C
Received response status [FAILED] from custom resource. Message returned: ProxyAgent is not a constructor

Reproduction Steps

code is in this repo

Package.json

   "aws-cdk-lib": "^2.84.0",
    "@aws-cdk/lambda-layer-kubectl-v27": "^2.0.0",
import { AwsAuth, CapacityType, CfnAddon, Cluster, KubernetesVersion } from 'aws-cdk-lib/aws-eks';
import { KubectlV27Layer } from '@aws-cdk/lambda-layer-kubectl-v27';

    const kubectl = new KubectlV27Layer(this, 'KubectlLayer');
    
    const eksCluster = new Cluster(this, "Cluster", {
      vpc: vpc,
      clusterName: 'cluster',
      version: KubernetesVersion.V1_27,
      kubectlLayer: kubectl,
    });

This will fail with the above errors

Possible Solution

It might be related to the notice, for the upgrade to node 18.

I tried to deploy with the following dependencies and it works without issues. The only difference is using k8s 1.26 instead of 1.27 because the version is not available in cdk 2.81

    "@aws-cdk/lambda-layer-kubectl-v26": "^2.0.0",
    "aws-cdk-lib": "2.81.0",

Additional Information/Context

No response

CDK CLI Version

2.92.0

Framework Version

2.84.0

Node.js Version

Node.js v18.12.1.

OS

macOS

Language

Typescript

Language Version

TypeScript 4.9.4

Other information

No response

@lmouhib lmouhib added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Aug 17, 2023
@github-actions github-actions bot added the @aws-cdk/aws-lambda Related to AWS Lambda label Aug 17, 2023
@peterwoodworth peterwoodworth removed the needs-triage This issue or PR still needs to be triaged. label Aug 17, 2023
@peterwoodworth
Copy link
Contributor

Hey thanks for reporting, this issue was fixed yesterday and should be in our next release

@github-actions
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-lambda Related to AWS Lambda bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants