In this article, we will guide you through how to set up a DevOps pipeline in AWS. However, let’s start off with defining what DevOps actually is.

In the past, application development was usually split between two teams - development and operations. The development team would write the code, test it, and then deliver it to the operations team who would deploy it to a server and make sure it runs and scales without interruption.

With the recent shift towards cloud computing, developers are now expected to have more knowledge of the infrastructure running their applications. This means the development team and the operations team are merged into one and working together in a DevOps manner. This enables developers to write code that scales and can be more easily managed in production environments.

Another benefit of the DevOps way of working is that issues in production can be identified quicker if the team responsible for the operations is the same as the one that originally developed the application.

So, how do pipelines tie into DevOps? If we look at the past way of working in teams, split between development and operations, a release would typically follow a variation of the process described below.

  • The development team merges the code changes that should be included in the release to the code repository.
  • The development team (or a dedicated tester) carries out testing of the release.
  • The development team creates a production build that is ready to be released.
  • The operations team receives the production build and deploys it to production manually. Typically by placing the release package inside the server environment and running scripts.

With DevOps, and a merged development and operations team, we can instead release small features at a faster pace. Operations related tasks can be carried out in parallel to the usual development activities. To do this at an even faster pace, we can automate release and testing tasks using a DevOps pipeline. The placing of the release packages inside the server environment and running scripts can then be run automatically at the push of a button or simply by pushing the code changes to a particular branch.

A pipeline like this can be set up with a number of different tools. However, if you are already running your workloads on AWS, it comes with many different services that help you do this quite efficiently without leaving the AWS ecosystem.

Let’s get started creating our own pipeline to automate some deployment tasks.

Getting Started

We will automate the deployment of a simple static site using the following AWS services:

  • CodePipeline - An orchestration tool that helps us trigger a deployment by pushing to a source code repository or by manual pushes of buttons
  • CodeBuild - A build container that can run scripts needed for deployment tasks
  • S3 - A static file hosting service that will host our static site

The static site that we will deploy consists of a simple HTML file accessed from the S3 URL. To deploy this, we need to manually upload the HTML file in the bucket from the AWS console. While this might not be terribly difficult to do, we can always save us a couple of minutes by automating this task.

#devops

Setting up a DevOps Pipeline in AWS
1.10 GEEK