Home AWS AWS CodeDeploy

AWS CodeDeploy

by SupportPRO Admin

AWS CodeDeploy is a deployment service that automates application deployments to Amazon EC2 instances and on-premises instances. It helps us to deploy application content such as code, serverless AWS Lambda functions, web and configuration files, packages, scripts, multimedia files, etc. After deploying the application content on a server it is stored in Amazon S3 buckets, GitHub repositories, or Bitbucket repositories.

It works with various systems for configuration management, source control, continuous integration, continuous delivery, and continuous deployment.

Code Deploy Flow

Code Deploy Flow

        

With AWS CodeDeploy, the following processes become easier.

  1. Rapidly release new features.
  2. Avoid downtime during application deployment.
  3. Update AWS Lambda function versions.
  4. Handle the complexity of updating your applications, without many of the risks associated with error-prone manual deployments.

BENEFITS OF AWS CODEDEPLOY

AWS CodeDeploy offers different types of benefits which are mentioned below.

1.Server and serverless applications

It deploys both applications on servers and applications that deploy a serverless AWS Lambda function version.

2. Minimize downtime

It maximizes your application availability. It performs a rolling update across Amazon EC2 instances during an in-place deployment. You can specify the number of instances to be taken offline at a time for updates.

3. Automated deployments

It automates application deployment across the development, test, and production environments.

4. Centralized control

You can launch and track the status of your deployments through the AWS CodeDeploy console or the AWS CLI.

5. Easy to adopt

Easily reuse your setup code. AWS CodeDeploy can also integrate with the software release process or continuous delivery toolchain.

6. Stop and rollback

If there are any errors, you can automatically or manually stop and roll back deployments.

AWS CODEDEPLOY COMPUTE PLATFORMS

It’s possible to deploy applications to two compute platforms in AWS CodeDeploy:

1) EC2/On-Premises: It describes Amazon EC2 cloud instances and on-premises servers.

2) AWS Lambda:  Used to deploy applications of updated versions of Lambda functions.

AWS CodeDeploy Component

EC2/On-Premises

AWS Lambda

Deployment group
Deploys a set of instances to which a new revision is deployed.
Deploys a Lambda function version on a high-availability compute infrastructure.
Deployment configuration
Settings that determine the deployment speed and the minimum number of instances that must be healthy at any point during deployment.
Settings that determine how traffic is shifted to the updated Lambda function versions.
Deployment
Deploys a new revision that consists of an application and AppSpec file. The AppSpec specifies how to deploy the application to the instances in a deployment group.
Deploys a new revision that consists of an AppSpec file. The AppSpec specifies which Lambda function version to deploy.
Application
A collection of deployment groups and revisions. An EC2/On-Premises application uses the EC2/On-Premises compute platform.
A collection of revisions. A Lambda application uses the AWS Lambda compute platform.
Revision
A combination of an AppSpec file and application files, such as executables, configuration files, and so on.
An AppSpec file that specifies which Lambda functions to deploy and update.

AWS CODEDEPLOY DEPLOYMENT TYPES

AWS CodeDeploy provides two deployment type options:

  • In-place deployment
  • Blue/green deployment

In-place deployment

Using the AWS CodeDeploy agent, you can perform deployment on an instance you are logged on to without the need for an application, deployment group, or even an AWS account.

The following diagram shows the flow of a typical AWS CodeDeploy in-place deployment.

AWS CODEDEPLOY-Work Flow

Working

  1. Create deployable content
  2. Add an application specification file (AppSpec file) which is unique to AWS CodeDeploy.
  3. Bundle the deployable content and the AppSpec file into an archive file.
  4. Upload it to an Amazon S3 bucket or a GitHub repository. 
  5. Provide AWS CodeDeploy with information about the deployment so as to deploy its contents.
  6. Next, the AWS CodeDeploy agent on each instance polls AWS CodeDeploy.
  7. AWS CodeDeploy agent on each instance pulls the target revision from the specified Amazon S3 bucket or GitHub repository.

Blue/green deployment

A blue/green deployment reroute the traffic from one set of instances to a different set. An application can be installed and tested on the new instances. It even helps to switch back to the most recent version of an application faster and also traffic can be routed back to the original instances if they have not been terminated. It helps us to control how traffic is shifted from the original AWS Lambda function versions to the new AWS Lambda function versions.

If you require any help with setting up your cloud servers or managing the, contact SupportPRO Cloud Management experts

Server not running properly? Get A FREE Server Checkup By Expert Server Admins - $125 Value

Leave a Comment