Voiced by Amazon Polly |
AWS Code Pipeline: An overview
Are you eager to know how to Deploy Infrastructure with AWS Code Pipeline?AWS Code Pipeline is a Continuous Integration and Continuous Delivery service that can be used for fast and reliable infrastructure deployment and updates. It can automate and standardize the provisioning of the Infrastructure required to deploy your applications; Rapid Infrastructure modification can also be done whenever required with less human intervention. The Code Pipeline has multiple stages: source, build, and deploy. We will be deploying and modifying Infrastructure using CloudFormation templates for EC2 instances.
Customized Cloud Solutions to Drive your Business Success
- Cloud Migration
- Devops
- AIML & IoT
Services for provisioning the Infrastructure
Below are the services we will be using to automate our Infrastructure provisioning.
CloudFormation– This service is used for deploying Infrastructure as a code. We will use two templates, one for initial deployment and another for updating the Infrastructure. During the Code Deploy stage, we will select CloudFormation Stack to provision the resources defined in the template.
Simple Storage Service (S3) – The CloudFormation template would be uploaded and stored in an S3 bucket. This bucket would be used as a source while creating Code Pipeline.
Code Pipeline- We will build an automated process for provisioning and updating our Infrastructure using this service.
Steps to create a Code Pipeline for Infrastructure Deployment.
Below are the steps to follow;
Pre-requisites: Two CloudFormation templates (One template to create an EC2 instance with one Elastic IP and a Security group associated with it. Second template with some modifications in the security group rules)
Execution Steps-
- In the AWS console, open the S3 service and create a bucket with versioning enabled.
- Zip both the CloudFormation templates and upload the first template to the bucket. (Remember the name of the Zip file uploaded in a bucket and also the name of the template with the extension present within that zip file (e.g., zip, which consists of a template named ec2.yaml)
- Now open the Code Pipeline console page.
- Click on the ‘Create Pipeline’
- Enter the name for the pipeline, keep all values as default (as shown in Figure 1.1), and then click ‘Next.’
Figure:1.1
- On the Source Stage page, select the Source Provider as ‘Amazon S3’. Then select the bucket created in earlier steps, provide the zip file name (as shown in Figure 1.2), and click ‘Next.’
Figure:1.2
- On the Build Stage page, Click on ‘Skip Build stage’ and then click on ‘Skip’
- Now, on the Deploy stage, select Deploy provider as ‘AWS CloudFormation’ and enter other information as shown in Figure 1.3 (the yaml is the template within the zip file in the S3 bucket). Select the ‘local execution role’ and then click ‘Next.’
- Review and Click on ‘Create Pipeline’
Figure:1.3
- This step will deploy the EC2 instance using the Code Pipeline service. Once the deployment, it will show the success of stages, as shown in Figure 1.4
Figure:1.4
Updating the deployed Infrastructure
To update the existing Infrastructure deployed using the Code Pipeline service, follow the below-given steps.
- Create a zip file of a modified template file with the same file name as zip.
- Upload the updated zip file in the same source bucket selected earlier while creating the pipeline.
- Observe the pipeline for the update process. (As shown in figure 1.5)
- Once the update is successful, observe the changes in the EC2 security groups.
Conclusion
Thus, we can conclude that with how to deploy Infrastructure with AWS Code Pipeline or provision your Infrastructure quickly and reliably using the CI/CD process, then we can use the Code Pipeline service.
You can read more about AWS Code Pipeline from official AWS site.
Get your new hires billable within 1-60 days. Experience our Capability Development Framework today.
- Cloud Training
- Customized Training
- Experiential Learning
About CloudThat
CloudThat is a leading provider of Cloud Training and Consulting services with a global presence in India, the USA, Asia, Europe, and Africa. Specializing in AWS, Microsoft Azure, GCP, VMware, Databricks, and more, the company serves mid-market and enterprise clients, offering comprehensive expertise in Cloud Migration, Data Platforms, DevOps, IoT, AI/ML, and more.
CloudThat is the first Indian Company to win the prestigious Microsoft Partner 2024 Award and is recognized as a top-tier partner with AWS and Microsoft, including the prestigious ‘Think Big’ partner award from AWS and the Microsoft Superstars FY 2023 award in Asia & India. Having trained 850k+ professionals in 600+ cloud certifications and completed 500+ consulting projects globally, CloudThat is an official AWS Advanced Consulting Partner, Microsoft Gold Partner, AWS Training Partner, AWS Migration Partner, AWS Data and Analytics Partner, AWS DevOps Competency Partner, AWS GenAI Competency Partner, Amazon QuickSight Service Delivery Partner, Amazon EKS Service Delivery Partner, AWS Microsoft Workload Partners, Amazon EC2 Service Delivery Partner, Amazon ECS Service Delivery Partner, AWS Glue Service Delivery Partner, Amazon Redshift Service Delivery Partner, AWS Control Tower Service Delivery Partner, AWS WAF Service Delivery Partner, Amazon CloudFront Service Delivery Partner, Amazon OpenSearch Service Delivery Partner, AWS DMS Service Delivery Partner, AWS Systems Manager Service Delivery Partner, Amazon RDS Service Delivery Partner, AWS CloudFormation Service Delivery Partner, AWS Config, Amazon EMR and many more.

WRITTEN BY Abhijit Dilip Powar
Comments