AWS Cloud9 is no longer available to new customers. Existing customers of
AWS Cloud9 can continue to use the service as normal.
Learn more
Working with AWS CodePipeline in the AWS Cloud9 IDE
You can use the AWS Cloud9 Integrated Development Environment (IDE) to work with source code in repositories that are compatible with AWS CodePipeline.
CodePipeline is a continuous delivery service you can use to model, visualize, and automate the steps required to release your software and ongoing changes you make to it. You can use CodePipeline to quickly model and configure the different stages of a software release process. For more information, see the AWS CodePipeline User Guide.
Note
Completing these procedures might result in charges to your AWS account. These include
possible charges for services such as Amazon EC2, CodePipeline, Amazon S3, and AWS services supported by
CodePipeline. For more information, see Amazon EC2
Pricing
AWS CodeStar provides additional features along with pipelines, such as project templates, dashboards, and teams. To use AWS CodeStar instead of CodePipeline, skip the rest of this topic, and see Working with AWS CodeCommit Projects instead.
Step 1: Create or identify your source code repository
In this step, you create or identify a source code repository that is compatible with CodePipeline.
Later in this topic, you upload your software's source code to that repository. CodePipeline will build, test, and deploy the uploaded source code in that repository by using related pipelines that you also create.
Your source code repository must be one of the following repository types that CodePipeline supports:
-
AWS CodeCommit. If you already have a repository in CodeCommit that you want to use, skip ahead to Step 2: Create an AWS Cloud9 Development Environment, Connect It to the Code Repository, and Upload Your Code. Otherwise, to use CodeCommit, follow these instructions in the AWS CodeCommit Sample in this order, and then return to this topic:
-
Amazon S3. If you already have a bucket in Amazon S3 that you want to use, skip ahead to Step 2: Create an AWS Cloud9 Development Environment, Connect It to the Code Repository, and Upload Your Code. Otherwise, to use Amazon S3, follow these instructions in the Amazon Simple Storage Service User Guide in this order, and then return to this topic:
-
GitHub. If you already have a repository in GitHub, you can clone it and create a local copy on your development environment using the Git panel interface. If you don't yet have an account or repository set up on GitHub, refer to the relevant documentation
for instructions.
Step 2: Create an AWS Cloud9 Development Environment, connect it to the code repository, and upload your code
In this step, you create an AWS Cloud9 development environment in the AWS Cloud9 console. You then connect the environment to the repository that CodePipeline will use. Finally, you use the AWS Cloud9 IDE for the environment to upload your source code to the repository.
To create the environment, follow the instructions in Creating an Environment, and then return to this topic. (If you already have an environment, you can use it. You don't need to create a new one.)
To connect the environment to the repository, and then upload your source code to the repository if it isn't already there, use one of the following sets of instructions. The set you choose depends on the type of repository that stores the source code.
Repository type | Instructions |
---|---|
CodeCommit |
Follow these instructions in the AWS CodeCommit Sample:
|
Amazon S3 |
|
GitHub |
You can clone a repository hosted on GitHub and interact with by using the Git panel interface. |
After you connect the environment to the repository, whenever you push source code changes from the AWS Cloud9 IDE to the repository, CodePipeline automatically sends those changes through related pipelines to be built, tested, and deployed. You create a related pipeline later in this topic.
Step 3: Prepare to work with AWS CodePipeline
In this step, you attach a specific AWS managed policy to the IAM group you created or identified in Team Setup. This enables the group's users to begin creating and working with pipelines in CodePipeline.
If you have used CodePipeline before, skip ahead to Step 4: Create a Pipeline in AWS CodePipeline.
For this step, follow these instructions in Step 3: Use an IAM Managed Policy to Assign AWS CodePipeline; Permissions to the IAM User in the AWS CodePipeline User Guide, and then return to this topic.
Step 4: Create a pipeline in AWS CodePipeline
In this step, you create a pipeline in CodePipeline that uses the repository you created or identified earlier in this topic.
For this step, follow the instructions in Create a Pipeline in AWS CodePipeline in the AWS CodePipeline User Guide.
After you create the pipeline, CodePipeline sends the current version of the source code in the repository through the pipeline to be built, tested, and deployed. Then, whenever you push source code changes from the AWS Cloud9 IDE to the repository, CodePipeline automatically sends those changes through the pipeline to be built, tested, and deployed.
To view the pipeline, follow the instructions in View Pipeline Details and History in AWS CodePipeline in the AWS CodePipeline User Guide.