Explain it simpler
CodeDeploy is an AWS service that installs new versions of your application for you. It reads an instruction file called appspec.yml that says what to copy and which of your scripts to run at each step, such as stop the old app, install, start the new app and check it is healthy. Those steps are called lifecycle hooks. On regular servers, a small helper program called the CodeDeploy agent must be running on each machine to do the work. For Lambda and container services, there are no servers to visit, so the steps are shorter and your checks run as small functions. It is like a moving company with a checklist: on some jobs a crew member must be on site, on others the move happens remotely.
It is 11 p.m. at Oakridge Learning, and Nadia's CodeDeploy deployment to twelve EC2 web servers has been stuck at 'In progress' for twenty minutes. Eleven instances finished; one shows no lifecycle events at all. A second deployment, to the team's ECS service, passed every test in staging, yet the team lead wants to know where they could run tests against the new tasks before real students reach them. And a third team asks why their Lambda AppSpec rejects the AfterInstall hook they copied from the EC2 example. Three platforms, one service, three different sets of rules. What does CodeDeploy actually do on each, and why is that one server silent?
AWS CodeDeploy automates deploying application revisions to three compute platforms: Amazon EC2 instances and on-premises servers, AWS Lambda functions, and Amazon Elastic Container Service (ECS) services. For every deployment it reads an application specification file, appspec.yml, which may also be JSON for Lambda and ECS. The AppSpec describes what to deploy and which lifecycle event hooks to run. The Developer Associate exam tests the hook order, which hooks exist on which platform, and how to troubleshoot the EC2 agent.
Keep reading for free
Create a free StudyToCert account to read the rest of this lesson: 8 more sections, 7 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.