Example usage of Lawos with Serverless to process messages from an Amazon SQS queue with AWS Lambda functions.
- Use CloudWatch Schedule to run Lambda function every minute
- Use CloudWatch Alarms to run Lambda function if SQS contains more than 100 messages
$ > git clone git@github.com:sbstjn/lawos-serverless.git && cd lawos-serverless
$ > npm install
$ > npm run deploy
$ > npm run invoke
Use wrk to add some messages to your SQS queue. You need to enable anonymous access to sendMessage for your queue first!
$ > wrk -c25 -d10 -t15 \
-s helper/wrk.lua \
https://sqs.eu-west-1.amazonaws.com/YourAccountID/dev-lawos-serverless-backlog