Reader small image

You're reading from  AWS Certified Developer - Associate Guide - Second Edition

Product typeBook
Published inJun 2019
PublisherPackt
ISBN-139781789617313
Edition2nd Edition
Tools
Right arrow
Authors (2):
Vipul Tankariya
Vipul Tankariya
author image
Vipul Tankariya

Vipul Tankariya has a broad range of experience in cloud consulting, development, and training. He has worked with a number of customers across the globe, solving real-life business problems in terms of technology and strategy. He is also a public speaker at various AWS events and meetups. He has not only extensively worked on AWS, but is also certified in five AWS certifications. He is an accomplished senior cloud consultant and technologist with more than 21 years of experience. He is focused on strategic thought leadership concentrated around next-generation cloud-based solutions. He has a lot of experience in working on DevOps, CI/CD, and automation at each level of the delivery lifecycle of products, solutions, and services on the cloud.
Read more about Vipul Tankariya

Bhavin Parmar
Bhavin Parmar
author image
Bhavin Parmar

Bhavin Parmar has a broad range of experience in cloud consulting, development, and training. He actively participates in solving real-life business problems. He has not only extensively worked on AWS, but he is also certified in AWS and Red Hat. This book combines his AWS experience in solving real-life business problems with his hands-on deployment and development experience. Bhavin is an accomplished technologist and senior cloud consultant with more than 11 years of experience. He is focused on strategic thought leadership concentrated around next-generation cloud-based and DevOps solutions. He has also been instrumental in setting up cloud migration strategies for customers, building enterprise-class cloud solutions, and AWS training.
Read more about Bhavin Parmar

View More author details
Right arrow

Working with AWS CodeBuild

In the previous chapter, we saw how important a source code repository is in today's world, where software development and distribution happen at a phenomenal speed. Usually, an enterprise-grade remote source code repository (that is, AWS CodeCommit or Git) consists of several branches, such as the development branch, QA branch, staging branch, and master branch.

The main purpose of a development branch on a remote repository is to allow various teams of developers to fork a new branch for a bug fix, hotfix, or feature development, as and when required. They will clone this newly-forked branch on their local development laptop or a computer. During a development, each of the developers in a team will merge their code to the forked branch on a remote repository. Before merging this recently developed code with the development branch, it is essential...

Introducing AWS CodeBuild

In general, there are various models and strategies available to perform automated testing on an application or a source code. One of the most famous in testing strategies is Mike Cohn's Test Pyramid. In general, 70% of the time are spent on unit testing (that is, code testing). This can be done using AWS CodeBuild. Another 20% and 10% of the total time is spent on the service testing and UI testing, respectively, using third-party tools. The following diagram helps to illustrate this. The test starts with unit testing, which is more isolated and faster to carry out; this is at the bottom of the pyramid. As we move toward the top, testing becomes slower and more integrated:

Figure 21.1: Mike Cohn's Test Pyramid

If the application development language is compiler-based, such as .NET, Java, Go, or iOS, we need to convert the committed source...

Understanding AWS CodeBuild

AWS CodeBuild is a fully-managed CI service. It not only compiles a code, but it's also capable of running unit tests and producing artifacts (software packages). It supports most popular programming languages, such as .NET Core, Go, Java, Node.js, PHP, and Python, and most build tools, such as Apache Maven and Gradle. It can perform multiple builds concurrently and it scales automatically. We do not need to provision, manage, and scale a fleet of build servers. We will only be charged per minute. AWS CodeBuild builds can be triggered manually or automatically with the Jenkins plugins for AWS CodeBuild.

AWS CodeBuild can be managed using the web console, the AWS CLI, AWS SDKs, or AWS CodePipeline. AWS CodePipeline is a Continuous Delivery (CD) service. The heart of AWS CodePipeline is the pipeline. It defines a workflow for code changes through...

Working with AWS CodeBuild

The AWS CodeBuild document has beautifully explained the way AWS CodeBuild works closely with AWS core services, such as Amazon SNS, Amazon S3, and Amazon CloudWatch Logs; and AWS DevOps services, such as AWS CodePipeline, as shown here:

Figure 21.3: AWS CodeBuild with core AWS services

Let's discuss the preceding diagram:

  1. The Build project is an essential element for the AWS CodeBuild service, and it defines how CodeBuild runs a build. It can be created using the AWS CodeBuild web console, the CLI, or SDK. It defines the steps to be carried out to run a build. Later in this chapter, you will see how to create a build project configuration using a web console.
  2. Once AWS CodeBuild's build executes manually or automatically, according to the Build project configuration, it will create a Build environment. The Build project clearly consists...

Summary

  • An enterprise-grade remote source code repository consists of several branches, such as the development branch, QA branch, staging branch, and master branch.
  • The main purpose of a development branch on a remote repository is to allow development team members to fork a new branch for a bug fix, hotfix, or a feature development, as and when required.
  • AWS CodeBuild is a fully-managed continuous integration service. It not only compiles code, but is also capable of running unit tests and producing artifacts (software packages).
  • AWS CodeBuild supports most popular programming languages, such as .NET Core, Go, Java, Node.js, PHP, and Python, and build tools, such as Apache Maven and Gradle.
  • AWS CodeBuild can be managed using the web console, AWS CLI, AWS SDKs, or AWS CodePipeline.
  • Once artifacts are produced using AWS CodeBuild (with the help of AWS CodePipeline), they can...
lock icon
The rest of the chapter is locked
You have been reading a chapter from
AWS Certified Developer - Associate Guide - Second Edition
Published in: Jun 2019Publisher: PacktISBN-13: 9781789617313
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime

Authors (2)

author image
Vipul Tankariya

Vipul Tankariya has a broad range of experience in cloud consulting, development, and training. He has worked with a number of customers across the globe, solving real-life business problems in terms of technology and strategy. He is also a public speaker at various AWS events and meetups. He has not only extensively worked on AWS, but is also certified in five AWS certifications. He is an accomplished senior cloud consultant and technologist with more than 21 years of experience. He is focused on strategic thought leadership concentrated around next-generation cloud-based solutions. He has a lot of experience in working on DevOps, CI/CD, and automation at each level of the delivery lifecycle of products, solutions, and services on the cloud.
Read more about Vipul Tankariya

author image
Bhavin Parmar

Bhavin Parmar has a broad range of experience in cloud consulting, development, and training. He actively participates in solving real-life business problems. He has not only extensively worked on AWS, but he is also certified in AWS and Red Hat. This book combines his AWS experience in solving real-life business problems with his hands-on deployment and development experience. Bhavin is an accomplished technologist and senior cloud consultant with more than 11 years of experience. He is focused on strategic thought leadership concentrated around next-generation cloud-based and DevOps solutions. He has also been instrumental in setting up cloud migration strategies for customers, building enterprise-class cloud solutions, and AWS training.
Read more about Bhavin Parmar