Stack 'test-project-dev' does not exist

Hello All,

ITS VERY URGENT AND COULD SOME ONE PLEASE HELP ME

When I try deploy serverless giving me below error,

PS C:\projects\ReactJS\07132019\demo-serverless> serverless deploy -v
Serverless: Packaging service…
Serverless: Excluding development dependencies…
Serverless: Creating Stack…
Serverless: Checking Stack create progress…
CloudFormation - CREATE_IN_PROGRESS - AWS::CloudFormation::Stack - test-project-dev
CloudFormation - CREATE_IN_PROGRESS - AWS::S3::Bucket - ServerlessDeploymentBucket
CloudFormation - CREATE_FAILED - AWS::S3::Bucket - ServerlessDeploymentBucket
CloudFormation - DELETE_IN_PROGRESS - AWS::CloudFormation::Stack - test-project-dev
CloudFormation - DELETE_COMPLETE - AWS::S3::Bucket - ServerlessDeploymentBucket
CloudFormation - DELETE_COMPLETE - AWS::CloudFormation::Stack - test-project-dev
Serverless: Stack create finished…

Serverless Error ---------------------------------------

Stack ‘test-project-dev’ does not exist

1 Like

Hello All,

ITS VERY VERY URGENT AND CAN SOME ONE HELP ME PLEASE?

THANK YOU SO MUCH FOR YOUR KIND HELP IN ADVANCE,

REGARDS,
BALA

Does the S3 bucket it is trying to make already exist? Remember that buckets need to be globally unique, in other words no other bucket with that name anywhere in the world must exist.

Hey [garethmcc],

Thank you so much for your prompt response and greatly appreciated.

I do understand, but the problem over here, in personal AWS account works well and able to invoke lambda from from remotely after performing the command serverless deploy.

the same repository doesn’t work when I try to deploy in my work - organization aws account using serverless deploy -v.

Please see below and ITS REALLY URGENT AND YOUR HELP WILL BE GREATLY APPRECIATED,

PS C:\projects\sls\07142019\serverless-demo> serverless deploy --aws-profile default -v
Serverless: Packaging service…
Serverless: Excluding development dependencies…
Serverless: Creating Stack…
Serverless: Checking Stack create progress…
CloudFormation - CREATE_IN_PROGRESS - AWS::CloudFormation::Stack - my-test-project-dev
CloudFormation - CREATE_IN_PROGRESS - AWS::S3::Bucket - ServerlessDeploymentBucket
CloudFormation - CREATE_FAILED - AWS::S3::Bucket - ServerlessDeploymentBucket
CloudFormation - DELETE_IN_PROGRESS - AWS::CloudFormation::Stack - my-test-project-dev
CloudFormation - DELETE_COMPLETE - AWS::S3::Bucket - ServerlessDeploymentBucket
CloudFormation - DELETE_COMPLETE - AWS::CloudFormation::Stack - my-test-project-dev
Serverless: Stack create finished…

Serverless Error ---------------------------------------

Stack ‘my-test-project-dev’ does not exist

Your Environment Information ---------------------------
OS: win32
Node Version: 10.16.0
Serverless Version: 1.47.0

If the S3 bucket name is the same when deploying to your account as when deploying to the work account, that is the problem. S3 bucket names need to be globally unique; i.e. across AWS accounts and across regions. For example, if you tried to create a bucket with the same name as a bucket I have created, you will get an error.

One way to get past this error when naming things that will be used local and in dev and in prod, etc is to add the stage (dev, prod, local) to the bucket name using ${opt:stage) and then passing the stage as an option with the deploy command: severless deploy --stage dev

Hey Garethmcc,

Thank you so much for your help.

If I understand correctly, serverless framework generating some unique bucket examples - my-test-project-prod-serverlessdeploymentbucket-ogmc9oi0007q (was generated when I deploy to my personal AWS account - assuming aws is generating random bucket to make it unique - COULD SOME ONE CORRECT ME IF MY UNDERSTANDING IS INCORRECT?) for each deploy.

When I deploy the same code to my official account, I’m getting the below error,

PS C:\projects\sls\07142019\serverless-demo> serverless deploy --aws-profile default -v
Serverless: Packaging service…
Serverless: Excluding development dependencies…
Serverless: Creating Stack…
Serverless: Checking Stack create progress…
CloudFormation - CREATE_IN_PROGRESS - AWS::CloudFormation::Stack - my-test-project-dev
CloudFormation - CREATE_IN_PROGRESS - AWS::S3::Bucket - ServerlessDeploymentBucket
CloudFormation - CREATE_FAILED - AWS::S3::Bucket - ServerlessDeploymentBucket
CloudFormation - DELETE_IN_PROGRESS - AWS::CloudFormation::Stack - my-test-project-dev
CloudFormation - DELETE_COMPLETE - AWS::S3::Bucket - ServerlessDeploymentBucket
CloudFormation - DELETE_COMPLETE - AWS::CloudFormation::Stack - my-test-project-dev
Serverless: Stack create finished…

Serverless Error ---------------------------------------

Stack ‘my-test-project-dev’ does not exist

When I go and check CloudTrail and CloudWatch, I don’t find any logs. I really don’t understand, should give some logs about errors right? At least these logs may help to debug and analyze.

I really don’t understand what’s really causing in this scenario and did anyone come across this scenario and HELP ME IN UNDERSTANDING WHAT"S HAPPENING?

Thank you so much for your favor in advance,

hi,

Did you ever figure out what caused this?

I’m experiencing the same error too.

  Your Environment Information ---------------------------
     Operating System:          darwin
     Node Version:              10.16.3
     Framework Version:         1.65.0
     Plugin Version:            3.4.1
     SDK Version:               2.3.0
     Components Version:        2.22.3

thx!

Thanks for your share very much

Hello, for future reference, if you are using codepipeline you might get this error because you did not set the right s3 access policy to the pipeline

1 Like

I can relate, thank you!

Change service name worked for me.