Skip to content

CustomResource Hanging on cdk deploy! #4147

@ColWillis

Description

@ColWillis

Hi, I have a Java CDK Project and I am attempting a CustomResource Lambda to purge S3 Bucket pre CloudFormation Stack Creation and pre CloudFormation Stack Deletion.

Unfortunately the cdk-deploy does not work, or maybe it is a CloudFormation issue...Or maybe my code!

The Issue I am seeing is it is Hanging on 'CREATE_IN_PROGRESS' for the CustomResource.

e.g It is 22:37 now, and the Action occured:

  • 4/6 | 22:13:56 | CREATE_IN_PROGRESS | Custom::MyCustomResourceLambdaDeleter | CustomResourceApp/customresource-id/Default (customresourceid)
  • 4/6 Currently in progress: spike-customresource, customresourceid

I have attached Screenshots and also the reduced Source Code, and the issue can be reproduced.

To recover from this Issue, I had to run multiple cdk destroy (which caused Errors), manually delete the Stack in CloudFormation and manually delete the Lambda. (Repeat these steps if required)

Reproduction Steps

  1. Grab attached src
  2. Set your AWS Account ID in the .properties File
  3. mvn clean install
  4. cdk -o ./target/cdk.out/ --app "mvn exec:java -Dexec.args="mystack.properties"" deploy "*" --require-approval never

Error Log

  1. No Errors! It Hangs...Seemingly forever

Environment

  • **CLI Version :1.8.0 (build 5244f97)
  • **Framework Version:1.8.0.DEVPREVIEW
  • **OS :Win 10
  • **Language :Java

Other

Apologies in advance for the poor code, this was just a Spike!


This is 🐛 Bug Report
1_Hanging
2_Cfn1
3_Cfn2
CfnTemplate-FromConsole.txt
spike-customresource-standalone.zip

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions