Getting Started with AWS CodePipeline
Before you can use AWS CodePipeline for the first time, you must complete the following steps.
Step 1: Create an AWS Account
Create an AWS account, if you haven't done so already, by going to https://aws.amazon.com/ and choosing Sign Up.
Step 2: Create or Use an IAM User
Create an IAM user or use an existing one in your AWS account. Make sure that you have an AWS access key ID and an AWS secret access key associated with that IAM user. For more information, see Creating an IAM User in Your AWS Account.
Step 3: Use an IAM Managed Policy to Assign AWS CodePipeline Permissions to the IAM User
You must give the IAM user permissions to interact with AWS CodePipeline. The quickest way to do this is to apply the AWSCodePipelineFullAccess managed policy to the IAM user.
To grant permissions to an IAM user using the AWS Management Console
Sign in to the IAM console at https://console.aws.amazon.com/iam/.
In the IAM console, in the navigation pane, choose Policies, and then choose the AWSCodePipelineFullAccess managed policy from the list of policies.
On the Policy Details page, choose the Attached Entities tab, and then choose Attach.
On the Attach Policy page, select the check box next to the IAM users or groups, and then choose Attach Policy.
The AWSCodePipelineFullAccess policy provides access to all AWS 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 AWS 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 AWS CodePipeline actions and resources, see Remove Permissions for Unused AWS Services.
Step 4: Install the AWS CLI
To install and configure the AWS CLI
On your local machine, download and install the AWS CLI. This will enable you to interact with AWS CodePipeline from the command line. For more information, see Getting Set Up with the AWS Command Line Interface.
AWS CodePipeline works only with AWS CLI versions 1.7.38 and later. To determine which version of the AWS CLI that you may have installed, run the command
aws --version. To upgrade an older version of the AWS CLI to the latest version, follow the instructions in Uninstalling the AWS CLI, and then follow the instructions in Installing the AWS Command Line Interface.
Configure the AWS CLI with the configure command, as follows:Copy
When prompted, specify the AWS access key and AWS secret access key of the IAM user that you will use with AWS CodePipeline. When prompted for the default region name, specify the region where you will create the pipeline, such as
us-east-1. When prompted for the default output format, specify
json. For example:Copy
AWS Access Key ID [None]:
Type your target AWS access key ID here, and then press EnterAWS Secret Access Key [None]:
Type your target AWS secret access key here, and then press EnterDefault region name [None]:
here, and then press EnterDefault output format [None]:
here, and then press Enter
Step 5: Open the Console for AWS CodePipeline
Sign in to the AWS Management Console and open the AWS CodePipeline console at http://console.aws.amazon.com/codepipeline.
You have completed the prerequisites. You can begin using AWS CodePipeline. To start working with AWS CodePipeline, see the Tutorials.