Note
This repository is used to triage the issue aws-powertools/powertools-lambda-typescript#3077.
- Clone this repository.
- Run
npm ci
. - Run
npm run cdk deploy
and follow the prompts to deploy the stack. - Send two messages to the SQS queue created by the stack.
- run
aws sqs send-message --queue-url https://sqs.eu-west-1.amazonaws.com/123456789012/MyQueue --message-body '{"property1":1,"property2":"foo2"}'
(replace the Account ID in the queue url with your own) - run
aws sqs send-message --queue-url https://sqs.eu-west-1.amazonaws.com/123456789012/MyQueue --message-body '{"property1":1,"property2":"foo2","property3":"foo3"}'
(replace the Account ID in the queue url with your own)
- run
- Observe the logs in CloudWatch Logs.
- Send a message directly to the Lambda function.
- run
aws lambda invoke --function-name ParsesqsFn --invocation-type RequestResponse --log-type Tail --payload fileb://events/payload.json t.txt | jq -r .LogResult | base64 --decode
- run
- Observe the logs in CloudWatch Logs.
- Run
npm run cdk destroy
to clean up the stack.