Improvements on SQS docs as suggested on #6516

This commit is contained in:
enzo-beltrami 2019-10-17 19:46:08 -03:00
parent 69972e5bde
commit e1473c7d7e

View File

@ -27,6 +27,7 @@ functions:
compute:
handler: handler.compute
events:
# These are all possible formats.
- sqs: arn:aws:sqs:region:XXXXXX:MyFirstQueue
- sqs:
arn:
@ -50,14 +51,26 @@ functions:
## Setting the BatchSize
For the SQS event integration, you can set the `batchSize`, which effects how many SQS messages will be included in a single Lambda invocation. The default `batchSize` is 10, and the max `batchSize` is 10.
For the SQS event integration, you can set the `batchSize`, which effects how many SQS messages can be included in a single Lambda invocation. The default `batchSize` is 10, and the max `batchSize` is 10.
```yml
functions:
preprocess:
handler: handler.preprocess
compute:
handler: handler.compute
events:
- sqs:
arn: arn:aws:sqs:region:XXXXXX:myQueue
batchSize: 10
```
## IAM Permissions
Your Lambda role must include the following permissions:
- sqs:ChangeMessageVisibility
- sqs:DeleteMessage
- sqs:GetQueueAttributes
- sqs:ReceiveMessage