I keep getting this error when I try to deploy a stack. Same deployment works on one computer and consistently fails on another. I read somewhere this could be cause by having similar function names, byt in my case I add a_, b_ c_ etc. to each function, and I still see the same error.
An error occurred while provisioning your stack: <function name>LogGroup
- /aws/lambda/<stage>-<function name> already exists.
Your Environment Information -----------------------------
OS: win32
Node Version: 6.9.0
Serverless Version: 1.8.0
I upgraded from 1.6 to latest 1.8, but still same issue.
Any suggestion of how to fix this
Hitting this issue again.
This time I have 2 users, userA, userB, both belonging to the same admin group.
deploying with userA’s credential works.
deploying with userB’s credentials consistently fails (on the same computer) with this error
Serverless Error ---------------------------------------
An error occurred while provisioning your stack: IamRoleLambdaExecution
- <name>-us-east-1-lambdaRole already exists.
Your Environment Information -----------------------------
OS: win32
Node Version: 6.9.4
Serverless Version: 1.8.0
Any suggestions ?
Edit: I manually went in and deleted all resources related to the failed deployment and after that I could deploy successful.
An additional approach that may help, at least on AWS, is going into Cloud Formation and identifying the resources that can’t delete/update/create. Then, attach the policies through IAM necessary to allow your serverless user to delete/modify/update/create those resources.
For me, the problem with using a separate user was that the privileges for that user were different. The error messaging through serverless did not fully direct me to the scope of the privileges missing to modify the existing resource, but AWS Cloud Formation gave additional detail.