Creating a simple Continuous Delivery pipeline allowing you to push changes from your GitHub repository to your EC2 Instances.
The following AWS services are used to create a Continuous Delivery pipeline.
- CodePipeline
- CodeDeploy
- CloudFormation
- EC2
- S3
- IAM
- Lambda
Fork this repository.
Use the ./setup.sh
script to create a Continuous Delivery pipeline.
The script do the following:
- Create S3 bucket
- ZIP a lambda function
- Upload the archive to S3 Bucket
- Create a CloudFormation stack
- Deploy function to Lambda service
- Create a CodePipeline
- Launch an EC2 instance into the default VPC of your default region.
- Run Lambda function to test static website on EC2 httpd service
The script will ask you for:
- S3 Bucket name for Lambda function artifact
- Cloudformation Stack name
- GitHub repository
- GitHub owner (username of individual or organisation)
- GitHub OAuth Token with access to Repo.
It might take a few minutes until the CodePipeline job has finished and the EC2 Instance is able to answer your HTTP request.