agiledigital / agiledigital/serverless-sns-sqs-lambda

First deploy issue while using serverless-iam-roles-per-function plugin.

Aperta
#705 1 commento 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
85
Fork
20
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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 ;-)

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.