This lab walks you through how to deploy sample WordPress applications with AWS CodeDeploy on Amazon EC2 Instance.
Duration: 90 minutes
AWS Region: US East (N. Virginia) us-east-1
AWS CodeDeploy helps you automate your application deployment of a variety of compute services such as Amazon EC2, AWS Lambda, AWS Fargate, and on-premise servers.
Using CodeDeploy, We can deploy the following types of content:
Serverless AWS Lambda functions
Web and configuration files
The source code of the application can be stored in S3 Bucket, CodeCommit, git-based repositories such as GitHub or BitBucket.
Codedeploy makes helps you in rapidly releasing new features, Updating AWS Lambda functions version, To avoid downtime during application deployments, and handle the complexity of applications having error-prone manual deployments.
To work with various systems for configuration management, source control, continuous integration (CI), and continuous delivery, you can use CodeDeploy.
CodeDeploy can be used for the following types of deployment:
An application that requires servers like Amazon EC2, On-premise server
Applications are which are serverless, using AWS Lambda
Containerized applications deployed on Amazon ECS
AWS CodeDeploy supports two types of deployment:
In-place deployment: For this method, you stop the deployment of applications present on every instance and install a revised application. Once the newer version of the application is deployed the application starts and gets validated.
Note: AWS Lambda and Amazon ECS deployments, do not support in-place deployments.
Blue-green deployment: For this deployment type, the characteristics of deployment depend on the type of compute platform used for deployment.
EC2 or On-premise platform
Launching Lab Environment
Launching an EC2 Instance
SSH into EC2 Instance
Install AWS CLI, Git version control, and CodeDeploy Agent
Clone the application and copy application files from S3 Bucket
Create a CodeDeploy application and push the bundled application to S3 Bucket
Create a Deployment Group
Create a deployment and deploy the application on the instance
Test the application using EC2 Instance Public IPv4 DNS
Setup the WordPress site
Access the WordPress site
Validation of the lab
Delete the CodeDeploy application