I am observing this error, upon redeployment.
Serverless Error ---------------------------------------
An error occurred while provisioning your stack: SNSTopicSolicitationRequests
- SolicitationRequests already exists in stack arn:aws:cloudformation:us-east-1:785321780735:stack/bsvcs-dev/cc6e4300-0520-11e7-be4c-503acac41e99.
However, the topic does not exist. I suspect that there is some left over item somewhere from a previous deployment, but it is not the reported topic.
How can I remedy this situation?
I’ve worked around similar issues by deleting the topic & redeploying or by commenting out the attached event in serverless.yml and attaching manually via the Web console.
You can get into this state if the topic has been manually remove.
- Remove or comment out all references to the SNS topic (event sources, resources, iam role statements, etc)
- Deploy. This will cause CloudFormation to remove it from the stack
- Add the references back
- Deploy. This should cause CloudFormation to create the topic again.
Manually attaching the topic via the AWS console is out of the questions, since these are supposed to be automated deployments.
However, I did follow the suggestion from @buggy, and verified that the topic(s) did not exist. However upon redeploy, with the topic references, I still get the failures.
I did notice, however, that when I remove the references, and the deployment is successful, the stack outputs show a “qualified” function ARN, which seems to have an incrementing “version” number. eg;
I’m wondering if some remaining data from previous versions is gorking my deployments. ServerLess™ claims the following during deployment.
Serverless: Stack update finished...
Serverless: Removing old service versions...
However, it does not seem to remove old “qualified” versions of the functions.
I also tried deleting the entire CF stack, including the deployment bucket, but the problem persists.
btw: below is my “Environment Information”, in case that might be pertinent.
Your Environment Information -----------------------------
Node Version: 4.3.2
Serverless Version: 1.5.0