Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amplify build failed with AlreadyExistsException (bucket exists) #10579

Closed
4 tasks done
kasukur opened this issue Feb 25, 2022 · 19 comments
Closed
4 tasks done

amplify build failed with AlreadyExistsException (bucket exists) #10579

kasukur opened this issue Feb 25, 2022 · 19 comments
Labels
pending-response Issue is pending response from the issue author pending-triage Issue is pending triage transferred This issue was transferred from another Amplify project

Comments

@kasukur
Copy link

kasukur commented Feb 25, 2022

Before opening, please confirm:

App Id

arn:aws:amplify:us-east-1:accountId:apps/d2j3vm4n1gru98

Region

us-east-1

Amplify Console feature

Backend builds

Describe the bug

I am trying to deploy an amplify app as per https://webapp.serverlessworkshops.io/staticwebhosting/deploy/ but the build is failing because of an existing bucket. I don't have any buckets with that name. I understand that the buckets are global but not sure how to workaround this

2022-02-25T03:31:32.457Z [INFO]: An error occurred when creating the CloudFormation stack
2022-02-25T03:31:32.459Z [WARNING]: ✖ Root stack creation failed
2022-02-25T03:31:32.464Z [INFO]: AlreadyExistsException: Stack [amplify-wildrydes-prod-32220] already exists
                                 at Request.extractError (/root/.nvm/versions/node/v14.18.1/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/protocol/query.js:50:29)
                                 at Request.callListeners (/root/.nvm/versions/node/v14.18.1/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
                                 at Request.emit (/root/.nvm/versions/node/v14.18.1/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
                                 at Request.emit (/root/.nvm/versions/node/v14.18.1/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/request.js:686:14)
                                 at Request.transition (/root/.nvm/versions/node/v14.18.1/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/request.js:22:10)
                                 at AcceptorStateMachine.runTo (/root/.nvm/versions/node/v14.18.1/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/state_machine.js:14:12)
                                 at /root/.nvm/versions/node/v14.18.1/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/state_machine.js:26:10
                                 at Request.<anonymous> (/root/.nvm/versions/node/v14.18.1/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/request.js:38:9)
                                 at Request.<anonymous> (/root/.nvm/versions/node/v14.18.1/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/request.js:688:12)
                                 at Request.callListeners (/root/.nvm/versions/node/v14.18.1/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
                                 at Request.emit (/root/.nvm/versions/node/v14.18.1/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
                                 at Request.emit (/root/.nvm/versions/node/v14.18.1/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/request.js:686:14)
                                 at Request.transition (/root/.nvm/versions/node/v14.18.1/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/request.js:22:10)
                                 at AcceptorStateMachine.runTo (/root/.nvm/versions/node/v14.18.1/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/state_machine.js:14:12)
                                 at /root/.nvm/versions/node/v14.18.1/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/state_machine.js:26:10
                                 at Request.<anonymous> (/root/.nvm/versions/node/v14.18.1/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/request.js:38:9)
                                 at Request.<anonymous> (/root/.nvm/versions/node/v14.18.1/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/request.js:688:12)
                                 at Request.callListeners (/root/.nvm/versions/node/v14.18.1/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
                                 at callNextListener (/root/.nvm/versions/node/v14.18.1/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/sequential_executor.js:96:12)
                                 at IncomingMessage.onEnd (/root/.nvm/versions/node/v14.18.1/lib/node_modules/@aws-amplify/cli/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: 'AlreadyExistsException',
                                 time: 2022-02-25T03:31:32.456Z,
                                 requestId: '92bb3d71-1610-43c4-a385-54cb25e459cd',
                                 statusCode: 400,
                                 retryable: false,
                                 retryDelay: 81.16703459454344
                                 }
2022-02-25T03:31:32.487Z [ERROR]: !!! Build failed
2022-02-25T03:31:32.487Z [ERROR]: !!! Non-Zero Exit Code detected
2022-02-25T03:31:32.488Z [INFO]: # Starting environment caching...
2022-02-25T03:31:32.488Z [INFO]: # Environment caching completed
Terminating logging...

Expected behavior

Build to complete successfully.

Reproduction steps

Deploy the app as per instructions at https://webapp.serverlessworkshops.io/staticwebhosting/deploy/

Build Settings

No response

Additional information

No response

@github-actions
Copy link

Hi 👋, thanks for opening! While we look into this...

If this issue is related to custom domains, be sure to check the custom domains troubleshooting guide to see if that helps. Also, there is a more general troubleshooting FAQ that may be helpful for other questions.

Lastly, please make sure you've specified the App ID and Region in the issue!

@ghost ghost self-assigned this Feb 25, 2022
@ghost ghost added backend-build question General question labels Feb 25, 2022
@abhi7cr abhi7cr added the bug Something isn't working label Mar 2, 2022
@spina-a-d
Copy link

Got the same issue on a long-existing project that has always worked. Now all-of-a-sudden it says I can't deploy to the existing deployment bucket, which doesn't make sense, because it always existed before as well, that's where it deploys to.

@hikeeba
Copy link

hikeeba commented Mar 18, 2022

I'm getting this on an Amplify branch. Says the Amplify branch already exists, and it sure does, that's how I set up CI/CD...

@hikeeba
Copy link

hikeeba commented Mar 18, 2022

Not sure if this is the same issue or not, but it looks slightly similar.

2022-03-18T19:19:42.525Z [INFO]: CREATE_IN_PROGRESS AmplifyBranch AWS::Amplify::Branch Fri Mar 18 2022 19:19:39 GMT+0000 (Coordinated Universal Time)
                                 CREATE_FAILED      AmplifyBranch AWS::Amplify::Branch Fri Mar 18 2022 19:19:41 GMT+0000 (Coordinated Universal Time) Resource handler returned message: "Invalid request provided: Failed to create branch. The branch main already exists for the app d2d5rf58axme3s (Service: Amplify, Status Code: 400, Request ID: e64321e8-fca8-4c8d-b531-605dfba1caf7, Extended Request ID: null)" (RequestToken: b3dc4954-fbd3-d406-9970-3c7796b54ca1, HandlerErrorCode: InvalidRequest)

@ghost
Copy link

ghost commented Apr 7, 2022

Hi @hikeeba @spina-a-d can you also share your App IDs?

@hikeeba
Copy link

hikeeba commented Apr 9, 2022

My App ID is d2d5rf58axme3s. This issue went away after doing an env pull and the trying again. Not sure if it is related to the issue reported here.

@spina-a-d
Copy link

@hloriana the App ID for me should be d2gc0o88uvhlzz. I just tried re-running the pipeline now to see if anything had changed, and still the same issue.

@hikeeba Could you describe exactly how you fixed it?

@ghost
Copy link

ghost commented Apr 20, 2022

@spina-a-d thank you for providing this information. Taking a look.

@hikeeba
Copy link

hikeeba commented May 3, 2022

I think my issue was different, and it seemed to resolve itself after about 15 minutes. I just did a env pull and the tried again and it started working.

@spina-a-d
Copy link

@spina-a-d thank you for providing this information. Taking a look.

Did you find anything, it still doesn't seem to work?

@calavera calavera transferred this issue from aws-amplify/amplify-hosting Jun 13, 2022
@josefaidt josefaidt added pending-triage Issue is pending triage transferred This issue was transferred from another Amplify project and removed bug Something isn't working question General question backend-build labels Jun 13, 2022
@josefaidt josefaidt unassigned ghost Jun 21, 2022
@josefaidt
Copy link
Contributor

Hey @kasukur 👋 apologies for the delay here! Are you still experiencing this issue? @spina-a-d have you also continuously experienced this?

@josefaidt
Copy link
Contributor

Hey @kasukur just wanted to follow-up on this one and see if you are still experiencing this issue?

@kasukur
Copy link
Author

kasukur commented Jun 25, 2022

Hey @josefaidt, Sorry for the delay. it's working now. Thank you

@kasukur kasukur closed this as completed Jun 25, 2022
@spina-a-d
Copy link

@josefaidt Yes I have continuously experienced this. I haven't been able to deploy since I originally had this issue and it's very frustrating. Especially since I have bugs I can't patch.

@spina-a-d
Copy link

@josefaidt @hloriana I'm pretty sure this issue is not closed. I'm still experiencing this issue and I'm having no way to patch my active bugs in my website. I've patched all dependencies and the amplify cli is latest locally and in the pipeline and I still can't deploy my project.

@swaminator swaminator reopened this Nov 21, 2022
@josefaidt
Copy link
Contributor

Hey @spina-a-d 👋 apologies for the delay; I missed these mentions. Are you still experiencing this issue? If so, would you mind creating a separate bug report for your occurrence? This way we'll ensure we have the up-to-date context and project information.

@josefaidt josefaidt added the pending-response Issue is pending response from the issue author label Nov 21, 2022
@josefaidt
Copy link
Contributor

Hey @spina-a-d 👋 are you still experiencing this issue?

@josefaidt
Copy link
Contributor

Closing due to inactivity. @spina-a-d if you are still experiencing this please reply back to this thread or open a new issue with a reference here.

@josefaidt josefaidt closed this as not planned Won't fix, can't repro, duplicate, stale Jan 9, 2023
@Themrpie
Copy link

Themrpie commented Feb 3, 2025

This is still an issue. I just deleted the bucket and it worked, but I think this is a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-response Issue is pending response from the issue author pending-triage Issue is pending triage transferred This issue was transferred from another Amplify project
Projects
None yet
Development

No branches or pull requests

7 participants