

# Integration with other AWS services
<a name="integrations-aws"></a>

CodeDeploy is integrated with the following AWS services:


|  |  | 
| --- |--- |
| Amazon CloudWatch | [Amazon CloudWatch](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/) is a monitoring service for AWS cloud resources and the applications you run on AWS. You can use Amazon CloudWatch to collect and track metrics, collect and monitor log files, and set alarms. CodeDeploy supports the following CloudWatch tools: +  **CloudWatch alarms** for monitoring your deployments and stopping them when your specified monitoring metrics exceed or fall below the thresholds you specify in a CloudWatch alarm rule. To use alarm monitoring, you first set up an alarm in CloudWatch, and then add it in CodeDeploy to the application or deployment group where deployments should stop when the alarm is activated. <br />Learn more:   [Creating CloudWatch Logs alarms](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/AlarmThatSendsEmail.html)   <br />+  **Amazon CloudWatch Events** for detecting and reacting to changes in the state of an instance or a deployment in your CodeDeploy operations. Then, based on rules you create, CloudWatch Events invokes one or more target actions when a deployment or instance enters the state you specify in a rule.  <br />Learn more:   [Monitoring deployments with Amazon CloudWatch Events](monitoring-cloudwatch-events.md)   <br />+  **Amazon CloudWatch Logs** for monitoring the three types of logs created by the CodeDeploy agent without having to sign in to instances one at a time. <br />Learn more:   [View CodeDeploy logs in CloudWatch Logs console](https://aws.amazon.com/blogs/devops/view-aws-codedeploy-logs-in-amazon-cloudwatch-console/)    | 
| Amazon EC2 Auto Scaling | CodeDeploy supports [Amazon EC2 Auto Scaling](https://aws.amazon.com/autoscaling). This AWS service can automatically launch Amazon EC2 instances based on criteria you specify, for example:+  Limits exceeded for specified CPU utilization. <br />+  Disk reads or writes. <br />+  Inbound or outbound network traffic over a specified time interval. <br />You can scale out a group of Amazon EC2 instances whenever you need them and then use CodeDeploy to deploy application revisions to them automatically. Amazon EC2 Auto Scaling terminates those Amazon EC2 instances when they are no longer needed.<br />Learn more:+  [Integrating CodeDeploy with Amazon EC2 Auto Scaling](integrations-aws-auto-scaling.md) <br />+  [Tutorial: Use CodeDeploy to deploy an application to an Auto Scaling group](tutorials-auto-scaling-group.md) <br />+  [Under the hood: CodeDeploy and Auto Scaling integration](https://aws.amazon.com/blogs/devops/under-the-hood-aws-codedeploy-and-auto-scaling-integration/)  | 
| Amazon Elastic Container Service |  You can use CodeDeploy to deploy an Amazon ECS containerized application as a task set. CodeDeploy performs a blue/green deployment by installing an updated version of the application as a new replacement task set. CodeDeploy reroutes production traffic from the original application task set to the replacement task set. The original task set is terminated after a successful deployment. For more information about Amazon ECS, see [Amazon Elastic Container Service](https://aws.amazon.com/ecs/).<br /> You can manage the way in which traffic is shifted to the updated task set during a deployment by choosing a canary, linear, or all-at-once configuration. For more information about Amazon ECS deployments, see [Deployments on an Amazon ECS compute platform](https://docs.aws.amazon.com/en_us/codedeploy/latest/userguide/deployment-steps-ecs.html).  | 
| AWS CloudTrail | CodeDeploy is integrated with [AWS CloudTrail](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/). This service captures API calls made by or on behalf of CodeDeploy in your AWS account and delivers the log files to an Amazon S3 bucket you specify. CloudTrail captures API calls from the CodeDeploy console, from CodeDeploy commands through the AWS CLI, or from the CodeDeploy APIs directly. Using the information collected by CloudTrail, you can determine:+  Which request was made to CodeDeploy. <br />+  The source IP address from which the request was made. <br />+  Who made the request. <br />+  When it was made. <br />Learn more:+   [Monitoring deployments with AWS CloudTrail](monitoring-cloudtrail.md)  | 
| AWS Cloud9 | [AWS Cloud9](https://docs.aws.amazon.com/cloud9/latest/user-guide/) is an online, cloud-based integrated development environment (IDE) you can use to write, run, debug, and deploy code using just a browser from an internet-connected machine. AWS Cloud9 includes a code editor, debugger, terminal, and essential tools, such as the AWS CLI and Git.+  You can use the AWS Cloud9 IDE to run, debug, and build code that is in a GitHub repository. You can view, change, and save the code using its IDE **Environment** window and editor tabs. When you're ready, you can use Git in the AWS Cloud9 terminal session to push code changes to your GitHub repository, and then use AWS CodeDeploy to deploy your updates. For more information about using AWS Cloud9 with GitHub, see [GitHub sample for AWS Cloud9](https://docs.aws.amazon.com/cloud9/latest/user-guide/sample-github.html).  <br />+  You can use the AWS Cloud9 IDE to update an AWS Lambda function. You can then use AWS CodeDeploy to create a deployment that shifts traffic to the new version of your AWS Lambda function. For more information, see [Working with AWS Lambda functions in the AWS Cloud9 Integrated Development Environment (IDE)](https://docs.aws.amazon.com/cloud9/latest/user-guide/lambda-functions.html). <br />For more information about AWS Cloud9, see [ What Is AWS Cloud9](https://docs.aws.amazon.com/cloud9/latest/user-guide/welcom.html) and [Getting started with AWS Cloud9](https://docs.aws.amazon.com/cloud9/latest/user-guide/get-started.html). | 
| AWS CodePipeline | [AWS CodePipeline](https://docs.aws.amazon.com/codepipeline/latest/userguide/) is a continuous delivery service you can use to model, visualize, and automate the steps required to release your software in a continuous delivery process. You can use AWS CodePipeline to define your own release process so that the service builds, tests, and deploys your code every time there is a code change. For example, you might have three deployment groups for an application: Beta, Gamma, and Prod. You can set up a pipeline so that each time there is a change in your source code, the updates are deployed to each deployment group, one by one.<br />You can configure AWS CodePipeline to use CodeDeploy to deploy:+  Code to Amazon EC2 instances, on-premises instances, or both. <br />+  Serverless AWS Lambda function versions. <br /><br />You can create the CodeDeploy application, deployment, and deployment group to use in a deploy action in a stage either before you create the pipeline or in the **Create Pipeline** wizard.<br />Learn more:+  [AWS for DevOps getting started guide](https://docs.aws.amazon.com/devops/latest/gsg/welcome.html) — Learn how to use CodePipeline with CodeDeploy to continuously deliver and deploy source code in CodeCommit repositories to Amazon EC2 instances. <br />+  [Simple pipeline walkthrough (Amazon S3 Bucket)](https://docs.aws.amazon.com/codepipeline/latest/userguide/getting-started-w.html) <br />+  [Simple pipeline walkthrough (CodeCommit Repository)](https://docs.aws.amazon.com/codepipeline/latest/userguide/getting-started-cc.html) <br />+  [Four-stage pipeline tutorial](https://docs.aws.amazon.com/codepipeline/latest/userguide/getting-started-4.html)  | 
| AWS Serverless Application Model | AWS Serverless Application Model (AWS SAM) is a model to define serverless applications. It extends CloudFormation to provide a simplified way of defining AWS Lambda functions, Amazon API Gateway APIs, and Amazon DynamoDB tables required by a serverless application. If you already use AWS SAM, you can add deployment preferences to start using CodeDeploy to manage the way in which traffic is shifted during an AWS Lambda application deployment.<br />For more information, see the [AWS Serverless Application Model](https://github.com/awslabs/serverless-application-model). | 
| Elastic Load Balancing | CodeDeploy supports [Elastic Load Balancing](https://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/elastic-load-balancing.html), a service that distributes incoming application traffic across multiple Amazon EC2 instances. <br />For CodeDeploy deployments, load balancers also prevent traffic from being routed to instances when they are not ready, are currently being deployed to, or are no longer needed as part of an environment.<br />Learn more:+  [Integrating CodeDeploy with Elastic Load Balancing](integrations-aws-elastic-load-balancing.md)  | 

**Topics**
+ [Amazon EC2 Auto Scaling](integrations-aws-auto-scaling.md)
+ [Integrating CodeDeploy with Elastic Load Balancing](integrations-aws-elastic-load-balancing.md)