CI/CD Implementation in AWS
Aren’t you bored of the traditional deployment method which takes hours of time, multiple file transfers, manual work and lot more. All the manual work gives a room for human errors like missing a key, wrong file transferred, etc. which results in more downtime for the production. More downtime means unsatisfied customers resulting product failure.
Now, what is the solution for this? The solution could be a process which bypasses all these manual work, does all the work automatically and notifies you once the job is done. What could be better that one click deployment :)
Yes, Once click deployment is nothing but implementation of CI/CD into the Software Development Lifecycle. CI/CD stands for continuous Integration and Continuous Deployment. The process ensures a scheduled code pull, transformations or build, snapshots for future purposes, deployment of the new version and test it before release. This is a smooth way to have a clear vision on what is happening where and track back if any error occurs.
There are multiple cloud providers which provide CI/CD implementation. You can refer my article if you’re confused which cloud provider suits your requirement here (https://medium.com/analytics-vidhya/aws-vs-azure-vs-gcp-the-selection-dilemma-8006ff7b1e15). This articles focusses more on AWS architecture for CI/CD and explains a simple architecture diagram to integrate with GitHub and automatically deploy code on EC2 instance once it is committed.
AWS CI/CD Process
The architecture above in figure 1 shows a 7 step procedure which will get auto invoked once the code is committed to GitHub. The process is customizable and can be altered as per requirement. I have given the name as Click — Sit — Relax.
- Developer commits code changes from their local repo to the GitHub repository.
- Once the code is pushed, GitHub action triggers the build stage.
- GitHub’s Open ID Connector (OIDC) uses the tokens to authenticate to AWS and access AWS resources and services.
- GitHub action uploads the deployment artifacts to Amazon S3.
- GitHub action invokes CodeDeploy.
- CodeDeploy triggers the deployment to Amazon EC2 instances.
- CodeDeploy downloads the artifacts from Amazon S3 and deploys to Amazon EC2 instances.
Advantages of CI/CD
There are lot of advantages of CI/CD in different fields. Depending on how the CI/CD pipeline is implemented, the advantages changes. Below are some general advantages of using CI/CD mechanism in a Software Development Lifecycle.
- Quick and saves a lot of time
- Increases productivity and efficiency of the team
- Better time utilization of the team and resources
- Faster product delivery
- Log generation to track issues
- Easy rollback if required
- Effective testing and monitoring
This concludes this article on CI/CD implementation in Software Development Lifecycle. Feel free to drop any comment you feel or any suggestions you want to make. Follow for more technical articles explained in short !!