Deploying with workflows
Using CodeCatalyst workflows, you can deploy applications and other resources to various targets such as Amazon ECS, AWS Lambda, and more.
How do I deploy an application?
To deploy an application or resource through CodeCatalyst, you first create a workflow, and then specify a deploy action inside of it. A deploy action is a workflow building block that defines what you want to deploy, where you want to deploy it, and how you want to deploy it (for example, using a blue/green scheme). You add a deploy action to your workflow using the CodeCatalyst console's visual editor, or YAML editor.
The high-level steps to deploy an application or resource are as follows.
To deploy an application (high-level tasks)
-
In your CodeCatalyst project, you add source code for an application you want to deploy. For more information, see Storing source code in repositories for a project in CodeCatalyst.
-
In your CodeCatalyst project, you add an environment that defines the target AWS account and optional Amazon Virtual Private Cloud (VPC) that you want to deploy to. For more information, see Deploying into AWS accounts and VPCs.
-
In your CodeCatalyst project, you create a workflow. The workflow is where you define how to build, test, and deploy your application. For more information, see Getting started with workflows.
-
In the workflow, you add a trigger, a build action, and optionally, a test action. For more information, see Starting a workflow run automatically using triggers, Adding the build action, and Adding the test action.
-
In the workflow, you add a deploy action. You can choose from several CodeCatalyst-provided deploy actions to your application to different targets, such as Amazon ECS. (You can also use a build action or a GitHub Action to deploy your application. For more information about the build action and GitHub Actions, see Alternatives to deploy actions.)
-
You start the workflow either manually or automatically through a trigger. The workflow runs the build, test, and deploy actions in sequence to deploy your application and resources to the target. For more information, see Starting a workflow run manually.
List of deploy actions
The following deploy actions are available:
-
Deploy AWS CloudFormation stack – This action creates a CloudFormation stack in AWS based on an AWS CloudFormation template or AWS Serverless Application Model template that you provide. For more information, see Deploying an AWS CloudFormation stack.
-
Deploy to Amazon ECS – This action registers a task definition file that you provide. For more information, see Deploying to Amazon ECS with a workflow.
-
Deploy to Kubernetes cluster – This action deploys an application to an Amazon Elastic Kubernetes Service cluster. For more information, see Deploying to Amazon EKS with a workflow.
-
AWS CDK deploy – This action deploys an AWS CDK app into AWS. For more information, see Deploying an AWS CDK app with a workflow.
Note
There are other CodeCatalyst actions that can deploy resources; however, they are not considered deploy actions because their deployment information doesn't appear on the Environments page. To learn more about the Environments page and viewing deployments, see Deploying into AWS accounts and VPCs and Viewing deployment information.
Benefits of deploy actions
Using deploy actions within a workflow has the following benefits:
-
Deployment history – View a history of your deployments to help manage and communicate changes in your deployed software.
-
Traceability – Track the status of your deployments through the CodeCatalyst console, and see when and where each application revision was deployed.
-
Rollbacks – Roll back deployments automatically if there are errors. You can also configure alarms to activate deployment rollbacks.
-
Monitoring – Watch your deployment as it progresses through the various stages of your workflow.
-
Integration with other CodeCatalyst features – Store source code and then build, test, and deploy it, all from one application.
Alternatives to deploy actions
You don't have to use deploy actions, although they are recommended because they offer the benefits outlined in the preceding section. Instead, you can use the following CodeCatalyst actions :
-
A build action.
Typically, you use build actions if you want to deploy to a target for which a corresponding deploy action does not exist, or if you want more control over the deployment procedure. For more information about using build actions to deploy resources, see Building with workflows.
-
A GitHub Action.
You can use a GitHub Action inside a CodeCatalyst workflow to deploy applications and resources (instead of a CodeCatalyst action). For information about how to use GitHub Actions inside a CodeCatalyst workflow, see Integrating with GitHub Actions
You can also use the following AWS services to deploy your application, if you don't want to use a CodeCatalyst workflow to do so:
-
AWS CodeDeploy – see What is CodeDeploy?
-
AWS CodeBuild and AWS CodePipeline – see What is AWS CodeBuild? and What is AWS CodePipeline?
-
AWS CloudFormation – see What is AWS CloudFormation?
Use CodeDeploy, CodeBuild, CodePipeline, and CloudFormation services for complex, enterprise deployments.
Topics
- Deploying to Amazon ECS with a workflow
- Deploying to Amazon EKS with a workflow
- Deploying an AWS CloudFormation stack
- Deploying an AWS CDK app with a workflow
- Bootstrapping an AWS CDK app with a workflow
- Publishing files to Amazon S3 with a workflow
- Deploying into AWS accounts and VPCs
- Displaying the app URL in the workflow diagram
- Removing a deployment target
- Tracking deployment status by commit
- Viewing the deployment logs
- Viewing deployment information