Connect Your Git Repository to Amazon S3 and AWS Services Using Webhooks and New Quick Start

Posted on: Sep 7, 2017

This new Quick Start automatically deploys HTTPS endpoints and AWS Lambda functions for implementing webhooks, to enable event-driven integration between Git services and Amazon Web Services (AWS) services on the AWS Cloud. 

The Quick Start implements the endpoints and required code to trigger a Lambda function that zips up the code in your Git repository and places it in Amazon Simple Storage Service (Amazon S3). It implements two endpoints: one uses the Git provider’s HTTP API to download a zipped copy of the current Git repository, and the other uses SSH to pull from the Git repository. You can choose either endpoint depending on your use case, repository size, and any other requirements.  

After you deploy the Quick Start, you can set up a webhook that uses the endpoints to create a bridge between your Git repository and AWS services like AWS CodePipeline and AWS CodeBuild that use Amazon S3 as a source. With this setup, builds and pipeline executions occur automatically when you commit your code to a Git repository, and your code can be continuously integrated, tested, built, and deployed on the AWS Cloud with each change. 

The deployment includes API Gateway, to accept webhook requests from Git, Lambda functions to connect to the Git service, an AWS KMS key to encrypt the SSK private key for connections, and S3 buckets for the zipped contents of your Git repository and the AWS KMS-encrypted private keys. The Quick Start doesn’t create or configure webhooks, because the process varies depending on the Git software you are using.  

The deployment is automated by an AWS CloudFormation template that you can customize during launch. You can also use the template as a starting point for your own implementation, by downloading it from the Quick Start GitHub repository. The Quick Start includes a guide with step-by-step deployment and configuration instructions.  

To get started with the webhooks integration on AWS, use the following resources:

About Quick Starts
Quick Starts are automated reference deployments for key workloads on the AWS Cloud. Each Quick Start launches, configures, and runs the AWS compute, network, storage, and other services required to deploy a specific workload on AWS, using AWS best practices for security and availability.