Sending Webhooks to AWS SQS

Open Loyalty now allows you to send webhook events directly to an Amazon Web Services (AWS) Simple Queue Service (SQS) queue.

This new functionality is ideal when you need to process events asynchronously, ensuring that your system can handle high volumes of data without being overwhelmed by direct HTTP requests. Instead of sending real-time data to an external system via an HTTPS request, events are pushed to an SQS queue, where they can be processed at your own pace.


Step-by-step instructions

To configure Open Loyalty to send webhooks to AWS SQS, follow these steps:

1

Navigate to Webhook Configuration

In the Open Loyalty admin panel, go to the section where you configure webhooks.

2

Create a New Webhook Subscription

Click on the button Add webhook.

3

Select Integration Type

Under Integration type, choose the Send to queue option.

4

Select Webhook Name

Select the webhook name (or subscribe to all webhooks) that you want to receive.

5

Enter Queue URL

Input the Queue URL for your AWS SQS queue. This URL identifies the specific SQS queue where events will be sent.

6

Enter Access Key

Enter your Access key. This is the access key created when you set up security credentials for your SQS user account in AWS.

7

Enter Secret Key

Enter your Secret key. This is the secret key created when you set up security credentials for your SQS user account in AWS.

8

Enable Payload Encryption (Optional)

If you need to ensure secure delivery of your webhook data, you can enable the Encrypt payload toggle. When enabled, the webhook payload will be encrypted before being sent to the SQS queue.

9

Save Configuration

Once all the required fields are filled, save your webhook configuration by clicking Add webhook button.


Final tips and comments

  • Asynchronous Processing: Sending webhooks to SQS is particularly useful for asynchronous processing. This means your application doesn't have to immediately respond to every webhook event, allowing for more robust and scalable integrations.

  • Error Handling and Retries: AWS SQS automatically handles message durability and offers features like Dead-Letter Queues (DLQs), which can be very helpful for managing messages that fail processing.

  • AWS Credentials: Ensure that the AWS Access Key and Secret Key you use have the necessary permissions to send messages to the specified SQS queue. Granting the least privilege is a security best practice.

  • Queue Visibility Timeout: Be mindful of your SQS queue's visibility timeout setting. This determines how long messages are invisible to other consumers after being picked up, preventing multiple consumers from processing the same message.

  • Payload Encryption When using payload encryption, ensure that your receiving system (the SQS consumer) is capable of decrypting the payload using the corresponding key or method. This adds an extra layer of security for sensitive data.

Last updated

Was this helpful?