"Stack [...] already exists, please report this issue to amplify-cli github" error and amplify console build timeout
See original GitHub issueBefore opening, please confirm:
- I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
- I have searched for duplicate or closed issues.
- I have read the guide for submitting bug reports.
- I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- I have removed any sensitive information from my code snippets and submission.
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
14
Amplify CLI Version
10.2.2
What operating system are you using?
Amazonlinux
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
no
Amplify Categories
Not applicable
Amplify Commands
init
Describe the bug
In amplify-console, since Oct. 3, we have repeatedly been getting build timeouts and the following error:
[31mAn error occurred when creating the CloudFormation stack[39m 2022-10-05T20:46:14.908Z [INFO]: 🛑 Stack [amplify-ess-app-abdulladev-215910] already exists 2022-10-05T20:46:14.908Z [INFO]: Resolution: Please report this issue at https://github.com/aws-amplify/amplify-cli/issues and include the project identifier from: ‘amplify diagnose --send-report’
In my local workstation I’m able to do an amplify push with no issues, although I have not tested ‘amplify init’. I created https://github.com/aws-amplify/amplify-hosting/issues/3017 since this seems to be amplify-console issue but I have no response so far.
Since the logs are telling me to send this report to you and file an issue I’m doing so here. My project identifier (when I run amplify diagnose in my local workstation) is 3def1a2bd59d61900f734d59f169a578.
Expected behavior
Backend build should complete successfully, and if there is error it should fail immediately rather than waiting 30 min and timing out.
Reproduction steps
Do any deployment in amplify console env d2d6ty1wlg8jch
GraphQL schema(s)
# Put schemas below this line
Project Identifier
3def1a2bd59d61900f734d59f169a578
Log output
# Put your logs below this line
2022-10-05T20:46:12.838Z [WARNING]: Everything up-to-date
2022-10-05T20:46:12.844Z [INFO]: # Getting Amplify CLI Cloud-Formation stack info from environment cache
2022-10-05T20:46:12.851Z [INFO]: # Start initializing Amplify environment: abdulladev
# Initializing new Amplify environment: abdulladev (amplify init)
2022-10-05T20:46:14.076Z [INFO]: [33mNote: It is recommended to run this command from the root of your app directory[39m
2022-10-05T20:46:14.791Z [INFO]: [0mAmplify AppID found: d2d6ty1wlg8jch. Amplify App name is: ess-app[0m
2022-10-05T20:46:14.904Z [INFO]: [31m[39m
[31mAn error occurred when creating the CloudFormation stack[39m
2022-10-05T20:46:14.908Z [INFO]: 🛑 Stack [amplify-ess-app-abdulladev-215910] already exists
2022-10-05T20:46:14.908Z [INFO]: Resolution: Please report this issue at https://github.com/aws-amplify/amplify-cli/issues and include the project identifier from: 'amplify diagnose --send-report'
2022-10-05T21:15:16.557Z [INFO]: ExpiredToken: The security token included in the request is expired
at Request.extractError (/snapshot/repo/build/node_modules/aws-sdk/lib/protocol/query.js:50:29)
at Request.callListeners (/snapshot/repo/build/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
at Request.emit (/snapshot/repo/build/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/snapshot/repo/build/node_modules/aws-sdk/lib/request.js:686:14)
at Request.transition (/snapshot/repo/build/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/snapshot/repo/build/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /snapshot/repo/build/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/snapshot/repo/build/node_modules/aws-sdk/lib/request.js:38:9)
at Request.<anonymous> (/snapshot/repo/build/node_modules/aws-sdk/lib/request.js:688:12)
at Request.callListeners (/snapshot/repo/build/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
at Request.emit (/snapshot/repo/build/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/snapshot/repo/build/node_modules/aws-sdk/lib/request.js:686:14)
at Request.transition (/snapshot/repo/build/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/snapshot/repo/build/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /snapshot/repo/build/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/snapshot/repo/build/node_modules/aws-sdk/lib/request.js:38:9)
at Request.<anonymous> (/snapshot/repo/build/node_modules/aws-sdk/lib/request.js:688:12)
at Request.callListeners (/snapshot/repo/build/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
at callNextListener (/snapshot/repo/build/node_modules/aws-sdk/lib/sequential_executor.js:96:12)
at IncomingMessage.onEnd (/snapshot/repo/build/node_modules/aws-sdk/lib/event_listeners.js:335:13)
at IncomingMessage.emit (events.js:412:35)
at IncomingMessage.emit (domain.js:475:12)
at endReadableNT (internal/streams/readable.js:1334:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
code: 'ExpiredToken',
time: 2022-10-05T21:15:16.554Z,
requestId: '6bdc832a-e716-48b2-b468-2c5e68751cb1',
statusCode: 403,
retryable: true
}
Additional information
No response
Issue Analytics
- State:
- Created a year ago
- Comments:15 (9 by maintainers)
Hey folks using CLI v10.2.1 I cloned an existing project from git, attempted a headless init, and was able to reproduce this issue. After switching to
pull
, however, I was able to successfully pull the project and initialize it locally.After upgrading to v10.2.2 I was not able to initialize my project with the same headless init command.
Marking this as a bug, as a workaround please replace
init
withpull
in your headless scripts, or downgrade to Amplify CLI version 10.0.0.Hello guys. We had the same problem here at the company I work for and we managed to solve it by downgrading to version 10.0.0. Thanks for sharing the information.