Skip to content

Create reliable infrastructure on AWS to handling webhooks

Notifications You must be signed in to change notification settings

jeanpsv/aws-webhook-processing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aws-webhook-processing

Create infrastructure on AWS to handle webhooks with reliability

Getting Started

Download Terraform client

Create AWS user

create AWS IAM User on AWS IAM and set:

  • access type: Programmatic access
  • policies: AdministratorAccess

save access_key and secret_key

Configure AWS Provider authentication

run the commands below replacing values for your access and secret keys:

$ export AWS_ACCESS_KEY_ID="anaccesskey"
$ export AWS_SECRET_ACCESS_KEY="asecretkey"

Let's apply Terraform changes

run the commands below:

$ cd terraform/
$ terraform init # to download all dependencies
$ terraform plan # to plan a modification
$ terraform apply # to apply this change

After the terraform apply you can see the API Gateway endpoint in terminal. Use this url to make a HTTP POST

Destroy infrastructure

run terraform destroy to clean up.

Architecture

The architecture created is:

  • API Gateway receive HTTP request (Webhook endpoint) and send to Lambda Callback
  • Lambda Callback write request's body in SQS Queue
  • A new event in SQS Queue start the Lambda Worker
  • Lambda Worker process the message

This architecture works, but we can simplify to:

  • API Gateway receive HTTP request (Webhook endpoint) and write it in SQS Queue
  • A new event in SQS Queue start the Lambda Worker
  • Lambda Worker process the message

About

Create reliable infrastructure on AWS to handling webhooks

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published