Serverless Error - stack my-service-dev does not exist

Need help. I’m executing serverless deploy -v --aws-profile abc and I get an error Serverless Error - stack my-service-dev does not exist. It fails on AWS::S3::bucket step.

How can I solve this error? Is there detailed level logs some where? I exported env variable SLS_DEBUG=*.
See below stack output executing serverless deploy command.

sxy1651@vagrant-ubuntu-trusty-64:~/my-service$ serverless deploy -v --aws-profile mw_np
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command metrics
Serverless: Load command print
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Invoke deploy
Serverless: Invoke package
Serverless: Invoke aws:common:validate
Serverless: Invoke aws:common:cleanupTempDir
Serverless: Packaging service…
Serverless: Excluding development dependencies…
Serverless: Invoke aws:package:finalize
Serverless: Invoke aws:common:moveArtifactsToPackage
Serverless: Invoke aws:common:validate
Serverless: Invoke aws:deploy:deploy
Serverless: [AWS cloudformation 400 0.433s 0 retries] describeStacks({ StackName: ‘my-service-dev’ })
Serverless: Creating Stack…
Serverless: [AWS cloudformation 200 0.701s 0 retries] createStack({ StackName: ‘my-service-dev’,
OnFailure: ‘DELETE’,
Capabilities: [ ‘CAPABILITY_IAM’, ‘CAPABILITY_NAMED_IAM’, [length]: 2 ],
Parameters: [ [length]: 0 ],
TemplateBody:
‘{“AWSTemplateFormatVersion”:“2010-09-09”,“Description”:“The AWS CloudFormation template for this Serverless application”,“Resources”:{“ServerlessDeploymentBucket”:{“Type”:“AWS::S3::Bucket”,“Properties”:{“BucketEncryption”:{“ServerSideEncryptionConfiguration”:[{“ServerSideEncryptionByDefault”:{“SSEAlgorithm”:“AES256”}}]}}}},“Outputs”:{“ServerlessDeploymentBucketName”:{“Value”:{“Ref”:“ServerlessDeploymentBucket”}}}}’,
Tags: [ { Key: ‘STAGE’, Value: ‘dev’ }, [length]: 1 ] })
Serverless: Checking Stack create progress…
Serverless: [AWS cloudformation 200 0.338s 0 retries] describeStackEvents({ StackName:
‘arn:aws:cloudformation:us-east-1:630524976104:stack/my-service-dev/9028a140-7276-11e9-81ca-12d48e821f84’ })
CloudFormation - CREATE_IN_PROGRESS - AWS::CloudFormation::Stack - my-service-dev
CloudFormation - CREATE_IN_PROGRESS - AWS::S3::Bucket - ServerlessDeploymentBucket
Serverless: [AWS cloudformation 200 0.324s 0 retries] describeStackEvents({ StackName:
‘arn:aws:cloudformation:us-east-1:630524976104:stack/my-service-dev/9028a140-7276-11e9-81ca-12d48e821f84’ })
CloudFormation - CREATE_FAILED - AWS::S3::Bucket - ServerlessDeploymentBucket
CloudFormation - DELETE_IN_PROGRESS - AWS::CloudFormation::Stack - my-service-dev
Serverless: [AWS cloudformation 200 0.323s 0 retries] describeStackEvents({ StackName:
‘arn:aws:cloudformation:us-east-1:630524976104:stack/my-service-dev/9028a140-7276-11e9-81ca-12d48e821f84’ })
Serverless: [AWS cloudformation 200 0.327s 0 retries] describeStackEvents({ StackName:
‘arn:aws:cloudformation:us-east-1:630524976104:stack/my-service-dev/9028a140-7276-11e9-81ca-12d48e821f84’ })
CloudFormation - DELETE_COMPLETE - AWS::S3::Bucket - ServerlessDeploymentBucket
CloudFormation - DELETE_COMPLETE - AWS::CloudFormation::Stack - my-service-dev
Serverless: Stack create finished…
Serverless: [AWS cloudformation 400 0.329s 0 retries] describeStackResource({ StackName: ‘my-service-dev’,
LogicalResourceId: ‘ServerlessDeploymentBucket’ })

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

Stack ‘my-service-dev’ does not exist

Stack Trace --------------------------------------------

ServerlessError: Stack ‘my-service-dev’ does not exist
at promise.catch.err (/usr/local/lib/nodejs/node-v10.15.3-linux-x64/lib/node_modules/serverless/lib/plugins/aws/provider/awsProvider.js:295:11)
at process._tickCallback (internal/process/next_tick.js:68:7)

Your Environment Information ---------------------------
OS: linux
Node Version: 10.15.3
Serverless Version: 1.41.1

1 Like

I am also having the same issue

1 Like

Same issue. I’d like to let engineers deploy to a stack like dev-johndoe1 and have it just work. Is that possible?