Getting started with CodePipeline - Amazon CodePipeline
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Getting started with CodePipeline

If you are new to CodePipeline, you can follow the tutorials in this guide after following the steps in this chapter to get set up.

The CodePipeline console includes helpful information in a collapsible panel that you can open from the information icon or any Info link on the page. ( ). You can close this panel at any time.

The CodePipeline console also provides a way to quickly search for your resources, such as repositories, build projects, deployment applications, and pipelines. Choose Go to resource or press the / key, and then type the name of the resource. Any matches appear in the list. Searches are case insensitive. You only see resources that you have permissions to view. For more information, see Viewing resources in the console.

Before you can use Amazon CodePipeline for the first time, you must create your Amazon Web Services account and create your first administrative user.

Step 1: Create an Amazon Web Services account and administrative user

Sign up for an Amazon Web Services account

If you do not have an Amazon Web Services account, use the following procedure to create one.

To sign up for Amazon Web Services
  1. Open http://www.amazonaws.cn/ and choose Sign Up.

  2. Follow the on-screen instructions.

Amazon sends you a confirmation email after the sign-up process is complete. At any time, you can view your current account activity and manage your account by going to http://www.amazonaws.cn/ and choosing My Account.

Secure IAM users

After you sign up for an Amazon Web Services account, safeguard your administrative user by turning on multi-factor authentication (MFA). For instructions, see Enable a virtual MFA device for an IAM user (console) in the IAM User Guide.

To give other users access to your Amazon Web Services account resources, create IAM users. To secure your IAM users, turn on MFA and only give the IAM users the permissions needed to perform their tasks.

For more information about creating and securing IAM users, see the following topics in the IAM User Guide:

Step 2: Apply a managed policy for administrative access to CodePipeline

You must grant permissions to interact with CodePipeline. The quickest way to do this is to apply the AWSCodePipeline_FullAccess managed policy to the administrative user.

Note

The AWSCodePipeline_FullAccess policy includes permissions that allow the console user to pass an IAM role to CodePipeline or other Amazon Web Services. This allows the service to assume the role and perform actions on your behalf. When you attach the policy to a user, role, or group, the iam:PassRole permissions are applied. Make sure the policy is only applied to trusted users. When users with these permissions use the console to create or edit a pipeline, the following choices are available:

  • Create a CodePipeline service role or choose an existing one and pass the role to CodePipeline

  • Might choose to create a CloudWatch Events rule for change detection and pass the CloudWatch Events service role to CloudWatch Events

For more information, see Granting a user permissions to pass a role to an Amazon Web Service.

Note

The AWSCodePipeline_FullAccess policy provides access to all CodePipeline actions and resources that the IAM user has access to, as well as all possible actions when creating stages in a pipeline, such as creating stages that include CodeDeploy, Elastic Beanstalk, or Amazon S3. As a best practice, you should grant individuals only the permissions they need to perform their duties. For more information about how to restrict IAM users to a limited set of CodePipeline actions and resources, see Remove permissions from the CodePipeline service role.

To provide access, add permissions to your users, groups, or roles:

Step 3: Install the Amazon CLI

To call CodePipeline commands from the Amazon CLI on a local development machine, you must install the Amazon CLI. This step is optional if you intend to get started using only the steps in this guide for the CodePipeline console.

To install and configure the Amazon CLI
  1. On your local machine, download and install the Amazon CLI. This will enable you to interact with CodePipeline from the command line. For more information, see Getting Set Up with the Amazon Command Line Interface.

    Note

    CodePipeline works only with Amazon CLI versions 1.7.38 and later. To determine which version of the Amazon CLI that you may have installed, run the command aws --version. To upgrade an older version of the Amazon CLI to the latest version, follow the instructions in Uninstalling the Amazon CLI, and then follow the instructions in Installing the Amazon Command Line Interface.

  2. Configure the Amazon CLI with the configure command, as follows:

    aws configure

    When prompted, specify the Amazon access key and Amazon secret access key of the IAM user that you will use with CodePipeline. When prompted for the default region name, specify the region where you will create the pipeline, such as us-east-2. When prompted for the default output format, specify json. For example:

    AWS Access Key ID [None]: Type your target Amazon access key ID here, and then press Enter AWS Secret Access Key [None]: Type your target Amazon secret access key here, and then press Enter Default region name [None]: Type us-east-2 here, and then press Enter Default output format [None]: Type json here, and then press Enter
    Note

    For more information about IAM, access keys, and secret keys, see Managing Access Keys for IAM Users and How Do I Get Credentials?.

    For more information about the Regions and endpoints available for CodePipeline, see Amazon CodePipeline endpoints and quotas.

Step 4: Open the console for CodePipeline

Next steps

You have completed the prerequisites. You can begin using CodePipeline. To start working with CodePipeline, see the CodePipeline tutorials.