The deployment of an artifact to AWS CodeDeploy involves four different major components as follows:
- Application – A name that uniquely identifies the application that you want to deploy.
- Application Revision – An archive file containing source content – such as source code, web pages, executable files, and deployment scripts – along with an Application Specification File (AppSpec file). Revisions are stored in Amazon S3 buckets or GitHub repositories.
- Deployment Configuration – A set of deployment rules and deployment success and failure conditions that AWS CodeDeploy uses during a deployment.
- Deployment Group – A set of individual instances. A deployment group contains individually-tagged Amazon EC2 instances, Amazon EC2 instances in Auto Scaling groups, or both.
The lifecycle of any artifact (i.e. any specific application revision) is illustrated by the diagram in What is AWS CodeDeploy?:
The binding between those components is established indirectly and comprises the following activities:
- commit or upload the application source code (the 'Revision') – see the Upload action of the Amazon S3 Object task
- configure AWS CodeDeploy
- create an application – see the Create action of the AWS CodeDeploy Application task
- create a deployment group – see the Create action of the AWS CodeDeploy Deployment Group task
- the target instances can be provisioned with AWS CloudFormation for example – see the Create action of the AWS CloudFormation Stack task
- deploy an application revision for that application – see the Create action of the AWS CodeDeploy Deployment task
- you can also only register an application revision for a later deployment – see the Prepare action of the AWS CodeDeploy Deployment task
the AWS CodeDeploy Agent on each participating instance pulls the revision from the specified Amazon S3 bucket or GitHub repository and starts deploying the contents to that instance, following the instructions in the AppSpec file that's provided