Webhooks Processing: HTTP API Gateway + SQS +Lambda

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 มิ.ย. 2023
  • 🌟 *Master AWS Fundamentals!* 🌟
    Ready to dive into the world of cloud computing? Check out this comprehensive course on Coursera: AWS Fundamentals Specialization
    imp.i384100.net/WqnRe3
    This course covers everything you need to know about Amazon Web Services, from the basics to advanced concepts, making it perfect for both beginners and those looking to enhance their cloud skills. Enroll now and elevate your career with in-demand AWS expertise! 📚🚀
    In this video we will look at a real world application of HTT API Gateway and Lambda. Together with Simple queue service they can be used to process webhooks.
    Receiving and processing webhooks with AWS HTTP API Gateway, SQS, and Lambda provides the following advantages.
    - HTTP API Gateway is highly available and can sustain heavy loads.
    - SQS temporarily stores webhooks’ data and enables re-tries
    - Lambda functions process webhooks’ data and the number of concurrent functions can be adjusted not to overload the upstream

ความคิดเห็น • 19

  • @theREALfrancyz
    @theREALfrancyz 19 วันที่ผ่านมา +1

    Thank you for creating a simple project utilizing webhooks and APIs on AWS! This gives me a better understanding even though I don't have real-world experience yet.

    • @alexrusin
      @alexrusin  15 วันที่ผ่านมา

      Glad it was helpful!

  • @perminusgaita
    @perminusgaita หลายเดือนก่อน +2

    Something to note, use this design only if you are anticipating bursts in traffic and you want asynchronous processing of your events. Otherwise api gateway to lambda/event bridge will do. This is because sqs queues add latency and also have to be polled to get messages. The polling can add costs as every poll is counted as an sqs execution.

    • @alexrusin
      @alexrusin  หลายเดือนก่อน +1

      That is a good point. Actually, if you are not expecting bursts in traffic you don't even need to do AWS services. It will be easier to just create a POST route in your application to receive webhooks.

  • @watchparty1
    @watchparty1 ปีที่แล้ว +3

    Another good tutorial. Well done.

    • @alexrusin
      @alexrusin  ปีที่แล้ว +1

      Thanks again!

  • @Fisher0fM3n
    @Fisher0fM3n 4 หลายเดือนก่อน +1

    Thank you so much! This helped out a lot

    • @alexrusin
      @alexrusin  4 หลายเดือนก่อน

      You are welcome. Glad it helped!

  • @diegotovaresp
    @diegotovaresp 6 หลายเดือนก่อน +1

    if i have 2 two headers one is a String and the second one is a byte[] , what i have to put in the Message Attributes input ... i cant read very well in the video thanks for the help

    • @alexrusin
      @alexrusin  6 หลายเดือนก่อน

      Your headers from the API request will be always coming in as a string (unless they come up with a new HTTP protocol). You can map your headers like so {"hmac":{"DataType":"String","StringValue":"${request.header.x-hmac}"}} in Message Attributes for SQS integration.

  • @oleksandrhubachov9201
    @oleksandrhubachov9201 9 หลายเดือนก่อน +1

    I see completelly different UI in API Gateway, switching to old UI does not help. Can't understand on how to connect API Gateway with SQS

    • @alexrusin
      @alexrusin  9 หลายเดือนก่อน +1

      Maybe you selected create REST API instead of HTTP API. Be sure you are in the HTTP API. In order to connect API Gateway (HTTP Gateway type) to SQS you can go to integration settings and then choose manage integration settings if the option of creating integration settings is not available. In manage integration settings you can create a new integration and then you can attach it to the gateway.

  • @joegenshlea4605
    @joegenshlea4605 11 หลายเดือนก่อน +1

    Do you have a video on how to acknowledge the hmac token and save the body down to S3?

    • @alexrusin
      @alexrusin  10 หลายเดือนก่อน

      Unfortunately, I don't. It is a good idea, though, to follow up this video with HMAC validation.

    • @alexrusin
      @alexrusin  9 หลายเดือนก่อน +1

      I just created such video th-cam.com/video/fe26obf7Png/w-d-xo.html

  • @SivaKrishna-zj9jy
    @SivaKrishna-zj9jy 7 หลายเดือนก่อน +1

    I am not able to view Cloudwatch logs, should I configure some steps to view it?

    • @alexrusin
      @alexrusin  7 หลายเดือนก่อน

      Hmm, see if there's a check box when you are configuring lambda to create log groups. Maybe it was unchecked.

  • @amir-nvim
    @amir-nvim 8 หลายเดือนก่อน

    do you have any idea how can i send custom header ? but i don't want have default value it comes from webhook

    • @alexrusin
      @alexrusin  8 หลายเดือนก่อน +1

      When processing webhooks, you are not the one who sends headers. It is the application you are integrating with that sends you headers. For example Shopify will send X-Shopify-Topic, X-Shopify-Webhook-Id, etc headers. They are standard and will always be there. You can map those headers from HTTP API Gateway to SQS.
      If you are building an application that sends webhooks to other applications you can add your headers to POST requests that send webhooks. It is a good idea to prefix custom header with an "X", for example: X-My-Cool-App-HMAC.