Amazon Web Services (AWS) offers AWS Developer Tools, a set of services that are designed to enable customers to rapidly and reliably deliver software. Together, these services help you follow continuous integration and continuous delivery (CI/CD) practices that help you securely store and version control your application’s source code and automatically build, test, and deploy your application to AWS or your on-premises environment.

To help customers more easily implement CI/CD for applications written in Go, AWS offers the Deployment Pipeline for Go Applications. This solution automatically provisions and configures the AWS services necessary to automate steps in your Go application delivery process. The solution also deploys all the necessary AWS services to build highly available, resilient staging and production environments for your Go application.  

The following sections assume basic knowledge of applications written in Go, source code repositories, and architecting on the AWS Cloud.  


When developing code, use a DevOps model that integrates teams and enables collaboration across the entire software development lifecycle, from development and test to deployment to operations. For rapid and reliable code releases, implement CI/CD practices to regularly iterate on your code, and automatically build and test changes in multiple dimensions before deployment to a production environment. With these general DevOps best practices in mind, consider the following when implementing a CI/CD pipeline for the development and deployment of Go applications:

  • Implement granular access control policies to protect your source code repository.
  • Include a manual approval stage between successful builds and tests, and final deployment.
  • Clearly define and automate each stage of your CI/CD release workflow. Ensure that your code pipeline executes processes consistently.

AWS offers a solution that automatically provisions and configures the AWS services necessary to provide continuous integration and continuous delivery for applications written in Go. The diagram below presents the components and functionality you can build using the Deployment Pipeline for Go Applications implementation guide and accompanying AWS CloudFormation template.

  1. AWS CodePipeline monitors your AWS CodeCommit or GitHub repository for changes to your existing application’s code. When changes are made, AWS CodePipeline triggers a deployment activity.
  2. AWS CodeBuild runs tests, performs lint checking, and builds the application.
  3. After the code is built successfully, AWS CodeBuild archives all build artifacts to your existing Amazon Simple Storage Service (Amazon S3) bucket.
  4. AWS CodeDeploy then deploys your code to the staging environment. Once the code is approved manually, AWS CodeDeploy deploys it to your production environment.
Deploy Solution
Implementation Guide

What you'll accomplish:

Deploy the Deployment Pipeline for Go Applications using AWS CloudFormation. The CloudFormation template will automatically launch and configure the components necessary to implement CI/CD for applications written in Go.

Launch highly available staging and production environments to deliver your Go application to customers. These environments follow AWS best practices for security and availability.

Configure a manual approval stage between deployment to the staging and production environments.

What you'll need before starting:

An AWS account: You will need an AWS account to begin provisioning resources. Sign up for AWS.

A working application written in Go 1.8: You can use your own application, or the sample application included with this solution. Your application must be hosted in an AWS CodeCommit or GitHub repository. 

Skill level: This solution is intended for IT infrastructure and DevOps professionals who have practical experience with automation and architecting on the AWS cloud.

Q: Can I customize the solution's staging and production environments?

Yes. The solution includes configuration files that contain the parameters used to build the staging and production environments. You can modify these files to customize the environment. For example, you can change the default Amazon Elastic Compute Cloud (Amazon EC2) instance type.

Q: Which source code repositories does this solution support?  

The Deployment Pipeline for Go Applications can connect to AWS CodeCommit and GitHub to pull source code for builds.

Q: What tests does this solution include?

This solution automates code tests on every commit using the “go test” command. You can also add additional tests.

 

Need more resources to get started with AWS? Visit the Getting Started Resource Center to find tutorials, projects and videos to get started with AWS.

Tell us what you think