@cfn-modules/lambda-event-source-sqs-queue
v1.0.0
Published
SQS queue event source for AWS Lambda function
Downloads
20
Keywords
Readme
cfn-modules: AWS Lambda event source: SQS queue
SQS queue event source for AWS Lambda function.
Install
Install Node.js and npm first!
npm i @cfn-modules/lambda-event-source-sqs-queueUsage
WARNING: We recommend to set the
ReservedConcurrentExecutionsparameter in the lambda-function module when using this module. If you do not set the parameter and many messages arrive, the Lambda function scales up to the regional limit which impacts other Lambda functions in the same region in your AWS account. For most use cases a value of 10 should be fine. If the SQS queue length grows you might want to increase the number.
---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'cfn-modules example'
Resources:
EventSource:
Type: 'AWS::CloudFormation::Stack'
Properties:
Parameters:
LambdaModule: !GetAtt 'Function.Outputs.StackName' # required
QueueModule: !GetAtt 'Queue.Outputs.StackName' # required
BatchSize: 10 # optional
TemplateURL: './node_modules/@cfn-modules/lambda-event-source-sqs-queue/module.yml'