assets: EKS not deployable via CDK Pipelines
See original GitHub issueHi there!
I am trying to deploy an EKS cluster via CDK Pipelines. This breaks, because the assets for custom resources within EKS are referenced with absolute path in ...assets.json
. This happens during cdk synth
in the Pipelines build step. Then, in a later pipeline step, cdk-assets
is not able to find the assets (because CodeBuild generate random temp dir names for each run) and therefor uploads empty zip files to S3. This breaks the deployment of the application stack (eks) with this error message in CloudFormation:
Uploaded file must be a non-empty zip (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: 6443c97c-4806-4f82-8224-5a4e2afc48b2; Proxy: null)
Reproduction Steps
- Create a CDK Pipeline according to the dev guide
- add an EKS stack application stage via
pipeline.addApplicationStage()
- deploy the pipeline and wait for it to fail during application stack deployment
What did you expect to happen?
cdk synth
should create references with relative paths for the assets.
What actually happened?
cdk synth
creates references with absolute paths for the assets.
Environment
- CDK CLI Version: 1.75
- Framework Version: 1.75
- Node.js Version: v12.18.0
- OS : Ubuntu 18.10
- Language (Version): TypeScript (3.9.7)
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Continuous Delivery of Amazon EKS Clusters Using AWS ...
This post shows the use of AWS CDK and CDK Pipelines to deploy Amazon EKS clusters. Overview. In this post, we will show...
Read more >Managing an Amazon EKS Cluster Using AWS CDK ... - Noise
This blog demonstrates how to spin up cluster infrastructure managed by CI/CD using CDK code and Cloud Resource Property Manager (CRPM) ...
Read more >Deploy to AWS from GitLab CI/CD
GitLab provides Docker images with the libraries and tools you need to deploy to AWS. You can reference these images in your CI/CD...
Read more >StackDeployment | @aws-quickstart/eks-blueprints
Deployment of a single Stack ... Hierarchy. StackDeployment. Defined in node_modules/aws-cdk-lib/pipelines/lib/blueprint/stack-deployment.d.ts:75 ...
Read more >How to switch and do cdk deploy to a different account?
❌ Building assets failed: Error: Building Assets Failed: Error: Could not assume role in target account using current credentials (which are ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@bracki you are gold.
This seems like a bug in https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/core/lib/custom-resource-provider/custom-resource-provider.ts#L143. If I replace that line with
fileName: staging.relativeStagedPath(stack)
it works.