id
stringlengths
14
16
text
stringlengths
1
2.43k
source
stringlengths
99
229
4c224de07d85-1
**To set up a local repository** In this step, you set up a local repository to connect to your remote CodeCommit repository\. 1. With your new repository open in the console, choose **Clone URL** on the top right of the page, and then choose **Clone SSH**\. The address to clone your Git repository is copied to your clipboard\. 1. In your terminal or command line, navigate to a local directory where you'd like your local repository to be stored\. In this tutorial, we use `/tmp`\. 1. Run the following command to clone the repository, replacing the SSH address with the one you copied in the previous step\. This command creates a directory called `MyDemoRepo`\. You copy a sample application to this directory\. ``` git clone ssh://git-codecommit.us-west-2.amazonaws.com/v1/repos/MyDemoRepo ```
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-simple-codecommit.md
e2ab3801b06e-0
In this step, you download code for a sample application that was created for a CodeDeploy sample walkthrough, and add it to your CodeCommit repository\. 1. Download the following file: [SampleApp\_Linux\.zip](samples/SampleApp_Linux.zip) 1. Unzip the files from [SampleApp\_Linux\.zip](samples/SampleApp_Linux.zip) into the local directory you created earlier \(for example, `/tmp/MyDemoRepo` or `c:\temp\MyDemoRepo`\)\. Be sure to place the files directly into your local repository\. Do not include a `SampleApp_Linux` folder\. On your local Linux, macOS, or Unix machine, for example, your directory and file hierarchy should look like this: ``` /tmp └-- MyDemoRepo │-- appspec.yml │-- index.html │-- LICENSE.txt └-- scripts │-- install_dependencies │-- start_server └-- stop_server ``` 1. Change directories to your local repo: ``` (For Linux, macOS, or Unix) cd /tmp/MyDemoRepo (For Windows) cd c:\temp\MyDemoRepo ``` 1. Run the following command to stage all of your files at once: ```
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-simple-codecommit.md
e2ab3801b06e-1
``` 1. Run the following command to stage all of your files at once: ``` git add -A ``` 1. Run the following command to commit the files with a commit message: ``` git commit -m "Add sample application files" ``` 1. Run the following command to push the files from your local repo to your CodeCommit repository: ``` git push ``` 1. The files you downloaded and added to your local repo have now been added to the `master` branch in your CodeCommit `MyDemoRepo` repository and are ready to be included in a pipeline\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-simple-codecommit.md
6ade31c88c24-0
In this step, you create the EC2 instance where you deploy a sample application\. As part of this process, you install the CodeDeploy agent on the EC2 instance\. The CodeDeploy agent is a software package that enables an instance to be used in CodeDeploy deployments\. You also attach an IAM role to the instance \(known as an *instance role*\) to allow it to fetch files that the CodeDeploy agent uses to deploy your application\. **To create an instance role** 1. Open the IAM console at [https://console\.aws\.amazon\.com/iam/](https://console.aws.amazon.com/iam/)\)\. 1. From the console dashboard, choose **Roles**\. 1. Choose **Create role**\. 1. Under **Select type of trusted entity**, select **AWS service**\. Under **Choose a use case**, select **EC2**, and then choose **Next: Permissions**\. 1. Search for and select the policy named **AmazonEC2RoleforAWSCodeDeploy**, and then choose **Next: Tags**\. 1. Choose **Next: Review**\. Enter a name for the role \(for example, **EC2InstanceRole**\)\. **Note** Make a note of your role name for the next step\. You choose this role when you are creating your instance\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-simple-codecommit.md
6ade31c88c24-1
**Note** Make a note of your role name for the next step\. You choose this role when you are creating your instance\. Choose **Create role**\. **To launch an instance** 1. Open the Amazon EC2 console at [https://console\.aws\.amazon\.com/ec2/](https://console.aws.amazon.com/ec2/)\. 1. From the console dashboard, choose **Launch instance**, and select **Launch instance** from the options that pop up\. 1. On **Step 1: Choose an Amazon Machine Image \(AMI\)**, locate **Amazon Linux 2 AMI \(HVM\), SSD Volume Type**, and then choose **Select**\. \(This AMI is labeled "Free tier eligible" and can be found at the top of the list\.\) 1. On the **Step 2: Choose an Instance Type** page, choose the free tier eligible `t2.micro` type as the hardware configuration for your instance, and then choose **Next: Configure Instance Details**\. 1. On the **Step 3: Configure Instance Details** page, do the following: + In **Number of instances**, enter `1`\. + In **Auto\-assign Public IP**, choose **Enable**\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-simple-codecommit.md
6ade31c88c24-2
+ In **Auto\-assign Public IP**, choose **Enable**\. + In **IAM role**, choose the IAM role you created in the previous procedure \(for example, **EC2InstanceRole**\)\. + Expand **Advanced Details**, and in the **User data** field, enter the following: ``` #!/bin/bash yum -y update yum install -y ruby yum install -y aws-cli cd /home/ec2-user aws s3 cp s3://aws-codedeploy-us-east-2/latest/install . --region us-east-2 chmod +x ./install ./install auto ``` **Note** For an example that runs these commands with elevated privileges \(sudo commands\), see the CodeDeploy agent reference in [Install or reinstall the CodeDeploy agent for Amazon Linux or RHEL](https://docs.aws.amazon.com/codedeploy/latest/userguide/codedeploy-agent-operations-install-linux.html) in the *AWS CodeDeploy User Guide*\. This code installs the CodeDeploy agent on your instance as it is created\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-simple-codecommit.md
6ade31c88c24-3
This code installs the CodeDeploy agent on your instance as it is created\. + Leave the rest of the items on the **Step 3: Configure Instance Details** page unchanged\. Choose **Next: Add Storage**\. 1. Leave the **Step 4: Add Storage** page unchanged, and then choose **Next: Add Tags**\. 1. Choose **Add Tag**\. In **Key**, enter **Name**, and in **Value**, enter **MyCodePipelineDemo**\. Choose **Next: Configure Security Group**\. Later, you create a CodeDeploy application that deploys the sample application to this instance\. CodeDeploy selects instances to deploy based on the tags that are attached to instances\. 1. On the **Step 6: Configure Security Group** page, do the following: + Next to **Assign a security group**, choose **Create a new security group**\. + In the row for **SSH**, under **Source**, choose **My IP**\. + Choose **Add Rule**, choose **HTTP**, and then under **Source**, choose **My IP**\. 1. Choose **Review and Launch**\. 1. On the **Review Instance Launch** page, choose **Launch**\. When prompted for a key pair, choose **Proceed without a key pair**\. **Note**
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-simple-codecommit.md
6ade31c88c24-4
**Note** For the purposes of this tutorial, you can proceed without a key pair\. To use SSH to connect to your instances, create or use a key pair\. When you are ready, select the acknowledgment check box, and then choose **Launch Instances**\. 1. Choose **View Instances** to close the confirmation page and return to the console\. 1. You can view the status of the launch on the **Instances** page\. When you launch an instance, its initial state is `pending`\. After the instance starts, its state changes to `running`, and it receives a public DNS name\. \(If the **Public DNS** column is not displayed, choose the **Show/Hide** icon, and then select **Public DNS**\.\) 1. It can take a few minutes for the instance to be ready for you to connect to it\. View the information in the **Status Checks** column to see if your instance has passed its status checks\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-simple-codecommit.md
cee31d5fcd2e-0
In CodeDeploy, an [https://docs.aws.amazon.com/codedeploy/latest/userguide/applications.html](https://docs.aws.amazon.com/codedeploy/latest/userguide/applications.html) is a resource that contains the software application you want to deploy\. Later, you use this application with CodePipeline to automate deployments of the sample application to your Amazon EC2 instance\. First, you create a role that allows CodeDeploy to perform deployments\. Then, you create a CodeDeploy application\. **To create a CodeDeploy service role** 1. Open the IAM console at [https://console\.aws\.amazon\.com/iam/](https://console.aws.amazon.com/iam/)\)\. 1. From the console dashboard, choose **Roles**\. 1. Choose **Create role**\. 1. Under **Select type of trusted entity**, select **AWS service**\. Under **Choose a use case**, select **CodeDeploy**, and then choose **Next: Permissions**\. The `AWSCodeDeployRole` managed policy is already attached to the role\. 1. Choose **Next: Tags**, and **Next: Review**\. 1. Enter a name for the role \(for example, **CodeDeployRole**\), and then choose **Create role**\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-simple-codecommit.md
cee31d5fcd2e-1
1. Enter a name for the role \(for example, **CodeDeployRole**\), and then choose **Create role**\. **To create an application in CodeDeploy** 1. Open the CodeDeploy console at [https://console\.aws\.amazon\.com/codedeploy](https://console.aws.amazon.com/codedeploy)\. 1. If the **Applications** page does not appear, on the AWS CodeDeploy menu, choose **Applications**\. 1. Choose **Create application**\. 1. In **Application name**, enter **MyDemoApplication**\. 1. In **Compute Platform**, choose **EC2/On\-premises**\. 1. Choose **Create application**\. **To create a deployment group in CodeDeploy** A [https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-groups.html](https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-groups.html) is a resource that defines deployment\-related settings like which instances to deploy to and how fast to deploy them\. 1. On the page that displays your application, choose **Create deployment group**\. 1. In **Deployment group name**, enter **MyDemoDeploymentGroup**\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-simple-codecommit.md
cee31d5fcd2e-2
1. In **Deployment group name**, enter **MyDemoDeploymentGroup**\. 1. In **Service Role**, choose the service role you created earlier \(for example, **CodeDeployRole**\)\. 1. Under **Deployment type**, choose **In\-place**\. 1. Under **Environment configuration**, choose **Amazon EC2 Instances**\. In the **Key** field, enter the name you used to tag the instance \(for example, **MyCodePipelineDemo**\)\. 1. Under **Deployment configuration**, choose `CodeDeployDefault.OneAtaTime`\. 1. Under **Load Balancer**, clear **Enable load balancing**\. You do not need to set up a load balancer or choose a target group for this example\. 1. Expand the **Advanced** section\. Under **Alarms**, if any alarms are listed, choose **Ignore alarm configuration**\. 1. Choose **Create deployment group**\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-simple-codecommit.md
6986674ce3db-0
You're now ready to create and run your first pipeline\. In this step, you create a pipeline that runs automatically when code is pushed to your CodeCommit repository\. **To create a CodePipeline 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)\. Open the CodePipeline console at [https://console\.aws\.amazon\.com/codepipeline/](https://console.aws.amazon.com/codepipeline/)\. 1. Choose **Create pipeline**\. 1. In **Step 1: Choose pipeline settings**, in **Pipeline name**, enter **MyFirstPipeline**\. 1. In **Service role**, choose **New service role** to allow CodePipeline to create a service role in IAM\. 1. Leave the settings under **Advanced settings** at their defaults, and then choose **Next**\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-simple-codecommit.md
6986674ce3db-1
1. Leave the settings under **Advanced settings** at their defaults, and then choose **Next**\. 1. In **Step 2: Add source stage**, in **Source provider**, choose **AWS CodeCommit**\. In **Repository name**, choose the name of the CodeCommit repository you created in [Step 1: Create a CodeCommit repository](#codecommit-create-repository)\. In **Branch name**, choose `master`, and then choose **Next step**\. ![\[The Step 2: Source page in the CodePipeline pipeline wizard\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/codepipeline-wizard-source-codecommit-pol.png)![\[The Step 2: Source page in the CodePipeline pipeline wizard\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[The Step 2: Source page in the CodePipeline pipeline wizard\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/) After you select the repository name and branch, a message displays the Amazon CloudWatch Events rule to be created for this pipeline\. Under **Change detection options**, leave the defaults\. This allows CodePipeline to use Amazon CloudWatch Events to detect changes in your source repository\. Choose **Next**\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-simple-codecommit.md
6986674ce3db-2
Choose **Next**\. 1. In **Step 3: Add build stage**, choose **Skip build stage**, and then accept the warning message by choosing **Skip** again\. Choose **Next**\. **Note** In this tutorial, you are deploying code that requires no build service, so you can skip this step\. However, if your source code needs to be built before it is deployed to instances, you can configure [CodeBuild](http://aws.amazon.com/codebuild/) in this step\. 1. In **Step 4: Add deploy stage**, in **Deploy provider**, choose **AWS CodeDeploy**\. In **Application name**, choose **MyDemoApplication**\. In **Deployment group**, choose **MyDemoDeploymentGroup**, and then choose **Next step**\. ![\[The Step 4: Deploy page in the CodePipeline pipeline wizard\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/codepipeline-wizard-deploy-pol.png)![\[The Step 4: Deploy page in the CodePipeline pipeline wizard\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[The Step 4: Deploy page in the CodePipeline pipeline wizard\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-simple-codecommit.md
6986674ce3db-3
1. In **Step 5: Review**, review the information, and then choose **Create pipeline**\. 1. The pipeline starts running after it is created\. It downloads the code from your CodeCommit repository and creates a CodeDeploy deployment to your EC2 instance\. You can view progress and success and failure messages as the CodePipeline sample deploys the webpage to the Amazon EC2 instance in the CodeDeploy deployment\. ![\[A view of a pipeline starting to run in the CodePipeline console.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/codepipeline-firstpipeline-codecommit-pol.png)![\[A view of a pipeline starting to run in the CodePipeline console.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[A view of a pipeline starting to run in the CodePipeline console.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/) Congratulations\! You just created a simple pipeline in CodePipeline\. Next, you verify the results\. **To verify that your pipeline ran successfully** 1. View the initial progress of the pipeline\. The status of each stage changes from **No executions yet** to **In Progress**, and then to either **Succeeded** or **Failed**\. The pipeline should complete the first run within a few minutes\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-simple-codecommit.md
6986674ce3db-4
1. After **Succeeded** is displayed for the pipeline status, in the status area for the **Deploy** stage, choose **AWS CodeDeploy**\. This opens the CodeDeploy console\. If **Succeeded** is not displayed see [Troubleshooting CodePipeline](troubleshooting.md)\. 1. On the **Deployments** tab, choose the deployment ID\. On the page for the deployment, under **Deployment lifecycle events**, choose the instance ID\. This opens the EC2 console\. 1. On the **Description** tab, in **Public DNS**, copy the address \(for example, `ec2-192-0-2-1.us-west-2.compute.amazonaws.com`\), and then paste it into the address bar of your web browser\. This is the sample application you downloaded and pushed to your CodeCommit repository\. ![\[The sample webpage application that was pushed to your CodeCommit repository.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/codepipeline-demo-success-message-codedeploy.png)![\[The sample webpage application that was pushed to your CodeCommit repository.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[The sample webpage application that was pushed to your CodeCommit repository.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-simple-codecommit.md
6986674ce3db-5
For more information about stages, actions, and how pipelines work, see [CodePipeline concepts](concepts.md)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-simple-codecommit.md
183f18e004ed-0
Your pipeline is configured to run whenever code changes are made to your CodeCommit repository\. In this step, you make changes to the HTML file that is part of the sample CodeDeploy application in the CodeCommit repository\. When you push these changes, your pipeline runs again, and the changes you make are visible at the web address you accessed earlier\. 1. Change directories to your local repo: ``` (For Linux, macOS, or Unix) cd /tmp/MyDemoRepo (For Windows) cd c:\temp\MyDemoRepo ``` 1. Use a text editor to modify the `index.html` file: ``` (For Linux or Unix)gedit index.html (For OS X)open –e index.html (For Windows)notepad index.html ``` 1. Revise the contents of the `index.html` file to change the background color and some of the text on the webpage, and then save the file\. ``` <!DOCTYPE html> <html> <head> <title>Updated Sample Deployment</title> <style> body { color: #000000; background-color: #CCFFCC; font-family: Arial, sans-serif; font-size:14px; } h1 { font-size: 250%;
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-simple-codecommit.md
183f18e004ed-1
font-size:14px; } h1 { font-size: 250%; font-weight: normal; margin-bottom: 0; } h2 { font-size: 175%; font-weight: normal; margin-bottom: 0; } </style> </head> <body> <div align="center"><h1>Updated Sample Deployment</h1></div> <div align="center"><h2>This application was updated using CodePipeline, CodeCommit, and CodeDeploy.</h2></div> <div align="center"> <p>Learn more:</p> <p><a href="https://docs.aws.amazon.com/codepipeline/latest/userguide/">CodePipeline User Guide</a></p> <p><a href="https://docs.aws.amazon.com/codecommit/latest/userguide/">CodeCommit User Guide</a></p> <p><a href="https://docs.aws.amazon.com/codedeploy/latest/userguide/">CodeDeploy User Guide</a></p> </div> </body>
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-simple-codecommit.md
183f18e004ed-2
</div> </body> </html> ``` 1. Commit and push your changes to your CodeCommit repository by running the following commands, one at a time: ``` git commit -am "Updated sample application files" ``` ``` git push ``` **To verify your pipeline ran successfully** 1. View the initial progress of the pipeline\. The status of each stage changes from **No executions yet** to **In Progress**, and then to either **Succeeded** or **Failed**\. The running of the pipeline should be complete within a few minutes\. 1. After **Succeeded** is displayed for the action status, refresh the demo page you accessed earlier in your browser\. The updated webpage is displayed: ![\[The updated sample webpage application that was pushed to your CodeCommit repository.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/codepipeline-demo-success-message-codecommit.png)![\[The updated sample webpage application that was pushed to your CodeCommit repository.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[The updated sample webpage application that was pushed to your CodeCommit repository.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-simple-codecommit.md
faaf94df195c-0
You can use some of the resources you created in this tutorial for other tutorials in this guide\. For example, you can reuse the CodeDeploy application and deployment\. However, after you complete this and any other tutorials, you should delete the pipeline and the resources it uses so that you are not charged for the continued use of those resources\. First, delete the pipeline, then the CodeDeploy application and its associated Amazon EC2 instance, and finally, the CodeCommit repository\. **To clean up the resources used in this tutorial** 1. To clean up your CodePipeline resources, follow the instructions in [Delete a pipeline in AWS CodePipeline](pipelines-delete.md)\. 1. To clean up your CodeDeploy resources, follow the instructions in [Clean Up Deployment Walkthrough Resources](https://docs.aws.amazon.com/codedeploy/latest/userguide/tutorials-simple-s3alkthrough.html#tutorials-simple-s3alkthrough-clean-up)\. 1. To delete the CodeCommit repository, follow the instructions in [Delete a CodeCommit repository](https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-delete-repository.html)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-simple-codecommit.md
8645dc7a2f31-0
Learn more about how CodePipeline works: + For more information about stages, actions, and how pipelines work, see [CodePipeline concepts](concepts.md)\. + For information about the actions you can perform using CodePipeline, see [Integrations with CodePipeline action types](integrations-action-type.md)\. + Try this more advanced tutorial, [Tutorial: Create a four\-stage pipeline](tutorials-four-stage-pipeline.md)\. It creates a multi\-stage pipeline that includes a step that builds code before it's deployed\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-simple-codecommit.md
e8cea0b81183-0
After you set up a pipeline in AWS CodePipeline, you can set up a CloudWatch Events rule to send notifications whenever there are changes to the execution state of your pipelines, or in the stages or actions in your pipelines\. For more information on using CloudWatch Events to set up notifications for pipeline state changes, see [Detect and react to changes in pipeline state with Amazon CloudWatch Events](detect-state-changes-cloudwatch-events.md)\. In this tutorial, you configure a notification to send an email when a pipeline's state changes to FAILED\. This tutorial uses an input transformer method when creating the CloudWatch Events rule\. It transforms the message schema details to deliver the message in human\-readable text\. **Note** As you create the resources for this tutorial, such as the Amazon SNS notification and the CloudWatch Events rule, make sure the resources are created in the same AWS Region as your pipeline\. **Topics** + [Step 1: Set up an email notification using Amazon SNS](#create-filter-for-target) + [Step 2: Create a rule and add the SNS topic as the target](#create-notification-rule) + [Step 3: Clean up resources](#notifications-clean-up-resources)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-cloudwatch-sns-notifications.md
96be96fbbbf9-0
Amazon SNS coordinates use of topics to deliver messages to subscribing endpoints or clients\. Use Amazon SNS to create a notification topic and then subscribe to the topic using your email address\. The Amazon SNS topic will be added as a target to your CloudWatch Events rule\. For more information, see the [Amazon Simple Notification Service Developer Guide](https://docs.aws.amazon.com/sns/latest/dg/) \. Create or identify a topic in Amazon SNS\. CodePipeline will use CloudWatch Events to send notifications to this topic through Amazon SNS\. To create a topic: 1. Open the Amazon SNS console at [https://console\.aws\.amazon\.com/sns](https://console.aws.amazon.com/sns)\. 1. Choose **Create topic**\. 1. In the **Create new topic** dialog box, for **Topic name**, type a name for the topic \(for example, **PipelineNotificationTopic**\)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-cloudwatch-sns-notifications.md
96be96fbbbf9-1
![\[Create the notification topic using Amazon SNS.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/tutorial-SNS-topic.png)![\[Create the notification topic using Amazon SNS.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Create the notification topic using Amazon SNS.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/) 1. Choose **Create topic**\. For more information, see [Create a Topic](https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html) in the *Amazon SNS Developer Guide*\. Subscribe one or more recipients to the topic to receive email notifications\. To subscribe a recipient to a topic: 1. In the Amazon SNS console, from the **Topics** list, select the check box next to your new topic\. Choose **Actions, Subscribe to topic**\. 1. In the **Create subscription** dialog box, verify that an ARN appears in **Topic ARN**\. 1. For **Protocol**, choose **Email**\. 1. For **Endpoint**, type the recipient's full email address\. Compare your results to the following:
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-cloudwatch-sns-notifications.md
96be96fbbbf9-2
1. For **Endpoint**, type the recipient's full email address\. Compare your results to the following: ![\[Complete the notification creation by subscribing to the topic.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/tutorial-SNS-subscription.png)![\[Complete the notification creation by subscribing to the topic.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[Complete the notification creation by subscribing to the topic.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/) 1. Choose **Create Subscription**\. 1. Amazon SNS sends a subscription confirmation email to the recipient\. To receive email notifications, the recipient must choose the **Confirm subscription** link in this email\. After the recipient clicks the link, if successfully subscribed, Amazon SNS displays a confirmation message in the recipient's web browser\. For more information, see [Subscribe to a Topic](https://docs.aws.amazon.com/sns/latest/dg/SubscribeTopic.html) in the *Amazon SNS Developer Guide*\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-cloudwatch-sns-notifications.md
350d6e533035-0
Create a CloudWatch Events notification rule with CodePipeline as the event source\. 1. Open the CloudWatch console at [https://console\.aws\.amazon\.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/)\. 1. In the navigation pane, choose **Events**\. 1. Choose **Create rule**\. Under **Event source**, choose **AWS CodePipeline**\. For **Event Type**, choose **Pipeline Execution State Change**\. 1. Choose **Specific state\(s\)**, and choose **FAILED**\. 1. Choose **Edit** to open the JSON editor for the **Event Pattern Preview** pane\. Add the **pipeline** parameter with the name of your pipeline as shown in the following example for a pipeline named "myPipeline\." ![\[A pipeline name can be edited manually in the JSON structure for the rule.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/cloudwatch-rule-event-pattern.png)![\[A pipeline name can be edited manually in the JSON structure for the rule.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[A pipeline name can be edited manually in the JSON structure for the rule.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-cloudwatch-sns-notifications.md
350d6e533035-1
You can copy the event pattern here and paste it into the console: ``` { "source": [ "aws.codepipeline" ], "detail-type": [ "CodePipeline Pipeline Execution State Change" ], "detail": { "state": [ "FAILED" ], "pipeline": [ "myPipeline" ] } } ``` 1. For **Targets**, choose **Add target**\. 1. In the list of targets, choose **SNS topic**\. For **Topic**, enter the topic you created\. 1. Expand **Configure input**, and then choose **Input Transformer**\. 1. In the **Input Path** box, type the following key\-value pairs\. ``` { "pipeline" : "$.detail.pipeline" } ``` In the **Input Template** box, type the following: ``` "The Pipeline <pipeline> has failed." ``` 1. Choose **Configure details**\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-cloudwatch-sns-notifications.md
350d6e533035-2
"The Pipeline <pipeline> has failed." ``` 1. Choose **Configure details**\. 1. On the **Configure rule details** page, type a name and an optional description\. For **State**, leave the **Enabled** box selected\. 1. Choose **Create rule**\. 1. Confirm that CodePipeline is now sending build notifications\. For example, check to see if the build notification emails are now in your inbox\. 1. To change a rule's behavior, in the CloudWatch console, choose the rule, and then choose **Actions**, **Edit**\. Edit the rule, choose **Configure details**, and then choose **Update rule**\. To stop using a rule to send build notifications, in the CloudWatch console, choose the rule, and then choose **Actions**, **Disable**\. To delete a rule, in the CloudWatch console, choose the rule, and then choose **Actions**, **Delete**\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-cloudwatch-sns-notifications.md
fc1737370b8f-0
After you complete this tutorial, you should delete the pipeline and the resources it uses so you will not be charged for continued use of those resources\. For information about how to clean up the SNS notification and delete the Amazon CloudWatch Events rule, see [Clean Up \(Unsubscribe from an Amazon SNS Topic\)](http://docs.aws.amazon.com/sns/latest/dg/CleanUp.html) and reference `DeleteRule` in the [Amazon CloudWatch Events API Reference](https://docs.aws.amazon.com/AmazonCloudWatchEvents/latest/APIReference/)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tutorials-cloudwatch-sns-notifications.md
0d70b82bf169-0
AWS CodePipeline now supports [Amazon Virtual Private Cloud \(Amazon VPC\)](https://aws.amazon.com/vpc/) endpoints powered by [AWS PrivateLink](https://aws.amazon.com/about-aws/whats-new/2017/11/introducing-aws-privatelink-for-aws-services/)\. This means you can connect directly to CodePipeline through a private endpoint in your VPC, keeping all traffic inside your VPC and the AWS network\. Amazon VPC is an AWS service that you can use to launch AWS resources in a virtual network that you define\. With a VPC, you have control over your network settings, such as: + IP address range + Subnets + Route tables + Network gateways *Interface VPC endpoints* are powered by AWS PrivateLink, an AWS technology that facilitates private communication between AWS services using an elastic network interface with private IP addresses\. To connect your VPC to CodePipeline, you define an interface VPC endpoint for CodePipeline\. This type of endpoint makes it possible for you to connect your VPC to AWS services\. The endpoint provides reliable, scalable connectivity to CodePipeline without requiring an internet gateway, network address translation \(NAT\) instance, or VPN connection\. For information about setting up a VPC, see the [VPC User Guide](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Introduction.html)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/vpc-support.md
bcf605ccc9b8-0
CodePipeline currently supports VPC endpoints in the following AWS Regions: + US East \(Ohio\) + US East \(N\. Virginia\) + US West \(N\. California\) + US West \(Oregon\) + Canada \(Central\) + Europe \(Stockholm\) + Europe \(Ireland\) + Europe \(London\) + Europe \(Paris\) + Europe \(Frankfurt\) + Asia Pacific \(Mumbai\) + Asia Pacific \(Tokyo\) + Asia Pacific \(Seoul\) + Asia Pacific \(Singapore\) + Asia Pacific \(Sydney\) + South America \(São Paulo\) + AWS GovCloud \(US\-West\)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/vpc-support.md
688c015e6266-0
You can use the Amazon VPC console to create the **com\.amazonaws\.*region*\.codepipeline** VPC endpoint\. In the console, *region* is the Region identifier for an AWS Region supported by CodePipeline, such as `us-east-2` for the US East \(Ohio\) Region\. For more information, see [Creating an Interface Endpoint](https://docs.aws.amazon.com/vpc/latest/userguide/vpce-interface.html#create-interface-endpoint) in the *Amazon VPC User Guide*\. The endpoint is prepopulated with the Region you specified when you signed in to AWS\. If you sign in to another Region, the VPC endpoint is updated with the new Region\. **Note** Other AWS services that provide VPC support and integrate with CodePipeline, such as CodeCommit, might not support using Amazon VPC endpoints for that integration\. For example, traffic between CodePipeline and CodeCommit cannot be restricted to the VPC subnet range\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/vpc-support.md
44581a58bcd8-0
When troubleshooting VPC issues, use the information that appears in internet connectivity error messages to help you identify, diagnose, and address issues\. 1. [Make sure that your internet gateway is attached to your VPC](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html#Add_IGW_Attach_Gateway)\. 1. [Make sure that the route table for your public subnet points to the internet gateway](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html#route-tables-internet-gateway)\. 1. [Make sure that your network ACLs allow traffic to flow](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_ACLs.html#ACLRules)\. 1. [Make sure that your security groups allow traffic to flow](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html#SecurityGroupRules)\. 1. [Troubleshoot your NAT gateway](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-troubleshooting)\. 1. [Make sure that the route table for private subnets points to the NAT gateway](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html#route-tables-nat)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/vpc-support.md
44581a58bcd8-1
1. Make sure that the service role used by CodePipeline has the appropriate permissions\. For example, if CodePipeline does not have the Amazon EC2 permissions required to work with an Amazon VPC, you might receive an error that says, "Unexpected EC2 error: UnauthorizedOperation\."
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/vpc-support.md
1683a971a5b6-0
By default, any pipeline you successfully create in AWS CodePipeline has a valid structure\. However, if you manually create or edit a JSON file to create a pipeline or update a pipeline from the AWS CLI, you might inadvertently create a structure that is not valid\. The following reference can help you better understand the requirements for your pipeline structure and how to troubleshoot issues\. See the constraints in [Quotas in AWS CodePipeline](limits.md), which apply to all pipelines\. **Topics** + [Valid action types and providers in CodePipeline](#actions-valid-providers) + [Pipeline and stage structure requirements in CodePipeline](#pipeline-requirements) + [Action structure requirements in CodePipeline](#action-requirements)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/reference-pipeline-structure.md
4cbe84b14c21-0
The pipeline structure format is used to build actions and stages in a pipeline\. An action type consists of an action category and provider type\. The following are the valid action categories in CodePipeline: + Source + Build + Test + Deploy + Approval + Invoke Each action category has a designated set of providers\. Each action provider, such as Amazon S3, has a provider name, such as `S3`, that must be used in the `Provider` field in the action category in your pipeline structure\. There are three valid values for the `Owner` field in the action category section in your pipeline structure: `AWS`, `ThirdParty`, and `Custom`\. To find the provider name and owner information for your action provider, see [Action structure reference](action-reference.md) or [Number of input and output artifacts for each action type](#reference-action-artifacts)\. This table lists valid providers by action type\. **Valid action providers by action type** [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html) Some action types in CodePipeline are available in select AWS Regions only\. It is possible that an action type is available in an AWS Region, but an AWS provider for that action type is not available\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/reference-pipeline-structure.md
4cbe84b14c21-1
For more information about each action provider, see [Integrations with CodePipeline action types](integrations-action-type.md)\. The following sections provide examples for provider information and configuration properties for each action type\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/reference-pipeline-structure.md
70e01b1d8aa6-0
A two\-stage pipeline has the following basic structure: ``` { "roleArn": "An IAM ARN for a service role, such as arn:aws:iam::80398EXAMPLE:role/AWS-CodePipeline-Service", "stages": [ { "name": "SourceStageName", "actions": [ ... See ... ] }, { "name": "NextStageName", "actions": [ ... See ... ] } ], "artifactStore": { "type": "S3", "location": "The name of the Amazon S3 bucket automatically generated for you the first time you create a pipeline using the console, such as codepipeline-us-east-2-1234567890, or any Amazon S3 bucket you provision for this purpose" }, "name": "YourPipelineName", "version": 1 } ``` The pipeline structure has the following requirements: + A pipeline must contain at least two stages\. + The first stage of a pipeline must contain at least one source action\. It can contain source actions only\. + Only the first stage of a pipeline can contain source actions\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/reference-pipeline-structure.md
70e01b1d8aa6-1
+ Only the first stage of a pipeline can contain source actions\. + At least one stage in each pipeline must contain an action that is not a source action\. + All stage names in a pipeline must be unique\. + Stage names cannot be edited in the CodePipeline console\. If you edit a stage name by using the AWS CLI, and the stage contains an action with one or more secret parameters \(such as an OAuth token\), the value of those secret parameters is not preserved\. You must manually enter the value of the parameters \(which are masked by four asterisks in the JSON returned by the AWS CLI\) and include them in the JSON structure\. + The `artifactStore` field contains the artifact bucket type and location for a pipeline with all actions in the same AWS Region\. If you add actions in a Region different from your pipeline, the `artifactStores` mapping is used to list the artifact bucket for each AWS Region where actions are executed\. When you create or edit a pipeline, you must have an artifact bucket in the pipeline Region and then you must have one artifact bucket per Region where you plan to execute an action\. The following example shows the basic structure for a pipeline with cross\-Region actions that uses the `artifactStores` parameter: ``` "pipeline": { "name": "YourPipelineName", "roleArn": "ServiceRoleARN", "artifactStores": { "us-east-1": { "type": "S3",
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/reference-pipeline-structure.md
70e01b1d8aa6-2
"artifactStores": { "us-east-1": { "type": "S3", "location": "S3 artifact bucket name, such as codepipeline-us-east-1-1234567890" }, "us-west-2": { "type": "S3", "location": "S3 artifact bucket name, such as codepipeline-us-west-2-1234567890" } }, "stages": [ { ... ``` + The pipeline metadata fields are distinct from the pipeline structure and cannot be edited\. When you update a pipeline, the date in the `updated` metadata field changes automatically\. + When you edit or update a pipeline, the pipeline name cannot be changed\. **Note** If you want to rename an existing pipeline, you can use the CLI `get-pipeline` command to build a JSON file that contains your pipeline's structure\. You can then use the CLI `create-pipeline` command to create a pipeline with that structure and give it a new name\. The version number of a pipeline is automatically generated and updated every time you update the pipeline\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/reference-pipeline-structure.md
0375d6881901-0
An action has the following high\-level structure: ``` [ { "inputArtifacts": [ An input artifact structure, if supported for the action category ], "name": "ActionName", "region": "Region", "namespace": "source_namespace", "actionTypeId": { "category": "An action category", "owner": "AWS", "version": "1" "provider": "A provider type for the action category", }, "outputArtifacts": [ An output artifact structure, if supported for the action category ], "configuration": { Configuration details appropriate to the provider type }, "runOrder": A positive integer that indicates the run order within the stage, } ] ``` For a list of example `configuration` details appropriate to the provider type, see [Configuration details by provider type](#structure-configuration-examples)\. The action structure has the following requirements: + All action names within a stage must be unique\. + The input artifact of an action must exactly match the output artifact declared in a preceding action\. For example, if a preceding action includes the following declaration: ``` "outputArtifacts": [
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/reference-pipeline-structure.md
0375d6881901-1
``` "outputArtifacts": [ { "MyApp" } ], ``` and there are no other output artifacts, then the input artifact of a following action must be: ``` "inputArtifacts": [ { "MyApp" } ], ``` This is true for all actions, whether they are in the same stage or in following stages, but the input artifact does not have to be the next action in strict sequence from the action that provided the output artifact\. Actions in parallel can declare different output artifact bundles, which are, in turn, consumed by different following actions\. The following illustration provides an example of input and output artifacts in actions in a pipeline: ![\[An example of input and output artifacts in actions in a pipeline.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/codepipeline-artifactsexplained.png)![\[An example of input and output artifacts in actions in a pipeline.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[An example of input and output artifacts in actions in a pipeline.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/reference-pipeline-structure.md
0375d6881901-2
+ Output artifact names must be unique in a pipeline\. For example, a pipeline can include one action that has an output artifact named `"MyApp"` and another action that has an output artifact named `"MyBuiltApp"`\. However, a pipeline cannot include two actions that both have an output artifact named `"MyApp"`\. + Cross\-Region actions use the `Region` field to designate the AWS Region where the actions are to be created\. The AWS resources created for this action must be created in the same Region provided in the `region` field\. You cannot create cross\-Region actions for the following action types: + Source actions + Actions by third\-party providers + Actions by custom providers + Actions can be configured with variables\. You use the `namespace` field to set the namespace and variable information for execution variables\. For reference information about execution variables and action output variables, see [Variables](reference-variables.md)\. + For all currently supported action types, the only valid version string is "1"\. + For all currently supported action types, the only valid owner string is "AWS", "ThirdParty", or "Custom"\. For more information, see the [CodePipeline API Reference](http://docs.aws.amazon.com/codepipeline/latest/APIReference)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/reference-pipeline-structure.md
0375d6881901-3
+ The default `runOrder` value for an action is 1\. The value must be a positive integer \(natural number\)\. You cannot use fractions, decimals, negative numbers, or zero\. To specify a serial sequence of actions, use the smallest number for the first action and larger numbers for each of the rest of the actions in sequence\. To specify parallel actions, use the same integer for each action you want to run in parallel\. In the console, you can specify a serial sequence for an action by choosing **Add action group** at the level in the stage where you want it to run, or you can specify a parallel sequence by choosing **Add action**\. *Action group* refers to a run order of one or more actions at the same level\. For example, if you want three actions to run in sequence in a stage, you would give the first action the `runOrder` value of 1, the second action the `runOrder` value of 2, and the third the `runOrder` value of 3\. However, if you want the second and third actions to run in parallel, you would give the first action the `runOrder` value of 1 and both the second and third actions the `runOrder` value of 2\. **Note** The numbering of serial actions do not have to be in strict sequence\. For example, if you have three actions in a sequence and decide to remove the second action, you do not need to renumber the `runOrder` value of the third action\. Because the `runOrder` value of that action \(3\) is higher than the `runOrder` value of the first action \(1\), it runs serially after the first action in the stage\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/reference-pipeline-structure.md
0375d6881901-4
+ When you use an Amazon S3 bucket as a deployment location, you also specify an object key\. An object key can be a file name \(object\) or a combination of a prefix \(folder path\) and file name\. You can use variables to specify the location name you want the pipeline to use\. Amazon S3 deployment actions support the use of the following variables in Amazon S3 object keys\. **Using variables in Amazon S3** [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html) + These are the valid `actionTypeId` categories for CodePipeline: + `Source` + `Build` + `Approval` + `Deploy` + `Test` + `Invoke` Some provider types and configuration options are provided here\. + Valid provider types for an action category depend on the category\. For example, for a source action type, a valid provider type is `S3`, `GitHub`, `CodeCommit`, or `Amazon ECR`\. This example shows the structure for a source action with an `S3` provider: ``` "actionTypeId": { "category": "Source", "owner": "AWS", "version": "1", "provider": "S3"}, ```
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/reference-pipeline-structure.md
0375d6881901-5
"version": "1", "provider": "S3"}, ``` + Every action must have a valid action configuration, which depends on the provider type for that action\. The following table lists the required action configuration elements for each valid provider type: **Action configuration properties for provider types** [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html) **Topics** + [Number of input and output artifacts for each action type](#reference-action-artifacts) + [Default settings for the PollForSourceChanges parameter](#PollForSourceChanges-defaults) + [Configuration details by provider type](#structure-configuration-examples)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/reference-pipeline-structure.md
14e9427ca3a0-0
Depending on the action type, you can have the following number of input and output artifacts: **Action type constraints for artifacts** | Owner | Type of action | Provider | Valid number of input artifacts | Valid number of output artifacts | | --- | --- | --- | --- | --- | | AWS | Source | Amazon S3 | 0 | 1 | | AWS | Source | CodeCommit | 0 | 1 | | AWS | Source | Amazon ECR | 0 | 1 | | ThirdParty | Source | GitHub | 0 | 1 | | AWS | Build | CodeBuild | 1 to 5 | 0 to 5 | | AWS | Test | CodeBuild | 1 to 5 | 0 to 5 | | AWS | Test | AWS Device Farm | 1 | 0 | | AWS | Approval | Manual | 0 | 0 | | AWS | Deploy | Amazon S3 | 1 | 0 | | AWS | Deploy | AWS CloudFormation | 0 to 10 | 0 to 1 | | AWS | Deploy | CodeDeploy | 1 | 0 | | AWS | Deploy | AWS Elastic Beanstalk | 1 | 0 | | AWS | Deploy | AWS OpsWorks Stacks | 1 | 0 | | AWS | Deploy | Amazon ECS | 1 | 0 | | AWS | Deploy | AWS Service Catalog | 1 | 0 | | AWS | Invoke | AWS Lambda | 0 to 5 | 0 to 5 |
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/reference-pipeline-structure.md
14e9427ca3a0-1
| AWS | Invoke | AWS Lambda | 0 to 5 | 0 to 5 | | ThirdParty | Deploy | Alexa Skills Kit | 1 to 2 | 0 | | Custom | Build | Jenkins | 0 to 5 | 0 to 5 | | Custom | Test | Jenkins | 0 to 5 | 0 to 5 | | Custom | Any supported category | As specified in the custom action | 0 to 5 | 0 to 5 |
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/reference-pipeline-structure.md
8474bfdecdda-0
The `PollForSourceChanges` parameter default is determined by the method used to create the pipeline, as described in the following table\. In many cases, the `PollForSourceChanges` parameter defaults to true and must be disabled\. When the `PollForSourceChanges` parameter defaults to true, you should do the following: + Add the `PollForSourceChanges` parameter to the JSON file or AWS CloudFormation template\. + Create change detection resources \(CloudWatch Events rule or webhook, as applicable\)\. + Set the `PollForSourceChanges` parameter to false\. **Note** If you create a CloudWatch Events rule or webhook, you must set the parameter to false to avoid triggering the pipeline more than once\. The `PollForSourceChanges` parameter is not used for Amazon ECR source actions\. + **PollForSourceChanges parameter defaults** [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/reference-pipeline-structure.md
6be48b0c3894-0
This section lists valid `configuration` parameters for each action provider\. The following example shows a valid configuration for a deploy action that uses AWS Service Catalog, for a pipeline that was created in the console without a separate configuration file: ``` "configuration": { "TemplateFilePath": "S3_template.json", "ProductVersionName": "devops S3 v2", "ProductType": "CLOUD_FORMATION_TEMPLATE", "ProductVersionDescription": "Product version description", "ProductId": "prod-example123456" } ``` The following example shows a valid configuration for a deploy action that uses AWS Service Catalog, for a pipeline that was created in the console with a separate `sample_config.json` configuration file: ``` "configuration": { "ConfigurationFilePath": "sample_config.json", "ProductId": "prod-example123456" } ``` The following example shows a valid configuration for a deploy action that uses Alexa Skills Kit: ``` "configuration": { "ClientId": "amzn1.application-oa2-client.aadEXAMPLE", "ClientSecret": "****", "RefreshToken": "****",
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/reference-pipeline-structure.md
6be48b0c3894-1
"ClientSecret": "****", "RefreshToken": "****", "SkillId": "amzn1.ask.skill.22649d8f-0451-4b4b-9ed9-bfb6cEXAMPLE" } ``` The following example shows a valid configuration for a deploy action that uses Amazon S3: ``` "configuration": { "BucketName": "website-bucket", "Extract": "true", "ObjectKey": "MyWebsite" } ``` The following example shows a valid configuration for a manual approval: ``` "configuration": { "CustomData": "Comments on the manual approval", "ExternalEntityLink": "http://my-url.com", "NotificationArn": "arn:aws:sns:us-west-2:12345EXAMPLE:Notification" } ```
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/reference-pipeline-structure.md
b9dd005dec56-0
As a managed service, AWS CodePipeline is protected by the AWS global network security procedures that are described in the [Amazon Web Services: Overview of Security Processes](https://d0.awsstatic.com/whitepapers/Security/AWS_Security_Whitepaper.pdf) whitepaper\. You use AWS published API calls to access CodePipeline through the network\. Clients must support Transport Layer Security \(TLS\) 1\.0 or later\. We recommend TLS 1\.2 or later\. Clients must also support cipher suites with perfect forward secrecy \(PFS\) such as Ephemeral Diffie\-Hellman \(DHE\) or Elliptic Curve Ephemeral Diffie\-Hellman \(ECDHE\)\. Most modern systems such as Java 7 and later support these modes\. Requests must be signed by using an access key ID and a secret access key that is associated with an IAM principal\. Or you can use the [AWS Security Token Service](https://docs.aws.amazon.com/STS/latest/APIReference/Welcome.html) \(AWS STS\) to generate temporary security credentials to sign requests\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/infrastructure-security.md
05f02367ca85-0
A webhook is an HTTP notification that detects events in another tool, such as a GitHub repository, and connects those external events to a pipeline\. When you use the console to create or edit a pipeline that has a GitHub source, CodePipeline creates a webhook\. CodePipeline deletes your webhook when you delete your pipeline\. You do not need to manage it in GitHub\. If you use the AWS CLI or AWS CloudFormation to create or edit a pipeline that has a GitHub source, you must use the information in these sections to manage webhooks yourself\. **Topics** + [Create a webhook for a GitHub source](pipelines-webhooks-create.md) + [List webhooks in your account](pipelines-webhooks-view.md) + [Edit the webhook for your GitHub source](pipelines-webhooks-update.title.md) + [Delete the webhook for your GitHub source](pipelines-webhooks-delete.md) + [Tag a webhook in CodePipeline](tag-webhooks.md) + [Create a webhook for a GitHub source \(AWS CloudFormation template\)](pipelines-webhooks-create-cfn.md)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/pipelines-webhooks.md
2dfe206d549a-0
Modeling and configuring your automated release process is easier if you understand the concepts and terms used in AWS CodePipeline\. Here are some concepts to know about as you use CodePipeline\. For an example of a DevOps pipeline, see [DevOps pipeline example](concepts-devops-example.md)\. **Topics** + [Pipeline terms](#concepts-pipeline-terms)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/concepts.md
ebf478f9c53b-0
The following terms are used in CodePipeline: + [Pipelines](#concepts-pipelines) + [Stages](#concepts-stages) + [Actions](#concepts-actions) + [Pipeline executions](#concepts-executions) + [Stopped executions](#concepts-executions-stopped) + [Failed executions](#concepts-failed) + [Superseded executions](#concepts-superseded) + [Stage executions](#concepts-stage-executions) + [Action executions](#concepts-action-executions) + [Transitions](#concepts-transitions) + [Artifacts](#concepts-artifacts) + [Source revisions](#concepts-source-revisions)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/concepts.md
60be1e7bdd2f-0
A *pipeline* is a workflow construct that describes how software changes go through a release process\. Each pipeline is made up of a series of *stages*\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/concepts.md
b603789b1555-0
A stage is a logical unit you can use to isolate an environment and to limit the number of concurrent changes in that environment\. Each stage contains actions that are performed on the application [artifacts](https://docs.aws.amazon.com/codepipeline/latest/userguide/concepts.html#concepts-artifacts)\. Your source code is an example of an artifact\. A stage might be a build stage, where the source code is built and tests are run\. It can also be a deployment stage, where code is
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/concepts.md
b603789b1555-1
also be a deployment stage, where code is deployed to runtime environments\. Each stage is made up of a series of serial or parallel *actions*\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/concepts.md
1773c1a9120b-0
An *action* is a set of operations performed on application code and configured so that the actions run in the pipeline at a specified point\. This can include things like a source action from a code change, an action for deploying the application to instances, and so on\. For example, a deployment stage might contain a deployment action that deploys code to a compute service like Amazon EC2 or AWS Lambda\. Valid CodePipeline action types are `source`, `build`, `test`, `deploy`, `approval`, and `invoke`\. For a list of action providers, see [Valid action types and providers in CodePipeline ](reference-pipeline-structure.md#actions-valid-providers)\. Actions can run in series or in parallel\. For information about serial and parallel actions in a stage, see the `runOrder` information in [action structure requirements](https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html#action-requirements)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/concepts.md
c33211a937be-0
An *execution* is a set of changes released by a pipeline\. Each pipeline execution is unique and has its own ID\. An execution corresponds to a set of changes, such as a merged commit or a manual release of the latest commit\. Two executions can release the same set of changes at different times\. While a pipeline can process multiple executions at the same time, a pipeline stage processes only one execution at a time\. To do this, a stage is locked while it processes an execution\. Two pipeline executions can't occupy the same stage at the same time\. Pipeline executions traverse pipeline stages in order\. Valid statuses for pipelines are `InProgress`, `Stopping`, `Stopped`, `Succeeded`, `Superseded`, and `Failed`\. An execution with a `Failed` or `Superseded` status does not continue through the pipeline and cannot be retried\. For more information, see [PipelineExecution](https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_PipelineExecution.html)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/concepts.md
b5a8bde0c72c-0
The pipeline execution can be stopped manually so that the in\-progress pipeline execution does not continue through the pipeline\. If stopped manually, a pipeline execution shows a `Stopping` status until it is completely stopped\. Then it shows a `Stopped` status\. A `Stopped` pipeline execution can be retried\. There are two ways to stop a pipeline execution: + **Stop and wait** + **Stop and abandon** For information about use cases for stopping an execution and sequence details for these options, see [How pipeline executions are stopped](concepts-how-it-works.md#concepts-how-it-works-stopping)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/concepts.md
02351537390a-0
If an execution fails, it stops and does not completely traverse the pipeline\. Its status is `FAILED` status and the stage is unlocked\. A more recent execution can catch up and enter the unlocked stage and lock it\. You can retry a failed execution unless the failed execution has been superseded or is not retryable\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/concepts.md
6d80f9790783-0
To deliver the latest set of changes through a pipeline, newer executions pass and replace less recent executions already running through the pipeline\. When this occurs, the older execution is superseded by the newer execution\. An execution can be superseded by a more recent execution at a certain point, which is the point between stages\. If an execution is waiting to enter a locked stage, a more recent execution might catch up and supersede it\. The newer execution now waits for the stage to unlock, and the superseded execution stops with a `SUPERSEDED` status\. When a pipeline execution is superseded, the execution is stopped and does not completely traverse the pipeline\. You can no longer retry the superseded execution after it has been replaced at this stage\. For more information about superseded executions and locked stages, see [How executions are processed in a pipeline ](concepts-how-it-works.md#concepts-how-it-works-executions)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/concepts.md
627e2d55f513-0
A *stage execution* is the process of completing all of the actions within a stage\. For information about how a stage execution works and information about locked stages, see [How executions are processed in a pipeline ](concepts-how-it-works.md#concepts-how-it-works-executions)\. Valid statuses for stages are `InProgress`, `Stopping`, `Stopped`, `Succeeded`, and `Failed`\. For more information, see [StageExecution](https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_StageExecution.html)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/concepts.md
b3ae99d4b9ea-0
An *action execution* is the process of completing a configured action that operates on designated [artifacts](https://docs.aws.amazon.com/codepipeline/latest/userguide/concepts.html#concepts-artifacts)\. These can be input artifacts, output artifacts, or both\. For example, a build action might run build commands on an input artifact, such as compiling application source code\. Action execution details include an action execution ID, the related pipeline execution source trigger, and the input and output artifacts for the action\. Valid statuses for actions are `InProgress`, `Abandoned`, `Succeeded`, or `Failed`\. For more information, see [ActionExecution](https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_ActionExecution.html)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/concepts.md
fe9a061456fa-0
A *transition* is the point where a pipeline execution moves to the next stage in the pipeline\. You can disable a stage's inbound transition to prevent executions from entering that stage, and then you can enable the transition to allow executions to continue\. When more than one execution arrives at a disabled transition, only the latest execution continues to the next stage when the transition is enabled\. This means that newer executions continue to supersede waiting executions while the transition is disabled, and then after the transition is enabled, the execution that continues is the superseding execution\. ![\[A pipeline contains stages, which contain actions, which are separated by transitions that can be disabled and enabled.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/images/pipeline-elements-workflow.png)![\[A pipeline contains stages, which contain actions, which are separated by transitions that can be disabled and enabled.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)![\[A pipeline contains stages, which contain actions, which are separated by transitions that can be disabled and enabled.\]](http://docs.aws.amazon.com/codepipeline/latest/userguide/)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/concepts.md
1c90e143b45f-0
*Artifacts* refers to the collection of data, such as application source code, built applications, dependencies, definitions files, templates, and so on, that is worked on by pipeline actions\. Artifacts are produced by some actions and consumed by others\. In a pipeline, artifacts can be the set of files worked on by an action \(*input artifacts*\) or the updated output of a completed action \(*output artifacts*\)\. Actions pass output to another action for further processing using the pipeline artifact bucket\. CodePipeline copies artifacts to the artifact store, where the action picks them up\. For more information about artifacts, see [Input and output artifacts](welcome-introducing-artifacts.md)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/concepts.md
0c9866753db8-0
When you make a source code change, a new version is created\. A *source revision* is the version of a source change that triggers a pipeline execution\. An execution processes that source revision only\. For GitHub and CodeCommit repositories, this is the commit\. For S3 buckets or actions, this is the object version\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/concepts.md
d78623110b17-0
This section is a reference only\. For information about creating a pipeline with event detection resources, see [ Change detection methods to start pipelines](pipelines-about-starting.md#change-detection-methods)\. Source actions provided by Amazon S3 and CodeCommit use event\-based change detection resources to trigger your pipeline when a change is made in the source bucket or repository\. These resources are the CloudWatch Events rules that are configured to respond to events in the pipeline source, such as a code change to the CodeCommit repository\. When you use CloudWatch Events for an Amazon S3 source, you must turn on CloudTrail so the events are logged\. CloudTrail requires an S3 bucket where it can send its digests\. You can access the log files for your CloudWatch Events resources from the placeholder bucket or from a bucket you designated\. + If you used the CLI or AWS CloudFormation to set up the CloudWatch Events resources, you can find your CloudTrail files in the bucket that you specified when you set up your pipeline\. + If you used the console to set up your pipeline with an S3 source, the console uses a CloudTrail placeholder bucket when it creates your CloudWatch Events resources for you\. CloudTrail digests are stored in the placeholder bucket in the AWS Region where the pipeline is created\. You can change the configuration if you want to use a bucket other than the placeholder bucket\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/reference-ct-placeholder-buckets.md
d78623110b17-1
You can change the configuration if you want to use a bucket other than the placeholder bucket\. For more information about finding and managing your CloudTrail log files, see [Getting and Viewing Your CloudTrail Log Files](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/get-and-view-cloudtrail-log-files.html)\. **Topics** + [Events placeholder bucket names by Region](#reference-ct-placeholder-buckets-list)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/reference-ct-placeholder-buckets.md
48c2bb33fb3b-0
This table lists the names of the S3 placeholder buckets that contain log files that track change detection events for pipelines with Amazon S3 source actions\. **** | Region name | Placeholder bucket name | Region identifier | | --- | --- | --- | | US East \(Ohio\) | codepipeline\-cloudtrail\-placeholder\-bucket\-us\-east\-2 | us\-east\-2 | | US East \(N\. Virginia\) | codepipeline\-cloudtrail\-placeholder\-bucket\-us\-east\-1 | us\-east\-1 | | US West \(N\. California\) | codepipeline\-cloudtrail\-placeholder\-bucket\-us\-west\-1 | us\-west\-1 | | US West \(Oregon\) | codepipeline\-cloudtrail\-placeholder\-bucket\-us\-west\-2 | us\-west\-2 | | Canada \(Central\) | codepipeline\-cloudtrail\-placeholder\-bucket\-ca\-central\-1 | ca\-central\-1 | | Europe \(Frankfurt\) | codepipeline\-cloudtrail\-placeholder\-bucket\-eu\-central\-1 | eu\-central\-1 |
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/reference-ct-placeholder-buckets.md
48c2bb33fb3b-1
| Europe \(Ireland\) | codepipeline\-cloudtrail\-placeholder\-bucket\-eu\-west\-1 | eu\-west\-1 | | Europe \(London\) | codepipeline\-cloudtrail\-placeholder\-bucket\-eu\-west\-2 | eu\-west\-2 | | Europe \(Paris\) | codepipeline\-cloudtrail\-placeholder\-bucket\-eu\-west\-3 | eu\-west\-3 | | Europe \(Stockholm\) | codepipeline\-cloudtrail\-placeholder\-bucket\-eu\-north\-1 | eu\-north\-1 | | Asia Pacific \(Tokyo\) | codepipeline\-cloudtrail\-placeholder\-bucket\-ap\-northeast\-1 | ap\-northeast\-1 | | Asia Pacific \(Seoul\) | codepipeline\-cloudtrail\-placeholder\-bucket\-ap\-northeast\-2 | ap\-northeast\-2 | | Asia Pacific \(Singapore\) | codepipeline\-cloudtrail\-placeholder\-bucket\-ap\-southeast\-1 | ap\-southeast\-1 | | Asia Pacific \(Sydney\) | codepipeline\-cloudtrail\-placeholder\-bucket\-ap\-southeast\-2 | ap\-southeast\-2 |
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/reference-ct-placeholder-buckets.md
48c2bb33fb3b-2
| Asia Pacific \(Mumbai\) | codepipeline\-cloudtrail\-placeholder\-bucket\-ap\-south\-1 | ap\-south\-1 | | South America \(São Paulo\) | codepipeline\-cloudtrail\-placeholder\-bucket\-sa\-east\-1 | sa\-east\-1 |
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/reference-ct-placeholder-buckets.md
f1e206894898-0
Allows you to execute a Lambda function as an action in your pipeline\. Using the event object that is an input to this function, the function has access to the action configuration, input artifact locations, output artifact locations, and other information required to access the artifacts\. For an example event passed to a Lambda invoke function, see [Example JSON event](#action-reference-Lambda-event)\. As part of the implementation of the Lambda function, there must be a call to
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-Lambda.md
f1e206894898-1
Lambda function, there must be a call to either the `[PutJobSuccessResult API](https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_PutJobSuccessResult.html)` or `[PutJobFailureResult API](https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_PutJobFailureResult.html)`\. Otherwise, the execution of this action hangs until the action times out\. If you specify output artifacts for the action, they must be uploaded to the S3 bucket as part of the function implementation\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-Lambda.md
074b7b2ba6c8-0
+ Category: `Invoke` + Owner: `AWS` + Provider: `Lambda` + Version: `1`
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-Lambda.md
3e9eefe888cb-0
**FunctionName** Required: Yes `FunctionName` is the name of the function created in Lambda\. **UserParameters** Required: No A string that can be processed as input by the Lambda function\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-Lambda.md
3f3f97915a2b-0
+ **Number of Artifacts:** `0 to 5` + **Description:** The set of artifacts to be made available to the Lambda function\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-Lambda.md
60f346635d2e-0
+ **Number of Artifacts:** `0 to 5` + **Description:** The set of artifacts produced as output by the Lambda function\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-Lambda.md
047c5c5a7b66-0
This action will produce as variables all key\-value pairs that are included in the `outputVariables` section of the [PutJobSuccessResult API](https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_PutJobSuccessResult.html) request\. For more information about variables in CodePipeline, see [Variables](reference-variables.md)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-Lambda.md
58f293523a3d-0
------
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-Lambda.md
786929f40e6d-0
``` Name: Lambda Actions: - Name: Lambda ActionTypeId: Category: Invoke Owner: AWS Provider: Lambda Version: '1' RunOrder: 1 Configuration: FunctionName: myLambdaFunction UserParameters: 'http://192.0.2.4' OutputArtifacts: [] InputArtifacts: [] Region: us-west-2 ``` ------
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-Lambda.md
1304ba7da57b-0
``` { "Name": "Lambda", "Actions": [ { "Name": "Lambda", "ActionTypeId": { "Category": "Invoke", "Owner": "AWS", "Provider": "Lambda", "Version": "1" }, "RunOrder": 1, "Configuration": { "FunctionName": "myLambdaFunction", "UserParameters": "http://192.0.2.4" }, "OutputArtifacts": [], "InputArtifacts": [], "Region": "us-west-2" } ] }, ``` ------
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-Lambda.md
2ef43543314f-0
The Lambda action sends a JSON event that contains the job ID, the pipeline action configuration, input and output artifact locations, and any encryption information for the artifacts\. The job worker accesses these details to complete the Lambda action\. For more information, see [job details](https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_JobDetails.html)\. The following is an example event\. ``` { "CodePipeline.job": { "id": "11111111-abcd-1111-abcd-111111abcdef", "accountId": "111111111111", "data": { "actionConfiguration": { "configuration": { "FunctionName": "MyLambdaFunction", "UserParameters": "input_parameter" } }, "inputArtifacts": [ { "location": { "s3Location": { "bucketName": "bucket_name", "objectKey": "filename" }, "type": "S3" }, "revision": null, "name": "ArtifactName" } ], "outputArtifacts": [],
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-Lambda.md
2ef43543314f-1
"name": "ArtifactName" } ], "outputArtifacts": [], "artifactCredentials": { "secretAccessKey": "secret_key", "sessionToken": "session_token", "accessKeyId": "access_key_ID" }, "continuationToken": "token_ID", "encryptionKey": { "id": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", "type": "KMS" } } } } ``` The JSON event provides the following job details for the Lambda action in CodePipeline: + `id`: The unique system\-generated ID of the job\. + `accountId`: The AWS account ID associated with the job\. + `data`: Other information required for a job worker to complete the job\. + `actionConfiguration`: The action parameters for the Lambda action\. For definitions, see [Configuration parameters ](#action-reference-Lambda-config)\. + `inputArtifacts`: The artifact supplied to the action\. + `location`: The artifact store location\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-Lambda.md
2ef43543314f-2
+ `inputArtifacts`: The artifact supplied to the action\. + `location`: The artifact store location\. + `s3Location`: The input artifact location information for the action\. + `bucketName`: The name of the pipeline artifact store for the action \(for example, an Amazon S3 bucket named codepipeline\-us\-east\-2\-1234567890\)\. + `objectKey`: The name of the application \(for example, `CodePipelineDemoApplication.zip`\)\. + `type`: The type of artifact in the location\. Currently, `S3` is the only valid artifact type\. + `revision`: The artifact's revision ID\. Depending on the type of object, this can be a commit ID \(GitHub\) or a revision ID \(Amazon Simple Storage Service\)\. For more information, see [ArtifactRevision](https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_ArtifactRevision.html)\. + `name`: The name of the artifact to be worked on, such as `MyApp`\. + `outputArtifacts`: The output of the action\. + `location`: The artifact store location\. + `s3Location`: The output artifact location information for the action\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-Lambda.md
2ef43543314f-3
+ `location`: The artifact store location\. + `s3Location`: The output artifact location information for the action\. + `bucketName`: The name of the pipeline artifact store for the action \(for example, an Amazon S3 bucket named codepipeline\-us\-east\-2\-1234567890\)\. + `objectKey`: The name of the application \(for example, `CodePipelineDemoApplication.zip`\)\. + `type`: The type of artifact in the location\. Currently, `S3` is the only valid artifact type\. + `revision`: The artifact's revision ID\. Depending on the type of object, this can be a commit ID \(GitHub\) or a revision ID \(Amazon Simple Storage Service\)\. For more information, see [ArtifactRevision](https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_ArtifactRevision.html)\. + `name`: The name of the output of an artifact, such as `MyApp`\. + `artifactCredentials`: The AWS session credentials used to access input and output artifacts in the Amazon S3 bucket\. These credentials are temporary credentials that are issued by AWS Security Token Service \(AWS STS\)\. + `secretAccessKey`: The secret access key for the session\. + `sessionToken`: The token for the session\. + `accessKeyId`: The secret access key for the session\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-Lambda.md
2ef43543314f-4
+ `sessionToken`: The token for the session\. + `accessKeyId`: The secret access key for the session\. + `continuationToken`: A token generated by the action\. Future actions use this token to identify the running instance of the action\. When the action is complete, no continuation token should be supplied\. + `encryptionKey`: The encryption key used to encrypt the data in the artifact store, such as an AWS KMS key\. If this is undefined, the default key for Amazon Simple Storage Service is used\. + `id`: The ID used to identify the key\. For an AWS KMS key, you can use the key ID, the key ARN, or the alias ARN\. + `type`: The type of encryption key, such as an AWS KMS key\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-Lambda.md
c6d8b45692e0-0
The following related resources can help you as you work with this action\. + [AWS Lambda Developer Guide](https://docs.aws.amazon.com/lambda/latest/dg/) – For an example pipeline with a Lambda invoke action, see [Building a Continuous Delivery Pipeline for a Lambda Application with AWS CodePipeline](https://docs.aws.amazon.com/lambda/latest/dg/build-pipeline.html) in the *AWS Lambda Developer Guide*\. + [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/) – For more information about Lambda actions and AWS CloudFormation artifacts for pipelines, see [Using Parameter Override Functions with CodePipeline Pipelines](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/continuous-delivery-codepipeline-parameter-override-functions.html), [Automating Deployment of Lambda\-based Applications](https://docs.aws.amazon.com/lambda/latest/dg/automating-deployment.html), and [AWS CloudFormation Artifacts](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/continuous-delivery-codepipeline-cfn-artifacts.html)\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-Lambda.md
c6d8b45692e0-1
+ [Invoke an AWS Lambda function in a pipeline in CodePipeline](actions-invoke-lambda-function.md) – This procedure provides a sample Lambda function and shows you how to use the console to create a pipeline with a Lambda invoke action\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-Lambda.md
9e0d1494c31b-0
You can apply tags to your webhooks in CodePipeline\. Tags are key\-value pairs associated with AWS resources\. 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 specify tags when you create a webhook\. You can add, remove, and update the values of tags in a webhook\. You can add up to 50 tags to each webhook\. **Topics** + [Add tags to an existing webhook](#tag-webhooks-add) + [View tags for a webhook](#tag-webhooks-list) + [Edit tags for a webhook](#tag-webhooks-update) + [Remove tags for a webhook](#tag-webhooks-delete)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tag-webhooks.md
85700d0e5ba0-0
Follow these steps to use the AWS CLI to add a tag to a webhook\. To add a tag to a webhook when you create it, see [Create a webhook for a GitHub source](pipelines-webhooks-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 webhook 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 webhook\. For example, to tag a webhook named *MyWebhook* with two tags, a tag key named *Project* with the tag value of *NewProject*, 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:webhook:MyWebhook --tags key=Project,value=NewProject 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/tag-webhooks.md
ba508cb2fca5-0
Follow these steps to use the AWS CLI to view the AWS tags for a webhook\. 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 webhook named *MyWebhook* with the ARN `arn:aws:codepipeline:us-west-2:account-id:webhook:MyWebhook`: ``` aws codepipeline list-tags-for-resource --resource-arn arn:aws:codepipeline:us-west-2:account-id:webhook:MyWebhook ``` If successful, this command returns information similar to the following: ``` { "tags": { "Project": "NewProject", "ApplicationName": "MyApplication" } } ```
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tag-webhooks.md
cd5b2fd6edf1-0
Follow these steps to use the AWS CLI to update a tag for a webhook\. You can change the value for an existing key or add another key\. You can also remove tags from a webhook, as shown in the next section\. At the terminal or command line, run the tag\-resource command, specifying the ARN of the webhook 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:webhook:MyWebhook --tags key=Project,value=UpdatedProject ```
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tag-webhooks.md
9e9fa4a47cd9-0
Follow these steps to use the AWS CLI to remove a tag from a webhook\. When you remove tags from the associated resource, the tags are deleted\. **Note** If you delete a webhook, all tag associations are removed from the webhook\. You do not have to remove tags before you delete a webhook\. At the terminal or command line, run the untag\-resource command, specifying the ARN of the webhook 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 webhook named *MyWebhook* with the tag key *Project*: ``` aws codepipeline untag-resource --resource-arn arn:aws:codepipeline:us-west-2:account-id:webhook:MyWebhook --tag-keys Project ``` If successful, this command returns nothing\. To verify the tags associated with the webhook, run the list\-tags\-for\-resource command\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/tag-webhooks.md
27699ef155cb-0
This example shows how you might create a policy that allows IAM users to view the inline and managed policies that are attached to their user identity\. This policy includes permissions to complete this action on the console or programmatically using the AWS CLI or AWS API\. ``` { "Version": "2012-10-17", "Statement": [ { "Sid": "ViewOwnUserInfo", "Effect": "Allow", "Action": [ "iam:GetUserPolicy", "iam:ListGroupsForUser", "iam:ListAttachedUserPolicies", "iam:ListUserPolicies", "iam:GetUser" ], "Resource": ["arn:aws:iam::*:user/${aws:username}"] }, { "Sid": "NavigateInConsole", "Effect": "Allow", "Action": [ "iam:GetGroupPolicy", "iam:GetPolicyVersion", "iam:GetPolicy", "iam:ListAttachedGroupPolicies", "iam:ListGroupPolicies", "iam:ListPolicyVersions",
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/security_iam_id-based-policy-examples-view-own-permissions.md
27699ef155cb-1
"iam:ListGroupPolicies", "iam:ListPolicyVersions", "iam:ListPolicies", "iam:ListUsers" ], "Resource": "*" } ] } ```
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/security_iam_id-based-policy-examples-view-own-permissions.md
127c5a5c690b-0
Triggers a pipeline when a new commit is made on a third\-party source code repository\. The source action retrieves code changes when a pipeline is manually executed or when a webhook event is sent from the source provider\. Currently, Bitbucket Cloud is the only connection type supported by the `CodeStarSourceConnection` action\. After a code change is detected, you have the following options for passing the code to subsequent actions: + Like other existing CodePipeline source actions, `CodeStarSourceConnection` can output a ZIP file with a shallow copy of your commit\. + `CodeStarSourceConnection` can also be configured to output a URL reference to the repo for subsequent actions\. Currently, the git URL reference can only be used by downstream CodeBuild actions to clone the repo and associated Git metadata\. Attempting to pass a Git URL reference to non\-CodeBuild actions results in an error\. CodePipeline prompts you to add a Bitbucket Cloud app to your repo when you create a connection\. If you use the console to create or edit your pipeline, CodePipeline creates a Bitbucket webhook that starts your pipeline when a change occurs in the repository\. You must have already created your Bitbucket account and repository before you can connect through the `CodeStarSourceConnection` action\. Use your Bitbucket account when you create a connection so that CodePipeline can use the Bitbucket repository for source stages in pipelines\.
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-CodestarConnectionSource.md
127c5a5c690b-1
For more information, see [Bitbucket Cloud apps](https://confluence.atlassian.com/bitbucket/bitbucket-cloud-add-ons-780871938.html) in the Bitbucket developer documentation\. **Note** To create or attach a policy to your IAM user or role with the permissions required to use AWS CodeStar connections, see [Connections permissions reference](https://docs.aws.amazon.com/dtconsole/latest/userguide/security-iam.html#permissions-reference-connections)\. Depending on when your CodePipeline service role was created, you might need to update its permissions to support AWS CodeStar connections\. For instructions, see [Add permissions to the CodePipeline service role](security-iam.md#how-to-update-role-new-services)\. **Topics** + [Action type](#action-reference-CodestarConnectionSource-type) + [Configuration parameters](#action-reference-CodestarConnectionSource-config) + [Input artifacts](#action-reference-CodestarConnectionSource-input) + [Output artifacts](#action-reference-CodestarConnectionSource-output) + [Action declaration \(Bitbucket example\)](#action-reference-CodestarConnectionSource-example) + [Installing the AWS CodeStar app on Bitbucket and creating a connection](#action-reference-CodestarConnectionSource-auth)
https://github.com/siagholami/aws-documentation/tree/main/documents/aws-codepipeline-user-guide/doc_source/action-reference-CodestarConnectionSource.md