# CodeDeploy - A fully managed deploy service in the cloud. - Can deploy EC2, On-Prem, Lambda, or ECS. - Rapidly release new features. - Update AWS Lambda function versions. - Avoid downtime during application deployments. - Integrates with existing CI/CD tools eg. Jenkins, [[_CodePipeline|CodePipeline]]. - Integrates with existing management tools eg. Puppet, Chef, Ansible. ## Core Components ### Application The unique identifier for the application being deployed. Ensures the correct combination of revision deployment configuration, and group are referenced during deployment. ### Deployment Groups A set of EC2 instances or [[_Lambda|Lambda Functions]] where the new revision is deployed to. ### Deployment This is the process and components used to apply a new application revision. ### Deployment Configuration A set of deployment rules used during deployment - with success/failure conditions included ### AppSpec File Contains the deployment actions that CodeDeploy should execute during deployment. ### Revision This is everything required to deploy a new version: AppSpec file, application files, configuration files, executables. ## Deployments ### In-Place - The app on each instance in the deployment group is **stopped**. - The latest app revision is installed, and the new version of the application is started and validated. - You can use a **load balancer** so that each instance is unregistered during its deployment and then restored to service after the deployment is complete. - ==Only deployments that use the EC2/On-Premises compute platform can use in-place deployments.== ### Blue/Green - Instances are provisioned for the replacement environment. - The latest application version is installed on the replacement instances - An optional wait time occurs for activities such as application testing and system verification. - Instances in the replacement environment are registered with an ELB, causing traffic to be rerouted to them. - Instances in the original environment are unregistered and can be terminated or kept running for other uses.