Book Image

Building and Delivering Microservices on AWS

By : Amar Deep Singh
4 (1)
Book Image

Building and Delivering Microservices on AWS

4 (1)
By: Amar Deep Singh

Overview of this book

Reliable automation is crucial for any code change going into production. A release pipeline enables you to deliver features for your users efficiently and promptly. AWS CodePipeline, with its powerful integration and automation capabilities of building, testing, and deployment, offers a unique solution to common software delivery issues such as outages during deployment, a lack of standard delivery mechanisms, and challenges faced in creating sustainable pipelines. You’ll begin by developing a Java microservice and using AWS services such as CodeCommit, CodeArtifact, and CodeGuru to manage and review the source code. You’ll then learn to use the AWS CodeBuild service to build code and deploy it to AWS infrastructure and container services using the CodeDeploy service. As you advance, you’ll find out how to provision cloud infrastructure using CloudFormation templates and Terraform. The concluding chapters will show you how to combine all these AWS services to create a reliable and automated CodePipeline for delivering microservices from source code check-in to deployment without any downtime. Finally, you’ll discover how to integrate AWS CodePipeline with third-party services such as Bitbucket, Blazemeter, Snyk, and Jenkins. By the end of this microservices book, you’ll have gained the hands-on skills to build release pipelines for your applications.
Table of Contents (21 chapters)
1
Part 1: Pre-Plan the Pipeline
6
Part 2: Build the Pipeline
11
Part 3: Deploying the Pipeline

Creating an AWS CodeBuild project

In order to understand the AWS CodeBuild service better, we need to create a CodeBuild project and then connect it to our source code repository to build some code. The instructions to create a CodeBuild project are as follows:

  1. Log in to the AWS console, search for CodeBuild, open it, and click on the Create project button:
Figure 8.2 – AWS CodeBuild getting started page

Figure 8.2 – AWS CodeBuild getting started page

  1. Provide the project name and description. You can also specify any resource tag if needed:
Figure 8.3 – Creating the build project in AWS CodeBuild

Figure 8.3 – Creating the build project in AWS CodeBuild

  1. The Source section allows you to specify what type of source code repository you want to integrate and download source code to build from. You can integrate CodeBuild with any of the following source code providers:
    • Amazon S3
    • AWS CodeCommit
    • GitHub
    • BitBucket
    • GitHubEnterprise

The steps to connect with any of these are the same: you have to...