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

AWS: Tell S3 bucket name and how to recover if deployment bucket does not exist #5714

Merged
merged 3 commits into from
Jan 28, 2019

Conversation

exoego
Copy link
Contributor

@exoego exoego commented Jan 17, 2019

What did you implement:

Closes #5699

How did you implement it:

Translate the "The specified bucket does not exist" error into more detailed error containing below:

  • Bucket name
  • stack name
  • Possible recovery operation.

How can we verify it:

  1. npm i -g exoego/serverless#fix-5699;
  2. sls deploy anything
  3. Delete the deployment bucket manually.
  4. sls deploy
  5. Verify that new error message is shown.

Todos:

  • Write tests
  • Write documentation
  • Fix linting errors
  • Make sure code coverage hasn't dropped
  • Provide verification config / commands / resources
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES
Is it a breaking change?: NO

@eahefnawy eahefnawy self-assigned this Jan 17, 2019
@eahefnawy eahefnawy self-requested a review January 17, 2019 13:14
@eahefnawy
Copy link
Member

another great contribution @exoego 🙌 ... thanks a lot for your hard work! 💪

Please let me know if this PR is ready for review, we'd love to see test coverage for this 😊

@exoego exoego changed the title [WIP] AWS: Tell S3 bucket name and recovery operation if deployment bucket does not exist AWS: Tell S3 bucket name and how to recovery if deployment bucket does not exist Jan 17, 2019
@exoego
Copy link
Contributor Author

exoego commented Jan 17, 2019

@eahefnawy It's ready 😄

@exoego exoego changed the title AWS: Tell S3 bucket name and how to recovery if deployment bucket does not exist AWS: Tell S3 bucket name and how to recover if deployment bucket does not exist Jan 18, 2019
Copy link
Member

@eahefnawy eahefnawy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @exoego .. Just a quick clarification question.

return BbPromise.reject(new this.serverless.classes.Error([
`The serverless deployment bucket "${params.Bucket}" does not exist.`,
`Create it manually if you want to reuse the CloudFormation stack "${stackName}",`,
'or delete the stack if it is no longer required.',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@exoego what you mean "delete the stack if it is no longer required"? 🤔

Copy link
Contributor Author

@exoego exoego Jan 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly, sls remove can not delete the stack of which the deploy bucket is deleted accidentally,
So, if user want to delete the stack which is no longer required, the stack should be manually deleted.

Copy link
Member

@eahefnawy eahefnawy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG2M! Thanks @exoego

@eahefnawy eahefnawy merged commit d00e677 into serverless:master Jan 28, 2019
@exoego exoego deleted the fix-5699 branch January 28, 2019 11:20
@eahefnawy eahefnawy added this to the 1.36.4 milestone Jan 28, 2019
@shortjared shortjared added the bug label Feb 6, 2019
@krlozadan
Copy link

Hello, I know this has been closed but I have the same issue when the bucket was deleted and I'm trying to upload the service again. This is the error that I got:

Serverless: DOTENV: Loading environment variables from .env:
Serverless:      - JWT_SECRET
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Uploading CloudFormation file to S3...
 
  Serverless Error ---------------------------------------
 
  The specified bucket does not exist
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com
 
  Your Environment Information ---------------------------
     OS:                     darwin
     Node Version:           10.15.3
     Serverless Version:     1.46.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The specified bucket does not exist: Should tell me the bucket name
4 participants