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 anyInfo 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. ChooseGo 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, seeViewing resources in the console.
Before you can use AWS CodePipeline for the first time, you must create your AWS account and create your first administrative user.
If you do not have an AWS account, complete the following steps to create one.
Follow the online instructions.
Part of the sign-up procedure involves receiving a phone call or text message and entering a verification code on the phone keypad.
When you sign up for an AWS account, anAWS account root user is created. The root user has access to all AWS services and resources in the account. As a security best practice, assign administrative access to a user, and use only the root user to performtasks that require root user access.
AWS sends you a confirmation email after the sign-up process iscomplete. At any time, you can view your current account activity and manage your account bygoing tohttps://aws.amazon.com/ and choosingMy Account.
After you sign up for an AWS account, secure your AWS account root user, enable AWS IAM Identity Center, and create an administrative user so that you don't use the root user for everyday tasks.
Sign in to theAWS Management Console as the account owner by choosingRoot user and entering your AWS account email address. On the next page, enter your password.
For help signing in by using root user, seeSigning in as the root user in theAWS Sign-In User Guide.
Turn on multi-factor authentication (MFA) for your root user.
For instructions, seeEnable a virtual MFA device for your AWS account root user (console) in theIAM User Guide.
Enable IAM Identity Center.
For instructions, seeEnabling AWS IAM Identity Center in theAWS IAM Identity Center User Guide.
In IAM Identity Center, grant administrative access to a user.
For a tutorial about using the IAM Identity Center directory as your identity source, see Configure user access with the default IAM Identity Center directory in theAWS IAM Identity Center User Guide.
To sign in with your IAM Identity Center user, use the sign-in URL that was sent to your email address when you created the IAM Identity Center user.
For help signing in using an IAM Identity Center user, seeSigning in to the AWS access portal in theAWS Sign-In User Guide.
In IAM Identity Center, create a permission set that follows the best practice of applying least-privilege permissions.
For instructions, see Create a permission set in theAWS IAM Identity Center User Guide.
Assign users to a group, and then assign single sign-on access to the group.
For instructions, see Add groups in theAWS IAM Identity Center User Guide.
You must grant permissions to interact with CodePipeline. The quickest way to do this is to apply theAWSCodePipeline_FullAccess
managed policy to the administrative user.
TheAWSCodePipeline_FullAccess
policy includes permissions that allow the console user to pass an IAM role to CodePipeline or other AWS 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, theiam: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, seeGranting a user permissions to pass a role to an AWS service.
TheAWSCodePipeline_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, seeRemove permissions from the CodePipeline service role.
To provide access, add permissions to your users, groups, or roles:
Users and groups in AWS IAM Identity Center:
Create a permission set. Follow the instructions inCreate a permission set in theAWS IAM Identity Center User Guide.
Users managed in IAM through an identity provider:
Create a role for identity federation. Follow the instructions inCreate a role for a third-party identity provider (federation) in theIAM User Guide.
IAM users:
Create a role that your user can assume. Follow the instructions inCreate a role for an IAM user in theIAM User Guide.
(Not recommended) Attach a policy directly to a user or add a user to a user group. Follow the instructions inAdding permissions to a user (console) in theIAM User Guide.
To call CodePipeline commands from the AWS CLI on a local development machine, you must install the AWS CLI. This step is optional if you intend to get started using only the steps in this guide for the CodePipeline console.
On your local machine, download and install the AWS CLI. This will enable you to interact with CodePipeline from the command line. For more information, seeGetting Set Up with the AWS Command Line Interface.
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 commandaws --version. To upgrade an older version of the AWS CLI to the latest version, follow the instructions inUninstalling the AWS CLI, and then follow the instructions inInstalling the AWS Command Line Interface.
Configure the AWS CLI with theconfigure command, as follows:
aws configure
When prompted, specify the AWS access key and AWS 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 asus-east-2
. When prompted for the default output format, specifyjson
. For example:
AWS Access Key ID [None]:Type your target AWS access key ID here, and then press Enter
AWS Secret Access Key [None]:Type your target AWS secret access key here, and then press Enter
Default region name [None]:Type
us-east-2here, and then press Enter
Default output format [None]:Type
jsonhere, and then press Enter
For more information about IAM, access keys, and secret keys, seeManaging Access Keys for IAM Users andHow Do I Get Credentials?.
For more information about the Regions and endpoints available for CodePipeline, seeAWS CodePipeline endpoints and quotas.
Sign in to the AWS Management Console and open the CodePipeline console athttp://console.aws.amazon.com/codesuite/codepipeline/home.
You have completed the prerequisites. You can begin using CodePipeline. To start working with CodePipeline, see theCodePipeline tutorials.