Menu
Deployment Pipeline for Go Applications
Deployment Pipeline for Go Applications

Automated Deployment

Before you launch the automated deployment, please review the architecture, configuration, and other considerations discussed in this guide. This section contains separate procedures to launch this solution for applications hosted in either an AWS CodeCommit or GitHub repository. Follow the applicable procedure to configure and deploy a deployment pipeline for Go applications into your account.

Time to deploy: Approximately five minutes

Prerequisites

Before you deploy the solution, you must have an AWS CodeCommit or GitHub repository with your working Go application, and an Amazon Simple Storage Service (Amazon S3) bucket.

If your application is hosted in a GitHub repository, you must create an OAuth token and fork the repository before you deploy this solution.

If you want to migrate your existing repository from GitHub to AWS CodeCommit, see Migrate a Git Repository to AWS CodeCommit.

Launch the Stack for an AWS CodeCommit Repository

Use this procedure to deploy the deployment pipeline for applications hosted in an AWS CodeCommit repository. Before you start, you must have an existing Amazon S3 bucket.

Note

You are responsible for the cost of the AWS services used while running this solution. See the Cost section for more details. For full details, see the pricing webpage for each AWS service you will be using in this solution.

  1. Sign in to the AWS Management Console and click the button below to launch the go-application-pipeline-codecommit AWS CloudFormation template.

    
                                Deployment Pipeline for Go Applications AWS CodeCommit launch button

    You can also download the template as a starting point for your own implementation.

  2. The template is launched in the US East (N. Virginia) Region by default. To launch this solution in a different AWS Region, use the region selector in the console navigation bar.

  3. On the Select Template page, verify that you selected the correct template and choose Next.

  4. On the Specify Details page, assign a name to your solution stack.

  5. Under Parameters, review the parameters for the template, and modify them as necessary.

    This solution uses the following default values.

    Parameter Default Description
    Application Name <Requires input> The name of the pipeline and build resources
    CodePipeline S3 bucket <Requires input> The Amazon S3 bucket that stores build artifacts
    Repository Name <Requires input> The AWS CodeCommit repository to monitor for changes
    Repository Branch master The AWS CodeCommit repository branch to monitor
  6. Choose Next.

  7. On the Options page, choose Next.

  8. On the Review page, review and confirm the settings. Be sure to check the box acknowledging that the template will create AWS Identity and Access Management (IAM) resources.

  9. Choose Create to deploy the stack.

    You can view the status of the stack in the AWS CloudFormation console in the Status column. You should see a status of CREATE_COMPLETE in roughly five minutes.

Note

This solution includes the solution-helper AWS Lambda function, which runs only during initial configuration or when resources are updated or deleted.

When running this solution, the solution-helper function is inactive. However, do not delete the function as it is necessary to manage associated resources.

Launch the Stack for a GitHub Repository

Use this procedure to deploy the deployment pipeline for applications hosted in a GitHub repository. Before you start, you must have an existing Amazon S3 bucket. You must also create an OAuth token and fork the repository.

Note

You are responsible for the cost of the AWS services used while running this solution. See the Cost section for more details. For full details, see the pricing webpage for each AWS service you will be using in this solution.

  1. Sign in to the AWS Management Console and click the button below to launch the go-application-pipeline-github AWS CloudFormation template.

    
                            Deployment Pipeline for Go Applications GitHub launch button

    You can also download the template as a starting point for your own implementation.

  2. The template is launched in the US East (N. Virginia) Region by default. To launch this solution in a different AWS Region, use the region selector in the console navigation bar.

  3. On the Select Template page, verify that you selected the correct template and choose Next.

  4. On the Specify Details page, assign a name to your solution stack.

  5. Under Parameters, review the parameters for the template, and modify them as necessary.

    This solution uses the following default values.

    Parameter Default Description
    Application Name <Requires input> The name of the pipeline and build resources
    Build Archive S3 bucket <Requires input> The Amazon S3 bucket that stores build artifacts
    OAuth2 Token <Requires input> The GitHub repository OAuth2Token for access to AWS CodePipeline. Create a token with repo and admin:repo_hook permissions at http://github.com/settings/tokens.
    Repository Owner <Requires input> The GitHub user name of the repository owner
    Repository Name <Requires input> The GitHub repository to monitor for changes
    Repository Branch master The GitHub repository branch to monitor
  6. Choose Next.

  7. On the Options page, choose Next.

  8. On the Review page, review and confirm the settings. Be sure to check the box acknowledging that the template will create AWS Identity and Access Management (IAM) resources.

  9. Choose Create to deploy the stack.

    You can view the status of the stack in the AWS CloudFormation console in the Status column. You should see a status of CREATE_COMPLETE in roughly five minutes.

Note

This solution includes the solution-helper AWS Lambda function, which runs only during initial configuration or when resources are updated or deleted.

When running this solution, the solution-helper function is inactive. However, do not delete the function as it is necessary to manage associated resources.