A [Channels](https://git.legalplace.eu/legalplace/processchannels) extension to make it easier to process channels using AWS Lambda.
npm install serverless-marketingA Channels extension to
make it easier to process channels using AWS Lambda.
``shell`
$ yarn global add serverless typescript ts-node
$ yarn add --dev @types/node
$ serverless plugin install --name serverless-stage-manager
$ yarn deploy:staging
`shell`
$ yarn dev:marketing
`shell`
$ yarn dev:sf
Example with --data flag :
`shell`
$ sls invoke local --function sqsSalesForceContact --data '{
"Records": [{"body": "{\"email\":\"sami.ghorbel@legalplace.fr\",\"attributes\":{\"SMS\":\"33666666666\"},\"listIds\":[\"14491d98-5c66-4a3b-986c-cb0ec659f357\"]}"}]
}'PLUGINS
1. serverless-plugin-tracing:
it will be necessary to add it in serverless.yml.
``
tracing: true
Add tracing in the lambda function you want to monitor
``
const awsXRay = require('aws-xray-sdk')
awsXRay.captureAWS(require('aws-sdk'))
Add these libraries in the handler (lambda function)
To move messages from a dead letter queue back to the original queue in Amazon
SQS.
```
npx replay-aws-dlq [source_queue_url] [dest_queue_url]