CodeDeploy CheatSheet

  • A fully-managed deploy pipeline to deploy to staging or production environments
  • Can deploy to EC2, On-Premise, Lambda or ECS
  • Can Perform In-Place or Blue/Green deployments
    • In-Place - instances are briefly taken offline, updates are applied to existing servers
    • Blue/Green- Replaces instances with new instances. Swapping environments
  • CodeDeploy Core Components:
    • Application encompasses all other components. Unique ID of the application being deployed
    • Deployment Groups -A set of EC2 instances or Lambda Functions where the new revision is deployed to
      • Deployments - 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, config files, executables
  • The Appspec.yml describes the deploy instructions and must be part of the deploy artifact
  • You need to install the CodeDeployAgent on the EC2 instances so it can communicate with CodeDeploy
  • You need to CodeDeployServiceRole to your EC2 instance so they have permission to communicate to CodeDeploy and so CodeDeploy has permissions to replicate servers or ASGs.