Build a Github Webhook handler with API Gateway & AWS Lambda

preview_player
Показать описание
Github has a very mature webhook integration where you can be notified of a wide range of events.

In this tutorial, we'll show how to handle Github webhooks.

We'll create a webhook that fires whenever our open-source repository is starred.
Our handler for this event will post a celebratory message using SNS to the owner of the repo.

Prerequisite:
----------------------
In-depth intuition on Webhooks-Push-Styled API with Hands-On Demo

Lambda Code:
---------------------------
import json

def lambda_handler(event, context):



repository_name=body_part['repository']['name']
print("The repo name : {}".format(repository_name))

count_of_stars=body_part['repository']['stargazers_count']
print("The count of stars : {}".format(count_of_stars))

user_who_gave_star=body_part['sender']['login']
print("The user who gave star : {}".format(user_who_gave_star))

url_of_the_user_who_gave_star=body_part['sender']['html_url']
print("The profile of the user : {}".format(url_of_the_user_who_gave_star))

return {
'statusCode': 200,
}

Check this playlist for more Data Engineering related videos:

Snowflake Complete Course from scratch with End-to-End Project with in-depth explanation--

🙏🙏🙏🙏🙏🙏🙏🙏
YOU JUST NEED TO DO
3 THINGS to support my channel
LIKE
SHARE
&
SUBSCRIBE
TO MY YOUTUBE CHANNEL
Рекомендации по теме
Комментарии
Автор

very nice example, thank you so much!

juanramonzapatamercado
Автор

Bro can we directly connect webhooks to lamda

TradingBantai
welcome to shbcf.ru