aws-amplify / amplify-cli

The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development.
Apache License 2.0
2.81k stars 819 forks source link

The specified bucket does not exist #4013

Closed Sangkwun closed 4 years ago

Sangkwun commented 4 years ago

Note: If your question is regarding the AWS Amplify Console service, please log it in the official AWS Amplify Console forum

Which Category is your question related to? I want to remove env name work. error occurred and not responding.

Amplify CLI Version

You can use amplify -v to check the amplify cli version on your system

4.18.0

What AWS Services are you utilizing?

(base) ➜  API_platform git:(develop) ✗ amplify status

Current Environment: work

| Category  | Resource name            | Operation | Provider plugin   |
| --------- | ------------------------ | --------- | ----------------- |
| Auth      | lominapiplatform07ae87c0 | Create    | awscloudformation |
| Storage   | s3284baa9e               | Create    | awscloudformation |
| Api       | lominApiPlatform         | Create    | awscloudformation |
| Api       | api0363aa41              | Create    | awscloudformation |
| Hosting   | S3AndCloudFront          | Create    | awscloudformation |
| Function  | lominapiplatform02a04d22 | Create    | awscloudformation |
| Function  | lominapiplatform02a04d22 | Update    | awscloudformation |
| Providers | categories               | Delete    |                   |

Provide additional details e.g. code snippets

(base) ➜  API_platform git:(develop) ✗ amplify env remove work        
? Are you sure you want to continue? (This would delete 'work' environment of the project from the cloud) Yes
⠋ Deleting resources from the cloud. This may take a few minutes...
Deleting env:work
⠙ Deleting resources from the cloud. This may take a few minutes...Stack has already been deleted or does not exist
⠹ Deleting resources from the cloud. This may take a few minutes...(node:1267) UnhandledPromiseRejectionWarning: NoSuchBucket: The specified bucket does not exist
    at Request.extractError (/home/sangkwun/.npm-global/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/services/s3.js:835:35)
    at Request.callListeners (/home/sangkwun/.npm-global/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
    at Request.emit (/home/sangkwun/.npm-global/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
    at Request.emit (/home/sangkwun/.npm-global/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/request.js:683:14)
    at Request.transition (/home/sangkwun/.npm-global/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/home/sangkwun/.npm-global/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /home/sangkwun/.npm-global/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/home/sangkwun/.npm-global/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/home/sangkwun/.npm-global/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/request.js:685:12)
    at Request.callListeners (/home/sangkwun/.npm-global/lib/node_modules/@aws-amplify/cli/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
(node:1267) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1267) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
⠹ Deleting resources from the cloud. This may take a few minutes...
jhockett commented 4 years ago

Hi @Sangkwun, this bug fix has been merged(#3972) and will be out in the next release.

Sangkwun commented 4 years ago

@jhockett Can you share estimated release date?

jhockett commented 4 years ago

@Sangkwun I cannot at the moment, but we're working to get the release out as soon as we can.

jhockett commented 4 years ago

Hi @Sangkwun we just released 4.18.1! Let me know if for some reason you're still having deletion issues.

Sangkwun commented 4 years ago

@jhockett Thank you for updates.

The env is succecfully deleted from local and amplify console. in S3 I amplify-apiplatform-work-00146-deployment is left. Is it okay to delete this bucket manually?

(base) ➜  API_platform git:(master) ✗ amplify -v
4.18.1

(base) ➜  API_platform git:(master) amplify env remove work
? Are you sure you want to continue? (This would delete 'work' environment of the project from the cloud) Yes
⠋ Deleting resources from the cloud. This may take a few minutes...
Deleting env:work
⠙ Deleting resources from the cloud. This may take a few minutes...Unable to remove env: work because deployment bucket amplify-apiplatform-work-223313-deployment does not exist or has been deleted.
⠹ Deleting resources from the cloud. This may take a few minutes...Stack has already been deleted or does not exist
✔ Successfully removed environment from the cloud
jhockett commented 4 years ago

I don't know enough context to say one way or the other. I would make sure you have all relevant data backed up before deleting anything.

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.