agiledigital / agiledigital/serverless-sns-sqs-lambda
First deploy issue while using serverless-iam-roles-per-function plugin.
- 主要语言
- TypeScript
- 星标
- 85
- 派生
- 20
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hi,
I'm using **_agiledigital/serverless-sns-sqs-lambda_** and it works great, but I had an issue while using it with _**serverless-iam-roles-per-function**_ plugin and I didn't found any information about it.
Before, we were using the snssqs plugin within already created serverless projects, that had the permissions globally. So every function inherits all the defined permissions. That's not a great pattern, I know :-|.
I took the opportunity that allows me a new fresh project to finally use the serverless-iam-roles-per-function plugin, so that every function has the minimal permissions.
And so I found the error while deploying my project and I will try to describe what happened :
### First attempt:
- **Current Conditions:**
- The lambda was not previously created on my AWS account.
- The lambda has a iamRoleStatements definition
- **Deploy Results:**
- Deploy error. _Resource handler returned message: "Invalid request provided: The provided execution role does not have permissions to call ReceiveMessage on SQS (Service: Lambda, Status Code: 400, HandlerErrorCode: InvalidRequest)_
### Second attempt:
- **Current Conditions:**
- The lambda was not previously created on my AWS account.
- I removed the iamRoleStatements definition
- **Deploy Results:**
- No Deploy error, so the lambda was created with the snsSqs subscription.
### Third attempt:
- **Current Conditions:**
- The lambda already exists from the Second Attempt.
- I added the iamRoleStatements definition
- **Deploy Results:**
- No Deploy error, so the lambda maintains its snssqs subscription and has the role by function.
I found a workaround, but it will be nice to fix it or to add this information to troubleshoot it.
Thanks in advance.
Carlos ;-)
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。