AWS CodeDeploy | Getting Started Flashcards

1
Q

What are deployment lifecycle events?

Getting Started

AWS CodeDeploy | Developer Tools

A

A deployment goes through a set of predefined phases called deployment lifecycle events. A deployment lifecycle event gives you an opportunity to run code as part of the deployment. The following table lists the different deployment lifecycle events currently supported, in their order of execution, along with examples of when you may want to use them.

Deployment Lifecycle Event Description

ApplicationStop

This is the first deployment lifecycle event that occurs even before the revision gets downloaded. The AppSpec file and scripts used for this deployment lifecycle event are from the last successfully deployed revision.

You can use the ApplicationStop deployment lifecycle event if you want to gracefully stop the application or remove currently installed packages in preparation of a deployment.

DownloadBundle During this deployment lifecycle event, the agent copies the revision files to a temporary location on the instance. This deployment lifecycle event is reserved for the agent and cannot be used to run user scripts.

BeforeInstall You can use the BeforeInstall deployment lifecycle event for preinstall tasks such as decrypting files and creating a backup of the current version.

Install During this deployment lifecycle event, the agent copies the revision files from the temporary location to the final destination folder. This deployment lifecycle event is reserved for the agent and cannot be used to run user scripts.

AfterInstall You can use the AfterInstall deployment lifecycle event for tasks such as configuring your application or changing file permissions.

ApplicationStart You typically use the ApplicationStart deployment lifecycle event to restart services that were stopped during ApplicationStop.

ValidateService ValidateService is the last deployment lifecycle event and is an opportunity to verify that the deployment completed successfully.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly