How to force deployment?


#1

I was just playing with deployment on serverless. The problem I have now is that after I manually deleted the s3 bucket, I’m no longer able to deploy. I get a ‘The specified bucket does not exist’ error. I cannot find any option to ‘force deploy’. What is the trick to fix an issue like this, where you manually remove one of the deployed items.

Thanks
Jesper


#2

I found that changing the service name in .yml, from e.g
service:server
to
service:serverV1
solves the issue. I have not been able to find where this information is stored.


#3

Got it. It checks the deployment against the stored CloudFormation stack, which is named '-.
Once I deleted the stack, then I can redeploy. Makes perfect sense.


#4

Nice one finding/sharing this fix!


#5

If this is DEV deploy or something you are playing with. You can change the region. This will make the deployment happen
e.g.
serverless deploy --region eu-central-1