我正在使用 Azure DevOps 的 CloudFormation 插件将应用程序部署到 AWS。
它运行得非常好,会自动更新需要更改的内容,而不会影响其他内容。我已经用了几天了,它运行得很好。
然而,当我进行一个小的修改时,我看到了以下错误:
Test for existence of change set Dev-TV-API-ChangeSet-Release-42 returned error: 'Stack [Dev-TV-API-NoAuth] does not exist'.
这看起来有点奇怪,所以我认为它可能无法确定需要更改什么。所以我决定手动删除堆栈,然后重新运行管道。现在我得到了完全相同的错误。堆栈在 AWS 中显示状态REVIEW_IN_PROGRESS
- 以及一个事件。
知道这里可能发生什么事吗?
完整日志:
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
答案1
事实证明,在部署模板之前进行的某些验证记录在不同的地方。因此,当我在任务日志中看到此错误,而 AWS Stack Info 页面中没有太多内容时,堆栈级别有一个“更改集”选项卡,列出了失败的更改集。如果您单击它,您将看到描述错误的状态原因,这应该有助于调试。