This project involves an S3 bucket, an AWS Code Pipeline, an AWS Code Deploy application, and an ec2 instance. The goal of this workload is to successfully deploy a working code from an s3 bucket to an ec2 instance.
S3 bucket - Used as a container to hold the source code.
AWS Code Pipeline - This resource is used to pull the source code from the S3 bucket and deliver to AWS Code Deploy
AWS Code Deploy - This resource is sued to deploy the source code pulled by AWS Code Pipeline to an EC2instance.
Create a role that with the following policies.
AmazonEC2RoleforAWSCodeDeploy
AmazonSSMManagedInstanceCore
This role contains policies that authenticate and permit ec2 instances to download code from s3 and access SSM that would be used by Code Deploy to install the application via ssh on an EC2 instance.
Create a second role with the folowing policies .
AmazonCodeDeployRole
-
Create S3 bucket
-
Create a role (You can name it anything) and attach the following policies
AmazonEC2RoleforAWSCodeDeploy
AmazonSSMManagedInstanceCore
Also create another role and attach the following policies
AmazonCodeDeployRole
-
Create an EC2 instance and attach the first role as an instance profile.
-
Create an AWS CodeDeploy application
-
Create an AWS Code pipeline.
Application is deployed successfully.
This is a short description of this workload, you can find a more detialed tutorial on this detailed - blog post
The next step is to automate the entire CI/CD process. I would use AWS Code Pipeline to automate the pulling of source code to my S3 bucket, then AWS Code Pipeline picks up the updated code and uses AWS Code Deploy to deploy the code to my EC2 instance. The first part of this workload has been discussed in another GitHub repository. I would merge the two applications and update this readme with an image of both workloads.