AWS AppSync to Amazon SQS

AWS AppSync → SQS

Create an AppSync GraphQl API that sends messages to an SQS queue

The CDK template creates an AppSync API with an Amazon SQS as HTTP data source. An SQS queue is created, along with an IAM role that provides the AppSync API permission to send messages to that specific queue. Using the sendMessage query, you can add a message to the queue.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/cdk-appsync-sqs

Deploy

cdk deploy


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

1. Delete the stack: npx cdk destroy.
2. Confirm the stack has been deleted: aws cloudformation list-stacks --query "StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus".
3. You see a message confirming DELETE_COMPLETE.

Created by:

Brice Pellé

Brice Pellé

Principal Solution Architect, AppSync - AWS.