AWS Serverless Webhook Pattern with SNS
Webhook Pattern with AWS SNS
Using webhooks as an alternative to polling is one way to improve the polling strategy.
Webhooks are HTTP callbacks that the user defines.
A callback is a function passed as an argument to another function.
This pattern has two sorts of clients: trustworthy and untrusted.
The trustworthy client has a secure interaction between your systems.
The webhook is established outside of the interaction process.
With the untrusted client, you obtain webhook information via the registration process or as part of the API data.
It is a more complicated pattern than a polling pattern.
Securing access configuration might be difficult.
Webhook Pattern with AWS SNS Video
W3schools.com collaborates with Amazon Web Services to deliver digital training content to our students.
How It Works
The client configures the webhook and receives the request ID from API Gateway.
During that time, the backend service performs the job asynchronously.
The webhook uses less resources because the client does not need to check for status updates.
Trustworthy clients may use Amazon SNS to configure an HTTP subscriber.
Related reads:Amazon SNS Overview
Amazon SNS Limits and Restrictions