DeployCodeBaseCustomResource18AF4C97 failed
See original GitHub issue❓ General Issue
Same code works fine couple weeks before, but without any code change in the few weeks, it starts to fail every time when I tried to do cdk deploy. The error reported is from DeployCodeBaseCustomResource18AF4C97. Seems like the underlying aws-cli command failed for some reason.
47/49 | 9:47:38 AM | CREATE_FAILED | Custom::CDKBucketDeployment | DeployCodeBase/CustomResource/Default (DeployCodeBaseCustomResource18AF4C97) Received response status [FAILED] from custom resource. Message returned: Command '['/opt/awscli/aws', 's3', 'cp', 's3://cdktoolkit-stagingbucket-574qtme5jv7w/assets/0b887894f0ecc543780dbe893f7115fc6ee8a5fde4ff9b9379406101a783a932.zip', '/tmp/tmplgzi9ntg/6f22d812-f3c1-434d-914d-585395b11860']' returned non-zero exit status 1. (RequestId: 852b0525-3088-4246-984e-221c86e5958f)
We used CDK for nodejs at version 1.103.0. The only related code I can think of is from @aws-cdk/aws-s3
const code_bucket = new s3.Bucket(this, 'CodeBucket', {
// removalPolicy: cdk.RemovalPolicy.DESTROY,
// autoDeleteObjects: true,
});
new s3deploy.BucketDeployment(this, 'DeployCodeBase', {
sources: [s3deploy.Source.asset('../benchmarks-stack')],
destinationBucket: code_bucket,
});
The whole CDK code can be found from https://github.com/awslabs/aws-c-s3/tree/main/benchmarks/dashboard-stack
Not sure it’s bug from CDK or something in our code base.
The Question
Environment
- CDK CLI Version: 1.103.0
- Module Version: 1.103.0
- Node.js Version: v16.1.0
- OS: macOS
- Language (Version): TypeScript
Other information
Issue Analytics
- State:
- Created 2 years ago
- Comments:24 (9 by maintainers)
Top Results From Across the Web
Learn best practices for implementing AWS Lambda-backed ...
Build your custom resources to report, log, and handle failure. Exceptions can cause your function code to exit without sending a response.
Read more >ARM template failed for a custom deployment with 'Required ...
"Deployment template parse failed: 'Required property 'type' not found in JSON. ... The shared-resources gives an error in Path 'parameters.
Read more >Deploy Kubernetes Custom Resources using CRDs
If the steadyStateCondition fails, Harness logs the following error message: Status check for resources in namespace [[namespace]] failed.
Read more >Custom resources - VMware Docs
Learning Center Operator enables managing the deployments into a Kubernetes cluster. A set of Kubernetes custom resource definitions (CRDs) ...
Read more >CFN Custom Resources backed by Step Functions
CloudFormation Custom Resources are a powerful mechanism to run arbitrary code as part of a CloudFormation deployment. They can be used to create, ......
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 FreeTop 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
Top GitHub Comments
I suspect a re-bootstrap would solve this issue. I just cloned the repo and successfully deployed 😄
I’ll post guidance on re-bootstrapping in a bit
I was using KMS to upload the folder since I was uploading in encrypted bucket and was getting same error, while memory limit could have been one of the issues, it turned out despite of running the scripts as admin, the
role
lambda is using needs to be whitelisted on KMS too. Did that by using following snippet.