I'd like to continue the deployment (or force) even if a resource already exists.
Atm I got this error:
Serverless Error ---------------------------------------
An error occurred while provisioning your stack: AvailableDynamoDbTable
- Available already exists.
This question is fairly old, but still shows up in the top 5 results in Google, so here is a bit of an insight:
It's a good idea to split up your serverless stack into multiple services, each having its own serverless.yml
file. One for your API and lambdas, one for your DynamoDB. This way you can deal with them separately and update your lambdas without touching your DB.
Here is a great guide on that:
Backup the table and delete it. Restore once deployed.
I had the same issue when I renamed my serverless project and tried to deploy. I had a table tanks
that was being used again.
It failed with the following
Serverless Error ---------------------------------------
An error occurred: TanksDynamoDbTable - tanks already exists in stack arn:aws:cloudformation:eu-central-1:592235674655:stack/colossal-dev/105693a8-77af-11e9-8f9e-2a86e4085a59.
I got it solved by making a backup of the tanks table, then deleting it.
After deleting, one must wait for five minutes because the caches are cleaned periodically and not immediately.
After that, I tried serverless deploy
and it worked.
After this, you will need to restore the backed up database.
Its not possible atm with [email protected].
I just open an issue on github: https://github.com/serverless/serverless/issues/3183
Please, everyone that need this feature, join this discussion.
I will update here with news.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With