mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
Improvements on SQS docs as suggested on #6516
This commit is contained in:
parent
69972e5bde
commit
e1473c7d7e
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user