Test drive sqs integration with aws lambda
This demo repo uses boilerplate project from Serverless Node.js Starter
-
Node
-
Yarn
curl -o- -L https://yarnpkg.com/install.sh | bash
yarn bash completion
- https://github.com/dsifford/yarn-completion
- Terraform
brew install terraform
- Serverless
# If you don't already have the serverless cli installed, do that
yarn global add serverless
# Install dependencies
yarn
1. Create sqs queue on aws account
2. cd terraform && terraform init
3. terraform plan
4. terraform apply
-
Create sqs queue via terraform above
-
Update the sqs queue url in src/producer.js file and the arn in serverless.yml
-
Assuming you've already set up your default AWS credentials
yarn deploy:dev
will deploy to "dev" environment.
UPDATE change is now in the latest serverless release 1.28.0
Will add your queue as the trigger for worker function
Trigger the producer fn via a test event.
The producer will generate random messages and send them to the queue.
You can send in up to 10 messages at a time based on the config batch size
Managing Throughput with concurrency control
The consumer function can handle up to 5 concurrent executions currently. This config can be changed in the serverless.yml
file
Automated Dependency Updates
Renovate runs continuously to detect the latest available versions. And automagicaly creates PR on your github project with changelog and release notes.
For more info and how to authorise the github app check out onboarding guide