AWS SAM for setting up Amazon Connect WhatsApp Campaign.
This article will provide you the AWS SAM to setup your Amazon Connect WhatsApp Campaign.
Anonymous User
Amazon Employee
Published Jun 4, 2025
Here's a complete AWS SAM template for a WhatsApp outbound campaign solution with Amazon Connect:
Now, let's create the Step Functions state machine definition:
Now, let's implement the key Lambda functions:
Now, let's implement the WhatsApp message sender function:
Now, let's implement the WhatsApp webhook handler:
Finally, let's implement the campaign executor function:
Create a README.md file with deployment instructions:
This completes the AWS SAM template and implementation for a WhatsApp outbound campaign solution with Amazon Connect. The solution leverages Amazon Connect's built-in campaign metrics and dashboard capabilities, eliminating the need for custom metrics storage in DynamoDB.
The implementation includes:
- Campaign management through a REST API
- Integration with Amazon Connect campaigns
- WhatsApp message sending via Meta's API
- Webhook handling for message status updates
- Metrics retrieval from Amazon Connect's native analytics
This approach provides a streamlined solution that takes advantage of Amazon Connect's robust campaign management and reporting capabilities while extending them to support WhatsApp as a communication channel.
Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.