I'm deploying an application to AWS using the CloudFormation plugin for Azure DevOps.
It works really well, and will automatically update things that need changing, leaving other things alone. I've been working on it for a few days, and it works fine.
However I just saw the following error when committing a small change:
Test for existence of change set Dev-TV-API-ChangeSet-Release-42 returned error: 'Stack [Dev-TV-API-NoAuth] does not exist'.
That looked a bit strange, so I thought maybe it's having trouble working out what needs to change. So I decided to delete the stack manually, and re-run the pipeline. Now I get exactly the same error. The stack shows up in AWS with status REVIEW_IN_PROGRESS
- and a single event.
Any ideas what could be going on here?
Full log:
2020-07-30T14:17:27.5715771Z Test for existence of change set Dev-TV-API-ChangeSet-Release-42 returned error: 'Stack [Dev-TV-API-NoAuth] does not exist'.
2020-07-30T14:17:27.5718700Z Loading template file from 'D:\a\r1\a\_TV CI\drop\package.yml'
2020-07-30T14:17:27.5724733Z Loading template parameters file 'D:\a\r1\a\_TV CI\drop\api.parameters.dev.json'
2020-07-30T14:17:27.5731008Z Successfully loaded template parameters
2020-07-30T14:17:27.5733302Z Setting capability CAPABILITY_IAM for stack
2020-07-30T14:17:27.5733902Z Setting capability CAPABILITY_NAMED_IAM for stack
2020-07-30T14:17:27.5734434Z Setting capability CAPABILITY_AUTO_EXPAND for stack
2020-07-30T14:17:27.5735777Z Creating CREATE type change set Dev-TV-API-ChangeSet-Release-42
2020-07-30T14:17:27.8132789Z Waiting for change set Dev-TV-API-ChangeSet-Release-42 to be validated for stack Dev-TV-API-NoAuth
2020-07-30T14:17:58.3348363Z Change set creation request failed with error: 'Stack Dev-TV-API-NoAuth failed to create successfully from the change set Dev-TV-API-ChangeSet-Release-42. Error: 'Resource is not in the state changeSetCreateComplete'' Error: Stack Dev-TV-API-NoAuth failed to create successfully from the change set Dev-TV-API-ChangeSet-Release-42. Error: 'Resource is not in the state changeSetCreateComplete'
2020-07-30T14:17:58.3355531Z at .<anonymous> (D:\a\_tasks\CloudFormationCreateOrUpdateStack_7ef7cdfa-aa45-42c5-93c8-d7603643dd99\1.7.0\CloudFormationCreateOrUpdateStack.js:2:4039841)
2020-07-30T14:17:58.3356313Z at next (native)
2020-07-30T14:17:58.3357470Z at o (D:\a\_tasks\CloudFormationCreateOrUpdateStack_7ef7cdfa-aa45-42c5-93c8-d7603643dd99\1.7.0\CloudFormationCreateOrUpdateStack.js:2:4028532)
2020-07-30T14:17:58.3359409Z at process._tickDomainCallback (internal/process/next_tick.js:135:7)
2020-07-30T14:17:58.3489430Z ##[error]Error: Stack Dev-TV-API-NoAuth failed to create successfully from the change set Dev-TV-API-ChangeSet-Release-42. Error: 'Resource is not in the state changeSetCreateComplete'
2020-07-30T14:17:58.3772097Z ##[section]Finishing: Create/Update Stack: Dev-TV-API-NoAuth
It turns out that some of the validation which happens before a template is deployed is logged in a different place. So while I was seeing this error in the task log, and nothing much in the AWS Stack Info page, there is a "Change sets" tab at stack level, listing the failed changeset. If you click on that, you will see a status reason describing the error, which should help with debugging.