id
stringlengths
14
16
text
stringlengths
1
2.43k
source
stringlengths
99
229
7ec8cc7f5e3c-0
To create a pipeline in the console, you must provide the source file location and information about the providers you will use for your actions\. When you use the console to create a pipeline, you must include a source stage and one or both of the following: + A build stage\. + A deployment stage\. When you use the pipeline wizard, CodePipeline creates the names of stages \(source, build, staging\)\. These names cannot be changed\. You can use more specific names \(for example, BuildToGamma or DeployToProd\) to stages you add later\. **Step 1: Create and name your pipeline** 1. Sign in to the AWS Management Console and open the CodePipeline console at [http://console\.aws\.amazon\.com/codesuite/codepipeline/home](http://console.aws.amazon.com/codesuite/codepipeline/home)\. 1. On the **Welcome** page, choose **Create pipeline**\. If this is your first time using CodePipeline, choose **Get Started**\. 1. On the **Step 1: Choose pipeline settings** page, in **Pipeline name**, enter the name for your pipeline\. In a single AWS account, each pipeline you create in an AWS Region must have a unique name\. Names can be reused for pipelines in different Regions\. **Note**
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md
7ec8cc7f5e3c-1
**Note** After you create a pipeline, you cannot change its name\. For information about other limitations, see [Quotas in AWS CodePipeline](limits.md)\. 1. In **Service role**, do one of the following: + Choose **New service role** to allow CodePipeline to create a new service role in IAM\. In **Role name**, the role and policy name both default to this format: AWSCodePipelineServiceRole\-*region*\-*pipeline\_name*\. For example, this is the service role created for a pipeline named MyPipeline: AWSCodePipelineServiceRole\-eu\-west\-2\-MyPipeline\. + Choose **Existing service role** to use a service role already created in IAM\. In **Role ARN**, choose your service role ARN from the list\. **Note** Depending on when your service role was created, you might need to update its permissions to support additional AWS services\. For information, see [Add permissions to the CodePipeline service role](security-iam.md#how-to-update-role-new-services)\. For more information about the service role and its policy statement, see [Manage the CodePipeline service role](security-iam.md#how-to-custom-role)\. 1. \(Optional\) Expand **Advanced settings**\. 1. In **Artifact store**, do one of the following:
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md
7ec8cc7f5e3c-2
1. \(Optional\) Expand **Advanced settings**\. 1. In **Artifact store**, do one of the following: 1. Choose **Default location** to use the default artifact store, such as the S3 artifact bucket designated as the default, for your pipeline in the AWS Region you have selected for your pipeline\. 1. Choose **Custom location** if you already have an artifact store, such as an S3 artifact bucket, in the same Region as your pipeline\. In **Bucket**, choose the bucket name\. **Note** This is not the source bucket for your source code\. This is the artifact store for your pipeline\. A separate artifact store, such as an S3 bucket, is required for each pipeline\. When you create or edit a pipeline, you must have an artifact bucket in the pipeline Region and one artifact bucket per AWS Region where you are running an action\. For more information, see [Input and output artifacts](welcome-introducing-artifacts.md) and [CodePipeline pipeline structure reference](reference-pipeline-structure.md)\. 1. In **Encryption key**, do one of the following: 1. To use the CodePipeline default AWS\-managed AWS KMS customer master key \(CMK\) to encrypt the data in the pipeline artifact store \(S3 bucket\), choose **Default AWS Managed Key**\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md
7ec8cc7f5e3c-3
1. To use your CMK to encrypt the data in the pipeline artifact store \(S3 bucket\), choose **Customer Managed Key**\. In **KMS customer master key**, choose the key ID, key ARN, or alias ARN\. 1. Choose **Next**\. **Step 2: Create a source stage** + On the **Step 2: Add source stage** page, in **Source provider**, choose the type of repository where your source code is stored, specify its required options, and then choose **Next step**\. + For **GitHub**: 1. Choose **Connect to GitHub**\. If you are prompted to sign in, enter your GitHub credentials\. **Important** Do not enter your AWS credentials\. 1. If this is your first time connecting to GitHub from CodePipeline for this Region, you are asked to authorize application access to your account\. Review the permissions required for integration, and then, if you want to continue, choose **Authorize application**\. When you connect to GitHub in the console, the following resources are created for you: + CodePipeline uses an OAuth token to create an authorized application that is managed by CodePipeline\. **Note**
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md
7ec8cc7f5e3c-4
+ CodePipeline uses an OAuth token to create an authorized application that is managed by CodePipeline\. **Note** In GitHub, there is a limit to the number of OAuth tokens you can use for an application, such as CodePipeline\. If you exceed this limit, retry the connection to allow CodePipeline to reconnect by reusing existing tokens\. For more information, see [Pipeline error: I receive a pipeline error that says: "Could not access the GitHub repository" or "Unable to connect to the GitHub repository"](troubleshooting.md#troubleshooting-gs2)\. + CodePipeline creates a webhook in GitHub to detect source changes and then start your pipeline when a change occurs\. In addition to the webhook, CodePipeline: + Randomly generates a secret and uses it to authorize the connection to GitHub\. + Generates the webhook URL using the public endpoint for the Region and registers it with GitHub\. This subscribes the URL to receive repository events\. 1. Choose the GitHub repository you want to use as the source location for your pipeline\. In **Branch**, from the drop\-down list, choose the branch you want to use\. + For **Amazon S3**: 1. In **Amazon S3 location**, provide the S3 bucket name and path to the object in a bucket with versioning enabled\. The format of the bucket name and path looks like this: ``` s3://bucketName/folderName/objectName
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md
7ec8cc7f5e3c-5
``` s3://bucketName/folderName/objectName ``` **Note** When Amazon S3 is the source provider for your pipeline, you may zip your source file or files into a single \.zip and upload the \.zip to your source bucket\. You may also upload a single unzipped file; however, downstream actions that expect a \.zip file will fail\. 1. After you choose the S3 source bucket, CodePipeline creates the Amazon CloudWatch Events rule and the AWS CloudTrail trail to be created for this pipeline\. Accept the defaults under **Change detection options**\. This allows CodePipeline to use Amazon CloudWatch Events and AWS CloudTrail to detect changes for your new pipeline\. Choose **Next**\. + For **AWS CodeCommit**: + In **Repository name**, choose the name of the CodeCommit repository you want to use as the source location for your pipeline\. In **Branch name**, from the drop\-down list, choose the branch you want to use\. + After you choose the CodeCommit repository name and branch, a message is displayed in **Change detection options** showing the Amazon CloudWatch Events rule to be created for this pipeline\. Accept the defaults under **Change detection options**\. This allows CodePipeline to use Amazon CloudWatch Events to detect changes for your new pipeline\. + For **Amazon ECR**: + In **Repository name**, choose the name of your Amazon ECR repository\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md
7ec8cc7f5e3c-6
+ For **Amazon ECR**: + In **Repository name**, choose the name of your Amazon ECR repository\. + In **Image tag**, specify the image name and version, if different from LATEST\. + In **Output artifacts**, choose the output artifact default, such as MyApp, that contains the image name and repository URI information you want the next stage to use\. For a tutorial about creating a pipeline for Amazon ECS with CodeDeploy blue\-green deployments that includes an Amazon ECR source stage, see [Tutorial: Create a Pipeline with an Amazon ECR Source and ECS\-to\-CodeDeploy Deployment](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/tutorials-ecs-ecr-codedeploy.html)\. When you include an Amazon ECR source stage in your pipeline, the source action generates an `imageDetail.json` file as an output artifact when you commit a change\. For information about the `imageDetail.json` file, see [imageDetail\.json file for Amazon ECS blue/green deployment actions](file-reference.md#file-reference-ecs-bluegreen)\. **Note**
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md
7ec8cc7f5e3c-7
**Note** The object and file type must be compatible with the deployment system you plan to use \(for example, Elastic Beanstalk or CodeDeploy\)\. Supported file types might include \.zip, \.tar, and \.tgz files\. For more information about the supported container types for Elastic Beanstalk, see [Customizing and Configuring Elastic Beanstalk Environments](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers.html) and [Supported Platforms](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html)\. For more information about deploying revisions with CodeDeploy, see [Uploading Your Application Revision](https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-steps.html#deployment-steps-uploading-your-app) and [Prepare a Revision](https://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-prepare-revision.html)\. **Step 3: Create a build stage** This step is optional if you plan to create a deployment stage\. + On the **Step 3: Add build stage** page, do one of the following, and then choose **Next**: + Choose **Skip build stage** if you plan to create a deployment stage\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md
7ec8cc7f5e3c-8
+ Choose **Skip build stage** if you plan to create a deployment stage\. + From **Build provider**, choose a custom action provider of build services, and provide the configuration details for that provider\. For an example of how to add Jenkins as a build provider, see [Tutorial: Create a four\-stage pipeline](tutorials-four-stage-pipeline.md)\. + From **Build provider**, choose **AWS CodeBuild**\. In **Region**, choose the AWS Region where the resource exists\. The **Region** field designates where the AWS resources are created for this action type and provider type\. This field is displayed only for actions where the action provider is an AWS service\. The **Region** field defaults to the same AWS Region as your pipeline\. In **Project name**, choose your build project\. If you have already created a build project in CodeBuild, choose it\. Or you can create a build project in CodeBuild and then return to this task\. Follow the instructions in [Create a Pipeline That Uses CodeBuild](https://docs.aws.amazon.com/codebuild/latest/userguide/how-to-create-pipeline.html#pipelines-create-console) in the *CodeBuild User Guide*\. In **Environment variables**, to add CodeBuild environment variables to your build action, choose **Add environment variable**\. Each variable is made up of three entries: + In **Name**, enter the name or key of the environment variable\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md
7ec8cc7f5e3c-9
+ In **Name**, enter the name or key of the environment variable\. + In **Value**, enter the value of the environment variable\. If you choose **Parameter** for the variable type, make sure this value is the name of a parameter you have already stored in AWS Systems Manager Parameter Store\. **Note** We strongly discourage the use of environment variables to store sensitive values, especially AWS secret key IDs and secret access keys\. When you use the CodeBuild console or AWS CLI, environment variables are displayed in plain text\. For sensitive values, we recommend that you use the **Parameter** type instead\. + \(Optional\) In **Type**, enter the type of environment variable\. Valid values are **Plaintext** or **Parameter**\. The default is **Plaintext**\. \(Optional\) In **Build type**, choose one of the following: + To run each build in a single build action execution, choose **Single build**\. + To run multiple builds in the same build action execution, choose **Batch build**\. \(Optional\) If you chose to run batch builds, you can choose **Combine all artifacts from batch into a single location** to place all build artifacts into a single output artifact\. **Step 4: Create a deployment stage** This step is optional if you have already created a build stage\. + On the **Step 4: Add deploy stage** page, do one of the following, and then choose **Next**:
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md
7ec8cc7f5e3c-10
+ On the **Step 4: Add deploy stage** page, do one of the following, and then choose **Next**: + Choose **Skip deploy stage** if you created a build stage in the previous step\. **Note** This option does not appear if you have already skipped the build stage\. + In **Deploy provider**, choose a custom action that you have created for a deployment provider\. In **Region**, for cross\-Region actions only, choose the AWS Region where the resource is created\. The **Region** field designates where the AWS resources are created for this action type and provider type\. This field only displays for actions where the action provider is an AWS service\. The **Region** field defaults to the same AWS Region as your pipeline\. + In **Deploy provider**, fields are available for default providers as follows: + **CodeDeploy** In **Application name**, enter or choose the name of an existing CodeDeploy application\. In **Deployment group**, enter the name of a deployment group for the application\. Choose **Next**\. You can also create an application, deployment group, or both in the CodeDeploy console\. + **AWS Elastic Beanstalk** In **Application name**, enter or choose the name of an existing Elastic Beanstalk application\. In **Environment name**, enter an environment for the application\. Choose **Next**\. You can also create an application, environment, or both in the Elastic Beanstalk console\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md
7ec8cc7f5e3c-11
+ **AWS OpsWorks Stacks** In **Stack**, enter or choose the name of the stack you want to use\. In **Layer**, choose the layer that your target instances belong to\. In **App**, choose the application that you want to update and deploy\. If you need to create an app, choose **Create a new one in AWS OpsWorks**\. For information about adding an application to a stack and layer in AWS OpsWorks, see [Adding Apps](https://docs.aws.amazon.com/opsworks/latest/userguide/workingapps-creating.html) in the *AWS OpsWorks User Guide*\. For an end\-to\-end example of how to use a simple pipeline in CodePipeline as the source for code that you run on AWS OpsWorks layers, see [Using CodePipeline with AWS OpsWorks Stacks](https://docs.aws.amazon.com/opsworks/latest/userguide/other-services-cp.html)\. + **AWS CloudFormation** Do one of the following: + In **Action mode**, choose **Create or update a stack**, enter a stack name and template file name, and then choose the name of a role for AWS CloudFormation to assume\. Optionally, enter the name of a configuration file and choose an IAM capability option\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md
7ec8cc7f5e3c-12
+ In **Action mode**, choose **Create or replace a change set**, enter a stack name and change set name, and then choose the name of a role for AWS CloudFormation to assume\. Optionally, enter the name of a configuration file and choose an IAM capability option\. For information about integrating AWS CloudFormation capabilities into a pipeline in CodePipeline, see [Continuous Delivery with CodePipeline](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/continuous-delivery-codepipeline.html) in the *AWS CloudFormation User Guide*\. + **Amazon ECS** In **Cluster name**, enter or choose the name of an existing Amazon ECS cluster\. In **Service name**, enter or choose the name of the service running on the cluster\. You can also create a cluster and service\. In **Image filename**, enter the name of the image definitions file that describes your service's container and image\. **Note** The Amazon ECS deployment action requires an `imagedefinitions.json` file as an input to the deployment action\. The default file name for the file is imagedefinitions\.json\. If you choose to use a different file name, you must provide it when you create the pipeline deployment stage\. For more information, see [imagedefinitions\.json file for Amazon ECS standard deployment actions](file-reference.md#pipelines-create-image-definitions)\. Choose **Next**\. **Note**
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md
7ec8cc7f5e3c-13
Choose **Next**\. **Note** Make sure your Amazon ECS cluster is configured with two or more instances\. Amazon ECS clusters must contain at least two instances so that one is maintained as the primary instance and another is used to accommodate new deployments\. For a tutorial about deploying container\-based applications with your pipeline, see [Tutorial: Continuous Deployment with CodePipeline](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-cd-pipeline.html)\. + **Amazon ECS \(Blue/Green\)** Enter the CodeDeploy application and deployment group, Amazon ECS task definition, and AppSpec file information, and then choose **Next**\. **Note** The **Amazon ECS \(Blue/Green\)** action requires an imageDetail\.json file as an input artifact to the deploy action\. Because the Amazon ECR source action creates this file, pipelines with an Amazon ECR source action do not need to provide an `imageDetail.json` file\. For more information, see [imageDetail\.json file for Amazon ECS blue/green deployment actions](file-reference.md#file-reference-ecs-bluegreen)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md
7ec8cc7f5e3c-14
For a tutorial about creating a pipeline for blue\-green deployments to an Amazon ECS cluster with CodeDeploy, see [Tutorial: Create a pipeline with an Amazon ECR source and ECS\-to\-CodeDeploy deployment](tutorials-ecs-ecr-codedeploy.md)\. + **AWS Service Catalog** Choose **Enter deployment configuration** if you want to use fields in the console to specify your configuration, or choose **Configuration file** if you have a separate configuration file\. Enter product and configuration information, and then choose **Next**\. For a tutorial about deploying product changes to AWS Service Catalog with your pipeline, see [Tutorial: Create a pipeline that deploys to AWS Service Catalog](tutorials-S3-servicecatalog.md)\. + **Alexa Skills Kit** In **Alexa Skill ID**, enter the skill ID for your Alexa skill\. In **Client ID** and **Client secret**, enter the credentials generated using a Login with Amazon \(LWA\) security profile\. In **Refresh token**, enter the refresh token you generated using the ASK CLI command for retrieving a refresh token\. Choose **Next**\. For a tutorial about deploying Alexa skills with your pipeline and generating the LWA credentials, see [Tutorial: Create a pipeline that deploys an Amazon Alexa skill](tutorials-alexa-skills-kit.md)\. + **Amazon S3**
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md
7ec8cc7f5e3c-15
+ **Amazon S3** In **Bucket**, enter the name of the S3 bucket you want to use\. Choose **Extract file before deploy** if the input artifact to your deploy stage is a ZIP file\. If **Extract file before deploy** is selected, you may optionally enter a value for **Deployment path** to which your ZIP file will be unzipped\. If it is not selected, you are required to to enter a value in **S3 object key**\. **Note** Most source and build stage output artifacts are zipped\. All pipeline source providers except Amazon S3 zip your source files before providing them as the input artifact to the next action\. \(Optional\) In **Canned ACL**, enter the [canned ACL](https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl) to apply to the object deployed to Amazon S3\. **Note** Applying a canned ACL overwrites any existing ACL applied to the object\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md
7ec8cc7f5e3c-16
**Note** Applying a canned ACL overwrites any existing ACL applied to the object\. \(Optional\) In **Cache control**, specify the cache control parameters for requests to download objects from the bucket\. For a list of valid values, see the [http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9) header field for HTTP operations\. To enter multiple values in **Cache control**, use a comma between each value\. You can add a space after each comma \(optional\), as shown in this example\. ![\[Image NOT FOUND\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/cache_control_values.png)![\[Image NOT FOUND\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Image NOT FOUND\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/) The preceding example entry is displayed in the CLI as follows: ``` "CacheControl": "public, max-age=0, no-transform" ``` Choose **Next**\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md
7ec8cc7f5e3c-17
``` Choose **Next**\. For a tutorial about creating a pipeline with an Amazon S3 deployment action provider, see [Tutorial: Create a pipeline that uses Amazon S3 as a deployment provider](tutorials-s3deploy.md)\. **Step 5: Review the pipeline** + On the **Step 5: Review** page, review your pipeline configuration, and then choose **Create pipeline** to create the pipeline or **Previous** to go back and edit your choices\. To exit the wizard without creating a pipeline, choose **Cancel**\. Now that you've created your pipeline, you can view it in the console\. The pipeline starts to run after you create it\. For more information, see [View pipeline details and history in CodePipeline](pipelines-view.md)\. For more information about making changes to your pipeline, see [Edit a pipeline in CodePipeline](pipelines-edit.md)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md
c2291f7db1de-0
To use the AWS CLI to create a pipeline, you create a JSON file to define the pipeline structure, and then run the create\-pipeline command with the `--cli-input-json` parameter\. **Important** You cannot use the AWS CLI to create a pipeline that includes partner actions\. You must use the CodePipeline console instead\. For more information about pipeline structure, see [CodePipeline pipeline structure reference](reference-pipeline-structure.md) and [create\-pipeline](http://docs.aws.amazon.com/cli/latest/reference/codepipeline/create-pipeline.html) in the CodePipeline [API Reference](http://docs.aws.amazon.com/cli/latest/reference/codepipeline)\. To create a JSON file, use the sample pipeline JSON file, edit it, and then call that file when you run the create\-pipeline command\. **Prerequisites:** You need the ARN of the service role you created for CodePipeline in [Getting started with CodePipeline](getting-started-codepipeline.md)\. You use the CodePipeline service role ARN in the pipeline JSON file when you run the create\-pipeline command\. For more information about creating a service role, see [Create the CodePipeline service role](pipelines-create-service-role.md)\. Unlike the console, running the create\-pipeline command in the AWS CLI does not have the option to create the CodePipeline service role for you\. The service role must already exist\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md
c2291f7db1de-1
You need the name of an S3 bucket where artifacts for the pipeline are stored\. This bucket must be in the same Region as the pipeline\. You use the bucket name in the pipeline JSON file when you run the create\-pipeline command\. Unlike the console, running the create\-pipeline command in the AWS CLI does not create an S3 bucket for storing artifacts\. The bucket must already exist\. **Note** You can also use the get\-pipeline command to get a copy of the JSON structure of that pipeline, and then modify that structure in a plain\-text editor\. **Topics** **To create the JSON file** 1. At a terminal \(Linux, macOS, or Unix\) or command prompt \(Windows\), create a new text file in a local directory\. 1. Open the file in a plain\-text editor and edit the values to reflect the structure you want to create\. At a minimum, you must change the name of the pipeline\. You should also consider whether you want to change: + The S3 bucket where artifacts for this pipeline are stored\. + The source location for your code\. + The deployment provider\. + How you want your code deployed\. + The tags for your pipeline\. The following two\-stage sample pipeline structure highlights the values you should consider changing for your pipeline\. Your pipeline likely contains more than two stages: ``` { "pipeline": {
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md
c2291f7db1de-2
``` { "pipeline": { "roleArn": "arn:aws:iam::80398EXAMPLE::role/AWS-CodePipeline-Service", "stages": [ { "name": "Source", "actions": [ { "inputArtifacts": [], "name": "Source", "actionTypeId": { "category": "Source", "owner": "AWS", "version": "1", "provider": "S3" }, "outputArtifacts": [ { "name": "MyApp" } ], "configuration": { "S3Bucket": "awscodepipeline-demobucket-example-date", "S3ObjectKey": "ExampleCodePipelineSampleBundle.zip", "PollForSourceChanges": "false" }, "runOrder": 1 } ] }, { "name": "Staging", "actions": [ { "inputArtifacts": [ {
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md
c2291f7db1de-3
"actions": [ { "inputArtifacts": [ { "name": "MyApp" } ], "name": "Deploy-CodeDeploy-Application", "actionTypeId": { "category": "Deploy", "owner": "AWS", "version": "1", "provider": "CodeDeploy" }, "outputArtifacts": [], "configuration": { "ApplicationName": "CodePipelineDemoApplication", "DeploymentGroupName": "CodePipelineDemoFleet" }, "runOrder": 1 } ] } ], "artifactStore": { "type": "S3", "location": "codepipeline-us-east-2-250656481468" }, "name": "MyFirstPipeline", "version": 1 }, "metadata": { "pipelineArn": "arn:aws:codepipeline:us-east-2:80398EXAMPLE:MyFirstPipeline", "updated": 1501626591.112,
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md
c2291f7db1de-4
"updated": 1501626591.112, "created": 1501626591.112 }, "tags": [{ "key": "Project", "value": "ProjectA" }] } ``` This example adds tagging to the pipeline by including the `Project` tag key and `ProjectA` value on the pipeline\. For more information about tagging resources in CodePipeline, see [Tagging resources](tag-resources.md)\. Make sure the `PollForSourceChanges` parameter in your JSON file is set as follows: ``` "PollForSourceChanges": "false", ``` CodePipeline uses Amazon CloudWatch Events to detect changes in your CodeCommit source repository and branch or your S3 source bucket\. CodePipeline uses webhooks to detect changes in your GitHub source repository and branch\. The next step includes instructions to manually create these resources for your pipeline\. Setting the flag to `false` disables periodic checks, which are not necessary when you are using the recommended change detection methods\. 1. To create a build, test, or deploy action in a Region different from your pipeline, you must add the following to your pipeline structure\. For instructions, see [Add a cross\-Region action in CodePipeline](actions-create-cross-region.md)\. + Add the `Region` parameter to your action's pipeline structure\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md
c2291f7db1de-5
+ Add the `Region` parameter to your action's pipeline structure\. + Use the `artifactStores` parameter to specify an artifact bucket for each AWS Region where you have an action\. 1. When you are satisfied with its structure, save your file with a name like **pipeline\.json**\. **To create a pipeline** 1. Run the create\-pipeline command and use the `--cli-input-json` parameter to specify the JSON file you created previously\. To create a pipeline named *MySecondPipeline* with a JSON file named pipeline\.json that includes the name "*MySecondPipeline*" as the value for `name` in the JSON, your command would look like the following: ``` aws codepipeline create-pipeline --cli-input-json file://pipeline.json ``` **Important** Be sure to include `file://` before the file name\. It is required in this command\. This command returns the structure of the entire pipeline you created\. 1. To view the pipeline, either open the CodePipeline console and choose it from the list of pipelines, or use the get\-pipeline\-state command\. For more information, see [View pipeline details and history in CodePipeline](pipelines-view.md)\. 1. If you use the CLI to create a pipeline, you must manually create the recommended change detection resources for your pipeline:
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md
c2291f7db1de-6
1. If you use the CLI to create a pipeline, you must manually create the recommended change detection resources for your pipeline: + For a pipeline with a CodeCommit repository, you must manually create the CloudWatch Events rule, as described in [Create a CloudWatch Events rule for a CodeCommit source \(CLI\)](pipelines-trigger-source-repo-changes-cli.md)\. + For a pipeline with an Amazon S3 source, you must manually create the CloudWatch Events rule and AWS CloudTrail trail, as described in [Use CloudWatch Events to start a pipeline \(Amazon S3 source\)](create-cloudtrail-S3-source.md)\. + For a pipeline with a GitHub source, you must manually create the webhook, as described in [Use webhooks to start a pipeline \(GitHub source\)](pipelines-webhooks.md)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-create.md
0a2c7fdd9711-0
Third\-party auditors assess the security and compliance of AWS CodePipeline as part of multiple AWS compliance programs\. These include PCI, ISO, HIPAA, and others\. For a list of AWS services in scope of specific compliance programs, see [AWS Services in Scope by Compliance Program](http://aws.amazon.com/compliance/services-in-scope/)\. For general information, see [AWS Compliance Programs](http://aws.amazon.com/compliance/programs/)\. You can download third\-party audit reports using AWS Artifact\. For more information, see [Downloading Reports in AWS Artifact](https://docs.aws.amazon.com/artifact/latest/ug/downloading-documents.html)\. Your compliance responsibility when using CodePipeline is determined by the sensitivity of your data, your company's compliance objectives, and applicable laws and regulations\. AWS provides the following resources to help with compliance: + [Security and Compliance Quick Start Guides](http://aws.amazon.com/quickstart/?awsf.quickstart-homepage-filter=categories%23security-identity-compliance) – These deployment guides discuss architectural considerations and provide steps for deploying security\- and compliance\-focused baseline environments on AWS\. + [Architecting for HIPAA Security and Compliance Whitepaper ](https://d0.awsstatic.com/whitepapers/compliance/AWS_HIPAA_Compliance_Whitepaper.pdf) – This whitepaper describes how companies can use AWS to create HIPAA\-compliant applications\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/SERVICENAME-compliance.md
0a2c7fdd9711-1
+ [AWS Compliance Resources](http://aws.amazon.com/compliance/resources/) – This collection of workbooks and guides might apply to your industry and location\. + [Evaluating Resources with Rules](https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config.html) in the *AWS Config Developer Guide* – AWS Config assesses how well your resource configurations comply with internal practices, industry guidelines, and regulations\. + [AWS Security Hub](https://docs.aws.amazon.com/securityhub/latest/userguide/what-is-securityhub.html) – This AWS service provides a comprehensive view of your security state within AWS that helps you check your compliance with security industry standards and best practices\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/SERVICENAME-compliance.md
e8a8c2246c51-0
You can add an approval action to a stage in a CodePipeline pipeline at the point where you want the pipeline to stop so someone can manually approve or reject the action\. **Note** Approval actions can't be added to Source stages\. Source stages can contain only source actions\. If you want to use Amazon SNS to send notifications when an approval action is ready for review, you must first complete the following prerequisites: + Grant permission to your CodePipeline service role to access Amazon SNS resources\. For information, see [Grant Amazon SNS permissions to a CodePipeline service role](approvals-service-role-permissions.md)\. + Grant permission to one or more IAM users in your organization to update the status of an approval action\. For information, see [Grant approval permissions to an IAM user in CodePipeline](approvals-iam-permissions.md)\. In this example, you create a new approval stage and add a manual approval action to the stage\. You can also add a manual approval action to an existing stage that contains other actions\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/approvals-action-add.md
2032e11539b5-0
You can use the CodePipeline console to add an approval action to an existing CodePipeline pipeline\. You must use the AWS CLI if you want to add approval actions when you create a new pipeline\. 1. Open the CodePipeline console at [https://console\.aws\.amazon\.com/codepipeline/](https://console.aws.amazon.com/codepipeline/)\. 1. In **Name**, choose the pipeline\. 1. On the pipeline details page, choose **Edit**\. 1. If you want to add an approval action to a new stage, choose **\+ Add stage** at the point in the pipeline where you want to add an approval request, and enter a name for the stage\. On the **Add stage** page, in **Stage name**, enter your new stage name\. For example, add a new stage and name it `Manual_Approval`\. If you want to add an approval action to an existing stage, choose **Edit stage**\. 1. In the stage where you want to add the approval action, choose **\+ Add action group**\. 1. On the **Edit action** page, do the following: 1. In **Action name**, enter a name to identify the action\. 1. In **Action provider**, under **Approval**, choose **Manual approval**\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/approvals-action-add.md
2032e11539b5-1
1. In **Action provider**, under **Approval**, choose **Manual approval**\. 1. \(Optional\) In **SNS topic ARN**, choose the name of the topic to be used to send notifications for the approval action\. 1. \(Optional\) In **URL for review**, enter the URL of the page or application you want the approver to examine\. Approvers can access this URL through a link included in the console view of the pipeline\. 1. \(Optional\) In **Comments**, enter any other information you want to share with the reviewer\. Your completed page might look similar to the following: ![\[The Edit action page completed for an Approval action\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/pipeline-add-action-manual-approval-pol.png)![\[The Edit action page completed for an Approval action\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[The Edit action page completed for an Approval action\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/) 1. Choose **Save**\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/approvals-action-add.md
fd4203302bdd-0
You can use the CLI to add an approval action to an existing pipeline or when you create a pipeline\. You do this by including an approval action, with the Manual approval type, in a stage you are creating or editing\. For more information about creating and editing pipelines, see [Create a pipeline in CodePipeline](pipelines-create.md) and [Edit a pipeline in CodePipeline](pipelines-edit.md)\. To add a stage to a pipeline that includes only an approval action, you would include something similar to the following example when you create or update the pipeline\. **Note** The `configuration` section is optional\. This is just a portion, not the entire structure, of the file\. For more information, see [CodePipeline pipeline structure reference](reference-pipeline-structure.md)\. ``` { "name": "MyApprovalStage", "actions": [ { "name": "MyApprovalAction", "actionTypeId": { "category": "Approval", "owner": "AWS", "version": "1", "provider": "Manual" }, "inputArtifacts": [], "outputArtifacts": [], "configuration": {
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/approvals-action-add.md
fd4203302bdd-1
"inputArtifacts": [], "outputArtifacts": [], "configuration": { "NotificationArn": "arn:aws:sns:us-east-2:80398EXAMPLE:MyApprovalTopic", "ExternalEntityLink": "http://example.com", "CustomData": "The latest changes include feedback from Bob."}, "runOrder": 1 } ] } ``` If the approval action is in a stage with other actions, the section of your JSON file that contains the stage might look similar instead to the following example\. **Note** The `configuration` section is optional\. This is just a portion, not the entire structure, of the file\. For more information, see [CodePipeline pipeline structure reference](reference-pipeline-structure.md)\. ``` , { "name": "Production", "actions": [ { "inputArtifacts": [], "name": "MyApprovalAction", "actionTypeId": { "category": "Approval", "owner": "AWS", "version": "1", "provider": "Manual" },
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/approvals-action-add.md
fd4203302bdd-2
"owner": "AWS", "version": "1", "provider": "Manual" }, "outputArtifacts": [], "configuration": { "NotificationArn": "arn:aws:sns:us-east-2:80398EXAMPLE:MyApprovalTopic", "ExternalEntityLink": "http://example.com", "CustomData": "The latest changes include feedback from Bob." }, "runOrder": 1 }, { "inputArtifacts": [ { "name": "MyApp" } ], "name": "MyDeploymentAction", "actionTypeId": { "category": "Deploy", "owner": "AWS", "version": "1", "provider": "CodeDeploy" }, "outputArtifacts": [], "configuration": { "ApplicationName": "MyDemoApplication", "DeploymentGroupName": "MyProductionFleet" }, "runOrder": 2 } ] } ```
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/approvals-action-add.md
8a02c251c65d-0
Tags are key\-value pairs associated with AWS resources\. You can use the console or the CLI to apply tags to your custom actions in CodePipeline\. For information about CodePipeline resource tagging, use cases, tag key and value constraints, and supported resource types, see [Tagging resources](tag-resources.md)\. You can add, remove, and update the values of tags in a custom action\. You can add up to 50 tags to each custom action\. **Topics** + [Add tags to a custom action](#customactions-tag-add) + [View tags for a custom action](#customactions-tag-list) + [Edit tags for a custom action](#customactions-tag-update) + [Remove tags from a custom action](#customactions-tag-delete)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/customactions-tag.md
d2a3b1c72629-0
Follow these steps to use the AWS CLI to add a tag to a custom action\. To add a tag to a custom action when you create it, see [Create and add a custom action in CodePipeline](actions-create-custom-action.md)\. In these steps, we assume that you have already installed a recent version of the AWS CLI or updated to the current version\. For more information, see [Installing the AWS Command Line Interface](https://docs.aws.amazon.com/cli/latest/userguide/installing.html)\. At the terminal or command line, run the tag\-resource command, specifying the Amazon Resource Name \(ARN\) of the custom action where you want to add tags and the key and value of the tag you want to add\. You can add more than one tag to a custom action\. For example, to tag a custom action with two tags, a tag key named *TestActionType* with the tag value of *UnitTest*, and a tag key named *ApplicationName* with the tag value of *MyApplication*: ``` aws codepipeline tag-resource --resource-arn arn:aws:codepipeline:us-west-2:account-id:actiontype:Owner/Category/Provider/Version --tags key=TestActionType,value=UnitTest key=ApplicationName,value=MyApplication ``` If successful, this command returns nothing\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/customactions-tag.md
3f159ec4531b-0
Follow these steps to use the AWS CLI to view the AWS tags for a custom action\. If no tags have been added, the returned list is empty\. At the terminal or command line, run the list\-tags\-for\-resource command\. For example, to view a list of tag keys and tag values for a custom action with the ARN `arn:aws:codepipeline:us-west-2:account-id:actiontype:Owner/Category/Provider/Version`: ``` aws codepipeline list-tags-for-resource --resource-arn arn:aws:codepipeline:us-west-2:account-id:actiontype:Owner/Category/Provider/Version ``` If successful, this command returns information similar to the following: ``` { "tags": { "TestActionType": "UnitTest", "ApplicationName": "MyApplication" } } ```
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/customactions-tag.md
80daa8a4d0ab-0
Follow these steps to use the AWS CLI to edit a tag for a custom action\. You can change the value for an existing key or add another key\. You can also remove tags from a custom action, as shown in the next section\. At the terminal or command line, run the tag\-resource command, specifying the Amazon Resource Name \(ARN\) of the custom action where you want to update a tag and specify the tag key and tag value: ``` aws codepipeline tag-resource --resource-arn arn:aws:codepipeline:us-west-2:account-id:actiontype:Owner/Category/Provider/Version --tags key=TestActionType,value=IntegrationTest ```
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/customactions-tag.md
9996c623dada-0
Follow these steps to use the AWS CLI to remove a tag from a custom action\. When you remove tags from the associated resource, the tags are deleted\. **Note** If you delete a custom action, all tag associations are removed from the deleted custom action\. You do not have to remove tags before deleting a custom action\. At the terminal or command line, run the untag\-resource command, specifying the ARN of the custom action where you want to remove tags and the tag key of the tag you want to remove\. For example, to remove a tag on a custom action with the tag key *TestActionType*: ``` aws codepipeline untag-resource --resource-arn arn:aws:codepipeline:us-west-2:account-id:actiontype:Owner/Category/Provider/Version --tag-keys TestActionType ``` If successful, this command returns nothing\. To verify the tags associated with the custom action, run the list\-tags\-for\-resource command\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/customactions-tag.md
637360ccc4c6-0
The examples provide sample templates that allow you to use AWS CloudFormation to create a pipeline that deploys your application to your instances each time the source code changes\. The sample template creates a pipeline that you can view in AWS CodePipeline\. The pipeline detects the arrival of a saved change through Amazon CloudWatch Events\. **Topics** + [Example 1: Create an AWS CodeCommit pipeline with AWS CloudFormation](tutorials-cloudformation-codecommit.md) + [Example 2: Create an Amazon S3 pipeline with AWS CloudFormation](tutorials-cloudformation-s3.md) + [Example 3: Create a GitHub pipeline with AWS CloudFormation](tutorials-cloudformation-github.md)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-cloudformation.md
3169128bfbf1-0
AWS CodePipeline is integrated with AWS CloudTrail, a service that provides a record of actions taken by a user, role, or an AWS service in CodePipeline;\. CloudTrail captures all API calls for CodePipeline as events\. The calls captured include calls from the CodePipeline console and code calls to the CodePipeline API operations\. If you create a trail, you can enable continuous delivery of CloudTrail events to an Amazon S3 bucket, including events for CodePipeline\. If you don't configure a trail, you can still view the most recent events in the CloudTrail console in **Event history**\. Using the information collected by CloudTrail, you can determine the request that was made to CodePipeline, the IP address from which the request was made, who made the request, when it was made, and additional details\. To learn more about CloudTrail, see the [AWS CloudTrail User Guide](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/monitoring-cloudtrail-logs.md
4a85aaa5365e-0
CloudTrail is enabled on your AWS account when you create the account\. When activity occurs in CodePipeline, that activity is recorded in a CloudTrail event along with other AWS service events in **Event history**\. You can view, search, and download recent events in your AWS account\. For more information, see [Viewing Events with CloudTrail Event History](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html)\. For an ongoing record of events in your AWS account, including events for CodePipeline, create a trail\. A *trail* enables CloudTrail to deliver log files to an Amazon S3 bucket\. By default, when you create a trail in the console, the trail applies to all AWS Regions\. The trail logs events from all Regions in the AWS partition and delivers the log files to the Amazon S3 bucket that you specify\. Additionally, you can configure other AWS services to further analyze and act upon the event data collected in CloudTrail logs\. For more information, see the following: + [Overview for Creating a Trail](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-create-and-update-a-trail.html) + [CloudTrail Supported Services and Integrations](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-aws-service-specific-topics.html#cloudtrail-aws-service-specific-topics-integrations)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/monitoring-cloudtrail-logs.md
4a85aaa5365e-1
+ [Configuring Amazon SNS Notifications for CloudTrail](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/getting_notifications_top_level.html) + [Receiving CloudTrail Log Files from Multiple Regions](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html) and [Receiving CloudTrail Log Files from Multiple Accounts](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-receive-logs-from-multiple-accounts.html) All CodePipeline actions are logged by CloudTrail and are documented in the [CodePipeline API Reference](http://docs.aws.amazon.com/codepipeline/latest/APIReference)\. For example, calls to the `CreatePipeline`, `GetPipelineExecution` and `UpdatePipeline` actions generate entries in the CloudTrail log files\. Every event or log entry contains information about who generated the request\. The identity information helps you determine the following: + Whether the request was made with root or AWS Identity and Access Management \(IAM\) user credentials\. + Whether the request was made with temporary security credentials for a role or federated user\. + Whether the request was made by another AWS service\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/monitoring-cloudtrail-logs.md
4a85aaa5365e-2
+ Whether the request was made with temporary security credentials for a role or federated user\. + Whether the request was made by another AWS service\. For more information, see the [CloudTrail userIdentity Element](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-user-identity.html)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/monitoring-cloudtrail-logs.md
c5eb02c6ef63-0
A trail is a configuration that enables delivery of events as log files to an Amazon S3 bucket that you specify\. CloudTrail log files contain one or more log entries\. An event represents a single request from any source and includes information about the requested action, the date and time of the action, request parameters, and so on\. CloudTrail log files aren't an ordered stack trace of the public API calls, so they don't appear in any specific order\. The following example shows a CloudTrail log entry for an update pipeline event, where a pipeline named MyFirstPipeline has been edited by the user named JaneDoe\-CodePipeline with the account ID 80398EXAMPLE\. The user changed the name of the source stage of a pipeline from `Source` to `MySourceStage`\. Because both the `requestParameters` and the `responseElements` elements in the CloudTrail log contain the entire structure of the edited pipeline, those elements have been abbreviated in the following example\. **Emphasis** has been added to the `requestParameters` portion of the pipeline where the change occurred, the previous version number of the pipeline, and the `responseElements` portion, which shows the version number incremented by 1\. Edited portions are marked with ellipses \(\.\.\.\) to illustrate where more data appears in a real log entry\. ``` { "eventVersion":"1.03", "userIdentity": { "type":"IAMUser", "principalId":"AKIAI44QH8DHBEXAMPLE",
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/monitoring-cloudtrail-logs.md
c5eb02c6ef63-1
"type":"IAMUser", "principalId":"AKIAI44QH8DHBEXAMPLE", "arn":"arn:aws:iam::80398EXAMPLE:user/JaneDoe-CodePipeline", "accountId":"80398EXAMPLE", "accessKeyId":"AKIAIOSFODNN7EXAMPLE", "userName":"JaneDoe-CodePipeline", "sessionContext": { "attributes":{ "mfaAuthenticated":"false", "creationDate":"2015-06-17T14:44:03Z" } }, "invokedBy":"signin.amazonaws.com"}, "eventTime":"2015-06-17T19:12:20Z", "eventSource":"codepipeline.amazonaws.com", "eventName":"UpdatePipeline", "awsRegion":"us-east-2", "sourceIPAddress":"192.0.2.64", "userAgent":"signin.amazonaws.com", "requestParameters":{ "pipeline":{ "version":1,
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/monitoring-cloudtrail-logs.md
c5eb02c6ef63-2
"requestParameters":{ "pipeline":{ "version":1, "roleArn":"arn:aws:iam::80398EXAMPLE:role/AWS-CodePipeline-Service", "name":"MyFirstPipeline", "stages":[ { "actions":[ { "name":"MySourceStage", "actionType":{ "owner":"AWS", "version":"1", "category":"Source", "provider":"S3" }, "inputArtifacts":[], "outputArtifacts":[ {"name":"MyApp"} ], "runOrder":1, "configuration":{ "S3Bucket":"awscodepipeline-demobucket-example-date", "S3ObjectKey":"sampleapp_linux.zip" } } ], "name":"Source" }, (...) }, "responseElements":{ "pipeline":{ "version":2, (...)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/monitoring-cloudtrail-logs.md
c5eb02c6ef63-3
"responseElements":{ "pipeline":{ "version":2, (...) }, "requestID":"2c4af5c9-7ce8-EXAMPLE", "eventID":""c53dbd42-This-Is-An-Example"", "eventType":"AwsApiCall", "recipientAccountId":"80398EXAMPLE" } ] } ```
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/monitoring-cloudtrail-logs.md
c941cdc96a35-0
+ [How to deploy from GitHub to Amazon EC2 with CodePipeline](https://seanjziegler.com/deploying-code-from-github-to-aws-ec2-with-codepipeline/) Learn how to set up CodePipeline from scratch to deploy dev, test, and prod branches to separate deployment groups\. Learn how to use and configure IAM roles, the CodeDeploy agent, and CodeDeploy, along with CodePipeline\. *Published April 2020* + [Implementing DevSecOps Using CodePipeline](https://aws.amazon.com/blogs/devops/implementing-devsecops-using-aws-codepipeline/) Learn how to use a CI/CD pipeline in CodePipeline to automate preventive and detective security controls\. This post covers how to use a pipeline to create a simple security group and perform security checks during the source, test, and production stages to improve the security posture of your AWS accounts\. *Published March 2017* + [Continuous Deployment to Amazon ECS Using CodePipeline, CodeBuild, Amazon ECR, and AWS CloudFormation](https://aws.amazon.com/blogs/compute/continuous-deployment-to-amazon-ecs-using-aws-codepipeline-aws-codebuild-amazon-ecr-and-aws-cloudformation/)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/integrations-community-blogposts.md
c941cdc96a35-1
Learn how to create a continuous deployment pipeline to Amazon Elastic Container Service \(Amazon ECS\)\. Applications are delivered as Docker containers using CodePipeline, CodeBuild, Amazon ECR, and AWS CloudFormation\. + Download a sample AWS CloudFormation template and instructions for using it to create your own continuous deployment pipeline from the [ECS Reference Architecture: Continuous Deployment](https://github.com/awslabs/ecs-refarch-continuous-deployment) repo on GitHub\. *Published January 2017* + [Continuous Deployment for Serverless Applications](https://aws.amazon.com/blogs/compute/continuous-deployment-for-serverless-applications/) Learn how to use a collection of AWS services to create a continuous deployment pipeline for your serverless applications\. You'll use the Serverless Application Model \(SAM\) to define the application and its resources and CodePipeline to orchestrate your application deployment\. + [View a sample application](https://gist.github.com/SAPessi/246b278b6b7502b157a9fbaf3981d103) written in Go with the Gin framework and an API Gateway proxy shim\. *Published December 2016* + [Integrating Git with CodePipeline](https://aws.amazon.com/blogs/devops/integrating-git-with-aws-codepipeline/) Learn how to integrate CodePipeline with Git servers that support webhooks functionality, such as GitHub Enterprise, Bitbucket, and GitLab\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/integrations-community-blogposts.md
c941cdc96a35-2
Learn how to integrate CodePipeline with Git servers that support webhooks functionality, such as GitHub Enterprise, Bitbucket, and GitLab\. *Published November 2016* + [Scaling DevOps Deployments with CodePipeline and Dynatrace](https://www.dynatrace.com/blog/scaling-devops-deployments-with-aws-codepipeline-dynatrace/) Learn how use Dynatrace monitoring solutions to scale pipelines in CodePipeline, automatically analyze test executions before code is committed, and maintain optimal lead times\. *Published November 2016* + [Create a Pipeline for AWS Elastic Beanstalk in CodePipeline Using AWS CloudFormation and CodeCommit](http://www.stelligent.com/automation/create-a-pipeline-for-elastic-beanstalk-in-codepipeline-using-cloudformation-and-codecommit/) Learn how to implement continuous delivery in a CodePipeline pipeline for an application in AWS Elastic Beanstalk\. All AWS resources are provisioned automatically through the use of an AWS CloudFormation template\. This walkthrough also incorporates CodeCommit and AWS Identity and Access Management \(IAM\)\. *Published May 2016* + [Automate CodeCommit and CodePipeline in AWS CloudFormation](http://www.stelligent.com/automation/automate-codecommit-and-codepipeline-in-aws-cloudformation/)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/integrations-community-blogposts.md
c941cdc96a35-3
Use AWS CloudFormation to automate the provisioning of AWS resources for a continuous delivery pipeline that uses CodeCommit, CodePipeline, CodeDeploy, and AWS Identity and Access Management\. *Published April 2016* + [Create a Cross\-Account Pipeline in AWS CodePipeline](http://www.stelligent.com/automation/create-a-cross-account-pipeline-in-aws-cloudformation/) Learn how to automate the provisioning of cross\-account access to pipelines in AWS CodePipeline by using AWS Identity and Access Management\. Includes examples in an AWS CloudFormation template\. *Published March 2016* + [Exploring ASP\.NET Core Part 2: Continuous Delivery](https://blogs.aws.amazon.com/net/post/Tx2EHIJAM9LIW8G/Exploring-ASP-NET-Core-Part-2-Continuous-Delivery) Learn how to create a full continuous delivery system for an ASP\.NET Core application using CodeDeploy and AWS CodePipeline\. *Published March 2016* + [Create a Pipeline Using the AWS CodePipeline Console](http://www.stelligent.com/cloud/create-a-pipeline-using-the-aws-codepipeline-console/) Learn how to use the AWS CodePipeline console to create a two\-stage pipeline in a walkthrough based on the AWS CodePipeline [Tutorial: Create a four\-stage pipeline](tutorials-four-stage-pipeline.md)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/integrations-community-blogposts.md
c941cdc96a35-4
*Published March 2016* + [Mocking AWS CodePipeline Pipelines with AWS Lambda](http://www.stelligent.com/automation/mocking-aws-codepipeline-pipelines-with-lambda/) Learn how to invoke a Lambda function that lets you visualize the actions and stages in a CodePipeline software delivery process as you design it, before the pipeline is operational\. As you design your pipeline structure, you can use the Lambda function to test whether your pipeline will complete successfully\. *Published February 2016* + [Running AWS Lambda Functions in CodePipeline Using AWS CloudFormation](http://www.stelligent.com/automation/aws-lambda-functions-aws-codepipeline-cloudformation/) Learn how to create an AWS CloudFormation stack that provisions all the AWS resources used in the user guide task [Invoke an AWS Lambda function in a pipeline in CodePipeline](actions-invoke-lambda-function.md)\. *Published February 2016* + [Provisioning Custom CodePipeline Actions in AWS CloudFormation](http://www.stelligent.com/automation/provisioning-custom-codepipeline-actions-in-cloudformation/) Learn how to use AWS CloudFormation to provision custom actions in CodePipeline\. *Published January 2016* + [Provisioning CodePipeline with AWS CloudFormation](http://www.stelligent.com/automation/provisioning-aws-codepipeline-with-cloudformation/)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/integrations-community-blogposts.md
c941cdc96a35-5
Learn how to provision a basic continuous delivery pipeline in CodePipeline using AWS CloudFormation\. *Published December 2015* + [Building Continuous Deployment on AWS with CodePipeline, Jenkins, and Elastic Beanstalk](https://blogs.aws.amazon.com/application-management/post/Tx34AXRMYLXG5OT/Building-Continuous-Deployment-on-AWS-with-AWS-CodePipeline-Jenkins-and-AWS-Elas) Learn how to use GitHub, CodePipeline, Jenkins, and Elastic Beanstalk to create a deployment pipeline for a web application that is updated automatically every time you change your code\. *Published December 2015* + [Performance Testing in Continuous Delivery Using CodePipeline and BlazeMeter](https://aws.amazon.com/blogs/apn/performance-testing-in-continuous-delivery-using-aws-codepipeline-and-blazemeter/) Learn how to inject automated load tests at the right places in the CodePipeline delivery workflow with BlazeMeter’s native CodePipeline integration\. *Published September 2015* + [Deploying from CodePipeline to AWS OpsWorks Using a Custom Action and AWS Lambda](http://hipsterdevblog.com/blog/2015/07/28/deploying-from-codepipeline-to-opsworks-using-a-custom-action-and-lambda/) Learn how to configure your pipeline and the AWS Lambda function to deploy to AWS OpsWorks using CodePipeline\. *Published July 2015*
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/integrations-community-blogposts.md
c941cdc96a35-6
Learn how to configure your pipeline and the AWS Lambda function to deploy to AWS OpsWorks using CodePipeline\. *Published July 2015* + [Automated Delivery Acceptance Test Nirvana: Powered by CodePipeline, CloudWatch, and BlazeMeter](https://blazemeter.com/blog/automated-delivery-acceptance-test-nirvana) Learn how to use CodePipeline, CloudWatch, and BlazeMeter to create a continuous delivery workflow that reduces time to release and increases test coverage for developers during the release\. *Published July 2015*
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/integrations-community-blogposts.md
24c4de7ae614-0
Tags are key\-value pairs associated with AWS resources\. You can apply tags to your pipelines in CodePipeline\. For information about CodePipeline resource tagging, use cases, tag key and value constraints, and supported resource types, see [Tagging resources](tag-resources.md)\. You can use the CLI to specify tags when you create a pipeline\. You can use the console or CLI to add or remove tags, and update the values of tags in a pipeline\. You can add up to 50 tags to each pipeline\. **Topics** + [Tag pipelines \(console\)](#pipelines-tag-console) + [Tag pipelines \(CLI\)](#pipelines-tag-cli)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-tag.md
86e0445134cd-0
You can use the console or the CLI to tag resources\. Pipelines are the only CodePipeline resource that can be managed with either the console or the CLI\. **Topics** + [Add tags to a pipeline \(console\)](#pipelines-tag-add-console) + [View tags for a pipeline \(console\)](#pipelines-tag-list-console) + [Edit tags for a pipeline \(console\)](#pipelines-tag-update-console) + [Remove tags from a pipeline \(console\)](#pipelines-tag-delete-console)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-tag.md
fc41f15635d9-0
You can use the console to add tags to an existing pipeline\. 1. Sign in to the AWS Management Console and open the CodePipeline console at [http://console\.aws\.amazon\.com/codesuite/codepipeline/home](http://console.aws.amazon.com/codesuite/codepipeline/home)\. 1. On the **Pipelines** page, choose the pipeline where you want to add tags\. 1. From the navigation pane, choose **Settings**\. 1. Under **Pipeline tags**, choose **Edit**\. 1. In the **Key** and **Value** fields, enter a key pair for each set of tags you want to add\. \(The **Value** field is optional\.\) For example, in **Key**, enter **Project**\. In **Value**, enter **ProjectA**\. ![\[Image NOT FOUND\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/pipeline-tags-edit-console.png)![\[Image NOT FOUND\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Image NOT FOUND\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/) 1. \(Optional\) Choose **Add tag** to add more rows and enter more tags\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-tag.md
fc41f15635d9-1
1. \(Optional\) Choose **Add tag** to add more rows and enter more tags\. 1. Choose **Submit**\. The tags are listed under pipeline settings\. ![\[Image NOT FOUND\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/pipeline-tags-console.png)![\[Image NOT FOUND\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Image NOT FOUND\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-tag.md
ae8ded523d8b-0
You can use the console to list tags for existing pipelines\. 1. Sign in to the AWS Management Console and open the CodePipeline console at [http://console\.aws\.amazon\.com/codesuite/codepipeline/home](http://console.aws.amazon.com/codesuite/codepipeline/home)\. 1. On the **Pipelines** page, choose the pipeline where you want to view tags\. 1. From the navigation pane, choose **Settings**\. 1. Under **Pipeline tags**, view the tags for the pipeline under the **Key** and **Value** columns\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-tag.md
e91744272895-0
You can use the console to edit tags that have been added to pipelines\. 1. Sign in to the AWS Management Console and open the CodePipeline console at [http://console\.aws\.amazon\.com/codesuite/codepipeline/home](http://console.aws.amazon.com/codesuite/codepipeline/home)\. 1. On the **Pipelines** page, choose the pipeline where you want to update tags\. 1. From the navigation pane, choose **Settings**\. 1. Under **Pipeline tags**, choose **Edit**\. 1. In the **Key** and **Value** fields, update the values in each field as needed\. For example, for the **Project** key, in **Value**, change **ProjectA** to **ProjectB**\. 1. Choose **Submit**\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-tag.md
eb7c8253c430-0
You can use the console to delete tags from pipelines\. When you remove tags from the associated resource, the tags are deleted\. 1. Sign in to the AWS Management Console and open the CodePipeline console at [http://console\.aws\.amazon\.com/codesuite/codepipeline/home](http://console.aws.amazon.com/codesuite/codepipeline/home)\. 1. On the **Pipelines** page, choose the pipeline where you want to remove tags\. 1. From the navigation pane, choose **Settings**\. 1. Under **Pipeline tags**, choose **Edit**\. 1. Next to the key and value for each tag you want to delete, choose **Remove tag**\. 1. Choose **Submit**\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-tag.md
ec2b28f79af7-0
You can use the CLI to tag resources\. You must use the console to manage tags in pipelines\. **Topics** + [Add tags to a pipeline \(CLI\)](#pipelines-tag-add-cli) + [View tags for a pipeline \(CLI\)](#pipelines-tag-list-cli) + [Edit tags for a pipeline \(CLI\)](#pipelines-tag-update-cli) + [Remove tags from a pipeline \(CLI\)](#pipelines-tag-delete-cli)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-tag.md
04990c6f0b8e-0
You can use the console or the AWS CLI to tag pipelines\. To add a tag to a pipeline when you create it, see [Create a pipeline in CodePipeline](pipelines-create.md)\. In these steps, we assume that you have already installed a recent version of the AWS CLI or updated to the current version\. For more information, see [Installing the AWS Command Line Interface](https://docs.aws.amazon.com/cli/latest/userguide/installing.html)\. At the terminal or command line, run the tag\-resource command, specifying the Amazon Resource Name \(ARN\) of the pipeline where you want to add tags and the key and value of the tag you want to add\. You can add more than one tag to a pipeline\. For example, to tag a pipeline named *MyPipeline* with two tags, a tag key named *DeploymentEnvironment* with the tag value of *Test*, and a tag key named *IscontainerBased* with the tag value of *true*: ``` aws codepipeline tag-resource --resource-arn arn:aws:codepipeline:us-west-2:account-id:MyPipeline --tags key=Project,value=ProjectA key=IscontainerBased,value=true ``` If successful, this command returns nothing\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-tag.md
27238b94f6ae-0
Follow these steps to use the AWS CLI to view the AWS tags for a pipeline\. If no tags have been added, the returned list is empty\. At the terminal or command line, run the list\-tags\-for\-resource command\. For example, to view a list of tag keys and tag values for a pipeline named *MyPipeline* with the `arn:aws:codepipeline:us-west-2:account-id:MyPipeline` ARN value: ``` aws codepipeline list-tags-for-resource --resource-arn arn:aws:codepipeline:us-west-2:account-id:MyPipeline ``` If successful, this command returns information similar to the following: ``` { "tags": { "Project": "ProjectA", "IscontainerBased": "true" } } ```
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-tag.md
f9a7257ff38c-0
Follow these steps to use the AWS CLI to edit a tag for a pipeline\. You can change the value for an existing key or add another key\. You can also remove tags from a pipeline, as shown in the next section\. At the terminal or command line, run the tag\-resource command, specifying the ARN of the pipeline where you want to update a tag and specify the tag key and tag value: ``` aws codepipeline tag-resource --resource-arn arn:aws:codepipeline:us-west-2:account-id:MyPipeline --tags key=Project,value=ProjectA ``` If successful, this command returns nothing\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-tag.md
e54ecc00f069-0
Follow these steps to use the AWS CLI to remove a tag from a pipeline\. When you remove tags from the associated resource, the tags are deleted\. **Note** If you delete a pipeline, all tag associations are removed from the deleted pipeline\. You do not have to remove tags before you delete a pipeline\. At the terminal or command line, run the untag\-resource command, specifying the ARN of the pipeline where you want to remove tags and the tag key of the tag you want to remove\. For example, to remove multiple tags on a pipeline named *MyPipeline* with the tag keys *Project* and *IscontainerBased*: ``` aws codepipeline untag-resource --resource-arn arn:aws:codepipeline:us-west-2:account-id:MyPipeline --tag-keys Project IscontainerBased ``` If successful, this command returns nothing\. To verify the tags associated with the pipeline, run the list\-tags\-for\-resource command\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-tag.md
20c4a6da3519-0
A Lambda invoke action can use variables from another action as part of its input and return new variables along with its output\. For information about variables for actions in CodePipeline, see [Variables](reference-variables.md)\. At the end of this tutorial, you will have: + A Lambda invoke action that: + Consumes the `CommitId` variable from a CodeCommit source action + Outputs three new variables: `dateTime`, `testRunId`, and `region` + A manual approval action that consumes the new variables from your Lambda invoke action to provide a test URL and a test run ID + A pipeline updated with the new actions **Topics** + [Prerequisites](#lambda-variables-prereqs) + [Step 1: Create a Lambda function](#lambda-variables-function) + [Step 2: Add a Lambda invoke action and manual approval action to your pipeline](#lambda-variables-pipeline)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-lambda-variables.md
e9a3021cd8cd-0
Before you begin, you must have the following: + You can create or use the pipeline with the CodeCommit source in [Tutorial: Create a simple pipeline \(CodeCommit repository\)](tutorials-simple-codecommit.md)\. + Edit your existing pipeline so that the CodeCommit source action has a namespace\. Assign the namespace `SourceVariables` to the action\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-lambda-variables.md
7cbca10c843c-0
Use the following steps to create a Lambda function and a Lambda execution role\. You add the Lambda action to your pipeline after you create the Lambda function\. **To create a Lambda function and execution role** 1. Sign in to the AWS Management Console and open the AWS Lambda console at [https://console\.aws\.amazon\.com/lambda/](https://console.aws.amazon.com/lambda/)\. 1. Choose **Create function**\. Leave **Author from scratch** selected\. 1. In **Function name**, enter the name of your function, such as **myInvokeFunction**\. In **Runtime**, leave the default option selected\. 1. Expand **Choose or create an execution role**\. Choose **Create a new role with basic Lambda permissions**\. 1. Choose **Create function**\. 1. To use a variable from another action, it will have to be passed to the `UserParameters` in the Lambda invoke action configuration\. You will be configuring the action in our pipeline later in the tutorial, but you will add the code assuming the variable will be passed\. ``` const commitId = event["CodePipeline.job"].data.actionConfiguration.configuration.UserParameters; ```
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-lambda-variables.md
7cbca10c843c-1
event["CodePipeline.job"].data.actionConfiguration.configuration.UserParameters; ``` To produce new variables, set a property called `outputVariables` on the input to `putJobSuccessResult`\. Note that you cannot produce variables as part of a `putJobFailureResult`\. ``` const successInput = { jobId: jobId, outputVariables: { testRunId: Math.floor(Math.random() * 1000).toString(), dateTime: Date(Date.now()).toString(), region: lambdaRegion } }; ``` In your new function, leave **Edit code inline** selected, and paste the following example code under `index.js`\. ``` var AWS = require('aws-sdk'); exports.handler = function(event, context) { var codepipeline = new AWS.CodePipeline(); // Retrieve the Job ID from the Lambda action var jobId = event["CodePipeline.job"].id; // Retrieve the value of UserParameters from the Lambda action configuration in AWS CodePipeline, // in this case it is the Commit ID of the latest change of the pipeline.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-lambda-variables.md
7cbca10c843c-2
// in this case it is the Commit ID of the latest change of the pipeline. var commitId = event["CodePipeline.job"].data.actionConfiguration.configuration.UserParameters; // The region from where the lambda function is being executed. var lambdaRegion = process.env.AWS_REGION; // Notify AWS CodePipeline of a successful job var putJobSuccess = function(message) { var successInput = { jobId: jobId, outputVariables: { testRunId: Math.floor(Math.random() * 1000).toString(), dateTime: Date(Date.now()).toString(), region: lambdaRegion } }; codepipeline.putJobSuccessResult(params, function(err, data) { if(err) { context.fail(err); } else { context.succeed(message); } }); }; // Notify AWS CodePipeline of a failed job var putJobFailure = function(message) { var failureInput = { jobId: jobId, failureDetails: { message: JSON.stringify(message), type: 'JobFailed',
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-lambda-variables.md
7cbca10c843c-3
failureDetails: { message: JSON.stringify(message), type: 'JobFailed', externalExecutionId: context.invokeid } }; codepipeline.putJobFailureResult(params, function(err, data) { context.fail(message); }); }; var sendResult = function() { try { console.log("Testing commit - " + commitId); // Your tests here // Succeed the job putJobSuccess("Tests passed."); } catch (ex) { // If any of the assertions failed then fail the job putJobFailure(ex); } }; sendResult(); }; ``` 1. Choose **Save**\. 1. Copy the Amazon Resource Name \(ARN\) at the top of the screen\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-lambda-variables.md
7cbca10c843c-4
1. Choose **Save**\. 1. Copy the Amazon Resource Name \(ARN\) at the top of the screen\. 1. As a last step, open the AWS Identity and Access Management \(IAM\) console at [https://console\.aws\.amazon\.com/iam/](https://console.aws.amazon.com/iam/)\. Modify the Lambda execution role to add the following policy: [AWSCodePipelineCustomActionAccess](https://console.aws.amazon.com/iam/home?region=us-west-2#/policies/arn%3Aaws%3Aiam%3A%3Aaws%3Apolicy%2FAWSCodePipelineCustomActionAccess)\. For the steps to create a Lambda execution role or modify the role policy, see [Step 2: Create the Lambda function](actions-invoke-lambda-function.md#actions-invoke-lambda-function-create-function) \.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-lambda-variables.md
95caad2d7fae-0
In this step, you add a Lambda invoke action to your pipeline\. You add the action as part of a stage named **Test**\. The action type is an invoke action\. You then add a manual approval action after the invoke action\. **To add a Lambda action and a manual approval action to the pipeline** 1. Open the CodePipeline console at [https://console\.aws\.amazon\.com/codepipeline/](https://console.aws.amazon.com/codepipeline/)\. The names of all pipelines that are associated with your AWS account are displayed\. Choose the pipeline where you want to add the action\. 1. Add the Lambda test action to your pipeline\. 1. To edit your pipeline, choose **Edit**\. Add a stage after the source action in the existing pipeline\. Enter a name for the stage, such as **Test**\. 1. In the new stage, choose the icon to add an action\. In **Action name**, enter the name of the invoke action, such as **Test\_Commit**\. 1. In **Action provider**, choose **AWS Lambda**\. 1. In **Input artifacts**, choose the name of your source action's output artifact, such as `SourceArtifact`\. 1. In **Function name**, choose the name of the Lambda function that you created\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-lambda-variables.md
95caad2d7fae-1
1. In **Function name**, choose the name of the Lambda function that you created\. 1. In **User parameters**, enter the variable syntax for the CodeCommit commit ID\. This creates the output variable that resolves to the commit to be reviewed and approved each time the pipeline is run\. ``` #{SourceVariables.CommitId} ``` 1. In **Variable namespace**, add the namespace name, such as **TestVariables**\. ![\[Console screenshot showing the available options when adding a Lambda test action.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/variables-lambda-example.png)![\[Console screenshot showing the available options when adding a Lambda test action.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Console screenshot showing the available options when adding a Lambda test action.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/) 1. Choose **Done**\. 1. Add the manual approval action to your pipeline\. 1. With your pipeline still in editing mode, add a stage after the invoke action\. Enter a name for the stage, such as **Approval**\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-lambda-variables.md
95caad2d7fae-2
1. With your pipeline still in editing mode, add a stage after the invoke action\. Enter a name for the stage, such as **Approval**\. 1. In the new stage, choose the icon to add an action\. In **Action name**, enter the name of the approval action, such as **Change\_Approval**\. 1. In **Action provider**, choose **Manual approval**\. 1. In **URL for review**, construct the URL by adding the variable syntax for the `region` variable and the `CommitId` variable\. Make sure that you use the namespaces assigned to the actions that provide the output variables\. For this example, the URL with the variable syntax for a CodeCommit action has the default namespace `SourceVariables`\. The Lambda region output variable has the `TestVariables` namespace\. The URL looks like the following\. ``` https://#{TestVariables.region}.console.aws.amazon.com/codesuite/codecommit/repositories/MyDemoRepo/commit/#{SourceVariables.CommitId} ``` In **Comments**, construct the approval message text by adding the variable syntax for the `testRunId` variable\. For this example, the URL with the variable syntax for the Lambda `testRunId` output variable has the `TestVariables` namespace\. Enter the following message\. ```
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-lambda-variables.md
95caad2d7fae-3
``` Make sure to review the code before approving this action. Test Run ID: #{TestVariables.testRunId} ``` ![\[Console screenshot showing the boxes where you enter the URL and comments message.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/variables-lambda-example-approval.png)![\[Console screenshot showing the boxes where you enter the URL and comments message.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Console screenshot showing the boxes where you enter the URL and comments message.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/) 1. Choose **Done** to close the edit screen for the action, and then choose **Done** to close the edit screen for the stage\. To save the pipeline, choose **Done**\. The completed pipeline now contains a structure with source, test, approval, and deploy stages\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-lambda-variables.md
95caad2d7fae-4
![\[Console screenshot showing the source, test, approval, and deploy pipeline stages.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/variables-lambda-example-pipeline.png)![\[Console screenshot showing the source, test, approval, and deploy pipeline stages.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Console screenshot showing the source, test, approval, and deploy pipeline stages.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/) Choose **Release change** to run the latest change through the pipeline structure\. 1. When the pipeline reaches the manual approval stage, choose **Review**\. The resolved variables appear as the URL for the commit ID\. Your approver can choose the URL to view the commit\. ![\[Console screenshot showing the review dialog box with approve and reject buttons.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/variables-lambda-example-URL.png)![\[Console screenshot showing the review dialog box with approve and reject buttons.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Console screenshot showing the review dialog box with approve and reject buttons.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-lambda-variables.md
95caad2d7fae-5
1. After the pipeline runs successfully, you can also view the variable values on the action execution history page\. ![\[Console screenshot of the action configuration pane showing the resolved configuration.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/variables-lambda-example-details.png)![\[Console screenshot of the action configuration pane showing the resolved configuration.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Console screenshot of the action configuration pane showing the resolved configuration.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-lambda-variables.md
598d0ab8b0ba-0
Some actions in CodePipeline generate variables\. To use variables: + You assign a namespace to an action to make the variables it produces available to a downstream action configuration\. + You configure the downstream action to consume the variables generated by the action\. You can view the details for each action execution to see the values for each output variable that was generated by the action in execution\-time\. For reference information about variables, an example workflow, and a list of actions that generate output variables, see [Variables](reference-variables.md)\. **Topics** + [Configure actions for variables](#actions-variables-create) + [View output variables](#actions-variables-view) + [Example: Use variables in manual approvals](#actions-variables-examples-approvals) + [Example: Use a BranchName variable with CodeBuild environment variables](#actions-variables-examples-env-branchname)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-variables.md
337cebece500-0
When you add an action to your pipeline, you can assign it a namespace and configure it to consume variables from previous actions\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-variables.md
dfd4ec650c7e-0
This example creates a pipeline with a CodeCommit source action and a CodeBuild build action\. The CodeBuild action is configured to consume the variables produced by the CodeCommit action\. If the namespace isn’t specified, the variables are not available for reference in the action configuration\. When you use the console to create a pipeline, the namespace for each action is generated automatically\. **To create a pipeline with variables** 1. Sign in to the AWS Management Console and open the CodePipeline console at [http://console\.aws\.amazon\.com/codesuite/codepipeline/home](http://console.aws.amazon.com/codesuite/codepipeline/home)\. 1. Choose **Create pipeline**\. Enter a name for your pipeline, and then choose **Next**\. 1. In **Source**, in **Provider**, choose **CodeCommit**\. Choose the CodeCommit repository and branch for the source action, and then choose **Next**\. 1. In **Build**, in **Provider**, choose **CodeBuild**\. Choose an existing CodeBuild build project name or choose **Create project**\. On **Create build project**, create a build project, and then choose **Return to CodePipeline**\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-variables.md
dfd4ec650c7e-1
Under **Environment variables**, choose **Add environment variables**\. In this example, enter the execution ID with the variable syntax `#{codepipeline.PipelineExecutionId}` and commit ID with the variable syntax `#{SourceVariables.CommitId}`\. ![\[Example: Variables for multiple actions\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/variables-codebuild-wizard.png)![\[Example: Variables for multiple actions\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Example: Variables for multiple actions\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/) **Note** You can enter variable syntax in any action configuration field in the wizard\. 1. Choose **Create**\. 1. After the pipeline is created, you can view the namespace that was created by the wizard\. On the pipeline, choose the help pane icon for the stage you want to view the namespace for\. In this example, the source action's auto\-generated namespace, `SourceVariables`, is displayed\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-variables.md
dfd4ec650c7e-2
![\[Example: Action Info Screen\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/variables-popup-namespace.png)![\[Example: Action Info Screen\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Example: Action Info Screen\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/) **To edit the namespace for an existing action** 1. Sign in to the AWS Management Console and open the CodePipeline console at [http://console\.aws\.amazon\.com/codesuite/codepipeline/home](http://console.aws.amazon.com/codesuite/codepipeline/home)\. 1. Choose the pipeline you want to edit, and then choose **Edit**\. For the source stage, choose **Edit stage**\. Add the CodeCommit action\. 1. On **Edit action**, view the **Variable namespace** field\. If the existing action was created previously or without using the wizard, you must add a namespace\. In **Variable namespace**, enter a namespace name, and then choose **Save**\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-variables.md
dfd4ec650c7e-3
![\[Example: Namespace in the Edit action screen\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/variables-namespace-editaction.png)![\[Example: Namespace in the Edit action screen\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Example: Namespace in the Edit action screen\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/) **To view output variables** 1. Sign in to the AWS Management Console and open the CodePipeline console at [http://console\.aws\.amazon\.com/codesuite/codepipeline/home](http://console.aws.amazon.com/codesuite/codepipeline/home)\. 1. After the pipeline is created and runs successfully, you can view the variables on the **Action execution details** page\. For information, see [View variables \(console\)](#actions-variables-view-console)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-variables.md
2480d9631eca-0
When you use the create\-pipeline command to create a pipeline or the update\-pipeline command to edit a pipeline, you can reference/use variables in the configuration of an action\. If the namespace isn't specified, the variables produced by the action are not available to be referenced in any downstream action configuration\. **To configure an action with a namespace** 1. Follow the steps in [Create a pipeline in CodePipeline](pipelines-create.md) to create a pipeline using the CLI\. Start an input file to provide the create\-pipeline command with the `--cli-input-json` parameter\. In the pipeline structure, add the `namespace` parameter and specify a name, such as `SourceVariables`\. ``` . . . { "inputArtifacts": [], "name": "Source", "region": "us-west-2", "namespace": "SourceVariables", "actionTypeId": { "category": "Source", "owner": "AWS", "version": "1", "provider": "CodeCommit" }, "outputArtifacts": [ . . . ``` 1. Save the file with a name like **MyPipeline\.json**\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-variables.md
2480d9631eca-1
. . . ``` 1. Save the file with a name like **MyPipeline\.json**\. 1. At a terminal \(Linux, macOS, or Unix\) or command prompt \(Windows\), run the [https://docs.aws.amazon.com/cli/latest/reference/codepipeline/get-pipeline-state.html](https://docs.aws.amazon.com/cli/latest/reference/codepipeline/get-pipeline-state.html) command and create the pipeline\. Call the file you created when you run the [https://docs.aws.amazon.com/cli/latest/reference/codepipeline/retry-stage-execution.html](https://docs.aws.amazon.com/cli/latest/reference/codepipeline/retry-stage-execution.html) command\. For example: ``` aws codepipeline create-pipeline --cli-input-json file://MyPipeline.json ``` **To configure downstream actions to consume variables**
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-variables.md
2480d9631eca-2
``` **To configure downstream actions to consume variables** 1. Edit an input file to provide the update\-pipeline command with the `--cli-input-json` parameter\. In the downstream action, add the variable to the configuration for that action\. A variable is made up of a namespace and key, separated by a period\. For example, to add variables for the pipeline execution ID and the source commit ID, specify the namespace `codepipeline` for the variable `#{codepipeline.PipelineExecutionId}`\. Specify the namespace `SourceVariables` for the variable `#{SourceVariables.CommitId}`\. ``` { "name": "Build", "actions": [ { "outputArtifacts": [ { "name": "BuildArtifacts" } ], "name": "Build", "configuration": { "EnvironmentVariables": "[{\"name\":\"Execution_ID\",\"value\":\"#{codepipeline.PipelineExecutionId}\",\"type\":\"PLAINTEXT\"},{\"name\":\"Commit_ID\",\"value\":\"#{SourceVariables.CommitId}\",\"type\":\"PLAINTEXT\"}]", "ProjectName": "env-var-test"
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-variables.md
2480d9631eca-3
"ProjectName": "env-var-test" }, "inputArtifacts": [ { "name": "SourceArtifact" } ], "region": "us-west-2", "actionTypeId": { "provider": "CodeBuild", "category": "Build", "version": "1", "owner": "AWS" }, "runOrder": 1 } ] }, ``` 1. Save the file with a name like **MyPipeline\.json**\. 1. At a terminal \(Linux, macOS, or Unix\) or command prompt \(Windows\), run the [https://docs.aws.amazon.com/cli/latest/reference/codepipeline/get-pipeline-state.html](https://docs.aws.amazon.com/cli/latest/reference/codepipeline/get-pipeline-state.html) command and create the pipeline\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-variables.md
2480d9631eca-4
Call the file you created when you run the [https://docs.aws.amazon.com/cli/latest/reference/codepipeline/retry-stage-execution.html](https://docs.aws.amazon.com/cli/latest/reference/codepipeline/retry-stage-execution.html) command\. For example: ``` aws codepipeline create-pipeline --cli-input-json file://MyPipeline.json ```
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-variables.md
f181d38545b3-0
You can view the action execution details to view the variables for that action, specific to each execution\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-variables.md
5e539f8a4501-0
You can use the console to view variables for an action\. **** 1. Sign in to the AWS Management Console and open the CodePipeline console at [http://console\.aws\.amazon\.com/codesuite/codepipeline/home](http://console.aws.amazon.com/codesuite/codepipeline/home)\. The names of all pipelines associated with your AWS account are displayed\. 1. In **Name**, choose the name of the pipeline\. 1. Choose **View history**\. 1. After the pipeline runs successfully, you can view the variables produced by the source action\. Choose **View history**\. Choose **Source** in the action list for the pipeline execution to view the action execution details for the CodeCommit action\. On the action detail screen, view the variables under **Output variables**\. ![\[Example: Source output variables\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/variables-output.png)![\[Example: Source output variables\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Example: Source output variables\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-variables.md
5e539f8a4501-1
1. After the pipeline runs successfully, you can view the variables consumed by the build action\. Choose **View history**\. In the action list for the pipeline execution, choose **Build** to view the action execution details for the CodeBuild action\. On the action detail page, view the variables under **Action configuration**\. The auto\-generated namespace is displayed\. ![\[Example: Action Configuration Variables\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/variables-actionconfig-codebuild.png)![\[Example: Action Configuration Variables\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Example: Action Configuration Variables\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/) By default, **Action configuration** displays the variable syntax\. You can choose **Show resolved configuration** to toggle the list to display the values that were produced during the action execution\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-variables.md
5e539f8a4501-2
![\[Example: Resolved Action Configuration Variables\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/variables-actionconfig-codebuild-resolved.png)![\[Example: Resolved Action Configuration Variables\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Example: Resolved Action Configuration Variables\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-variables.md
b59e2cf7bdce-0
You can use the list\-action\-executions command to view variables for an action\. 1. Use the following command: ``` aws codepipeline list-action-executions ``` The output shows the `outputVariables` parameter as shown here\. ``` "outputVariables": { "BranchName": "master", "CommitMessage": "Updated files for test", "AuthorDate": "2019-11-08T22:24:34Z", "CommitId": "d99b0083cc10EXAMPLE", "CommitterDate": "2019-11-08T22:24:34Z", "RepositoryName": "variables-repo" }, ``` 1. Use the following command: ``` aws codepipeline get-pipeline --name <pipeline-name> ``` In the action configuration for the CodeBuild action, you can view the variables: ``` { "name": "Build", "actions": [ { "outputArtifacts": [ { "name": "BuildArtifact" } ], "name": "Build",
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-variables.md
b59e2cf7bdce-1
{ "name": "BuildArtifact" } ], "name": "Build", "configuration": { "EnvironmentVariables": "[{\"name\":\"Execution_ID\",\"value\":\"#{codepipeline.PipelineExecutionId}\",\"type\":\"PLAINTEXT\"},{\"name\":\"Commit_ID\",\"value\":\"#{SourceVariables.CommitId}\",\"type\":\"PLAINTEXT\"}]", "ProjectName": "env-var-test" }, "inputArtifacts": [ { "name": "SourceArtifact" } ], "region": "us-west-2", "actionTypeId": { "provider": "CodeBuild", "category": "Build", "version": "1", "owner": "AWS" }, "runOrder": 1 } ] }, ```
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-variables.md
68a1f2fff830-0
When you specify a namespace for an action, and that action produces output variables, you can add a manual approval that displays variables in the approval message\. This example shows you how to add variable syntax to a manual approval message\. **** 1. Sign in to the AWS Management Console and open the CodePipeline console at [http://console\.aws\.amazon\.com/codesuite/codepipeline/home](http://console.aws.amazon.com/codesuite/codepipeline/home)\. The names of all pipelines associated with your AWS account are displayed\. Choose the pipeline you want to add the approval to\. 1. To edit your pipeline, choose **Edit**\. Add a manual approval after the source action\. In **Action name**, enter the name of the approval action\. 1. In **Action provider**, choose **Manual approval**\. 1. In **URL for review** and **Comments**, add the variable syntax for `CommitId` and `CommitMessage` as shown\. Make sure you use the namespace assigned to your source action\. For example, the variable syntax for a CodeCommit action with the default namespace `SourceVariables` is `#{SourceVariables.CommitId}`\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-variables.md
68a1f2fff830-1
![\[Image NOT FOUND\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/variable-manual-approval.png)![\[Image NOT FOUND\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Image NOT FOUND\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/) 1. After the pipeline runs successfully, you can view the variable values in the approval message\. ![\[Image NOT FOUND\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/variable-manual-approval-commitURL.png)![\[Image NOT FOUND\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Image NOT FOUND\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-variables.md
854a55b9d316-0
When you add a CodeBuild action to your pipeline, you can use CodeBuild environment variables to reference a `BranchName` output variable from an upstream source action\. With an output variable from an action in CodePipeline, you can create your own CodeBuild environment variables for use in your build commands\. This example shows you how to add output variable syntax from a GitHub source action to a CodeBuild environment variable\. The output variable syntax in this example represents the GitHub source action output variable for `BranchName`\. After the action runs successfully, the variable resolves to show the GitHub branch name\. 1. Sign in to the AWS Management Console and open the CodePipeline console at [http://console\.aws\.amazon\.com/codesuite/codepipeline/home](http://console.aws.amazon.com/codesuite/codepipeline/home)\. The names of all pipelines associated with your AWS account are displayed\. Choose the pipeline you want to add the approval to\. 1. To edit your pipeline, choose **Edit**\. On the stage that contains your CodeBuild action, choose **Edit stage**\. 1. Choose the icon to edit your CodeBuild action\. 1. On the **Edit action** page, under **Environment variables**, enter the following: + In **Name**, enter a name for your environment variable\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-variables.md
854a55b9d316-1
+ In **Name**, enter a name for your environment variable\. + In **Value**, enter the variable syntax for your pipeline output variable, which includes the namespace assigned to your source action\. For example, the output variable syntax for a GitHub action with the default namespace `SourceVariables` is `#{SourceVariables.BranchName}`\. + In **Type**, choose **Plaintext**\. 1. After the pipeline runs successfully, you can see how the resolved output variable is the value in the environment variable\. Choose one of the following: + **CodePipeline console:** Choose your pipeline, and then choose **History**\. Choose the most recent pipeline execution\. + Under **Timeline**, choose the selector for **Source**\. This is the source action that generates GitHub output variables\. Choose **View execution details**\. Under **Output variables**, view the list of output variables generated by this action\. + Under **Timeline**, choose the selector for **Build**\. This is the build action that specifies the CodeBuild environment variables for your build project\. Choose **View execution details**\. Under **Action configuration**, view your CodeBuild environment variables\. Choose **Show resolved configuration**\. Your environment variable value is the resolved `BranchName` output variable from the GitHub source action\. In this example, the resolved value is `master`\. For information, see [View variables \(console\)](#actions-variables-view-console)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/actions-variables.md