Menu
×
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

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.


Trustworthy Client

The trustworthy client has a secure interaction between your systems.

The webhook is established outside of the interaction process.


Untrusted Client

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

AWS Serverless Exercises

Test Yourself With Exercises

Exercise:

Fill in the blanks

Webhook Pattern has trustworthy and  clients

Start the Exercise