Skip to content

Conversation

@andrestoll
Copy link
Contributor

Added a new pattern that demonstrates how to use the JSON protocol to send a message to SQS through API gateway and use the VTL to transform / filter said message

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.


curl --location --request POST $API_GATEWAY_SQS_RESOURCE_ENDPOINT \
--header 'Content-Type: application/json' \
-d @test/test-payload.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may want to update the path as the current directory is cdk

e.g. change this to

-d @../test/test-payload.json

or change directory before executing this command

@@ -0,0 +1,86 @@
# Amazon API Gateway to Amazon SQS with message filtering

This project contains sample AWS CDK code to create an API Gateway Rest API, an SQS Queue and the correct VTL integration mapping template to filter out parts of the message body.
Copy link
Contributor

@parikhudit parikhudit Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would appreciate if you could add more explanation of using message filtering using VTL vs other possible alternatives if any, along with example use-case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants