I am using code build to run cdk deploy, and am getting Intermittent CDK behaviour, where it claims that a stack is not there, when in fact it is. Retrying the code build step 2 or 3 times seems to cause the problem to go away.
command cdk deploy --require-approval never -r arn:aws:iam::${MYACCOUNT}:role/${MYROLE} myproject-devAppPipelineStack
Stack ARN:
arn:aws:cloudformation:eu-west-2:XXXXXXXXX:stack/MYSTACK/61fa19c0-35fd-11ea-b99c-0622cd7b28da
myproject-leodevAppPipelineStack
myproject-leodevAppPipelineStack: deploying...
[0%] start: Publishing fa359a06ddff6004eea4cf6ee75e7fdc88bdfd57d45b8d1b40cc50684bd23a04:current
[100%] success: Published fa359a06ddff6004eea4cf6ee75e7fdc88bdfd57d45b8d1b40cc50684bd23a04:current
myproject-leodevAppPipelineStack: creating CloudFormation changeset...
โ myproject-leodevAppPipelineStack failed: Error [ValidationError]: Stack [myproject-leodevAppPipelineStack] does not exist
at Request.extractError (/usr/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/protocol/query.js:50:29)
at Request.callListeners (/usr/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
at Request.emit (/usr/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/usr/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:683:14)
at Request.transition (/usr/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/usr/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /usr/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/usr/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:38:9)
at Request.<anonymous> (/usr/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:685:12)
at Request.callListeners (/usr/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:116:18) {
message: 'Stack [myproject-leodevAppPipelineStack] does not exist',
code: 'ValidationError',
time: 2020-06-01T18:33:15.243Z,
requestId: 'c97374fa-e233-485f-91a3-c2442f7d271d',
statusCode: 400,
retryable: false,
retryDelay: 126.08973673810169
}
Stack [myproject-leodevAppPipelineStack] does not exist
This is :bug: Bug Report
@pontusvision is this after a failed stack deployment? I have seen this where the stack has failed and rolled back and subsequent deployments fail this way
@pontusvision @nzspambot I believe this is the same issue as #7340
This issue was resolved as of 1.42.0 (current version is 1.42.1)
the details of the scenario where this occurs can be found here
I don't believe further action is needed
@shivlaks perfect that is nice to know it is fixed
I'm going to resolve this as a duplicate of #7340
feel free to reopen if the issue persists beyond v1.42.0