<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Vin Bolisetti</title>
    <description>The latest articles on Forem by Vin Bolisetti (@ionvin).</description>
    <link>https://forem.com/ionvin</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F927296%2Ff35af8fc-8123-4c01-8b16-ce17e6e06e77.jpeg</url>
      <title>Forem: Vin Bolisetti</title>
      <link>https://forem.com/ionvin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ionvin"/>
    <language>en</language>
    <item>
      <title>AWS CI-CD for your Django app with AWS CodePipeline</title>
      <dc:creator>Vin Bolisetti</dc:creator>
      <pubDate>Sat, 01 Oct 2022 05:25:08 +0000</pubDate>
      <link>https://forem.com/ionvin/aws-devops-for-your-django-project-automate-ci-cd-with-aws-codecommit-github-in-simple-steps-3me</link>
      <guid>https://forem.com/ionvin/aws-devops-for-your-django-project-automate-ci-cd-with-aws-codecommit-github-in-simple-steps-3me</guid>
      <description>&lt;h1&gt;
  
  
  What is CI/CD pipeline?
&lt;/h1&gt;

&lt;p&gt;As a developer we would like to keep our entire focus on production instead of manually testing and deploying each time, that's where automating the process with CI/CD reduces the effort of deployment process, CI/CD refers to creating a code pipeline where code changes are committed, tested and then deployed without any manual interference. Basically, a developer can add a new feature to their codebase and push updates in an efficient, streamlined process.&lt;/p&gt;

&lt;h1&gt;
  
  
  What are some common CI/CD tools?
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Travis CI/CD&lt;/li&gt;
&lt;li&gt;Jenkins&lt;/li&gt;
&lt;li&gt;Buddy&lt;/li&gt;
&lt;li&gt;CircleCI&lt;/li&gt;
&lt;li&gt;Gitlab&lt;/li&gt;
&lt;li&gt;Codeship&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AWS Codepipeline&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This guide covers all steps needed for setting up your CI-CD workflow with AWS CodePipeline and GitHub under the hood. In this tutorial we will clone a sample django application from GitHub, configure CodeDeploy agent in EC2 and finally setup our CI-CD pipeline in AWS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh1vzt4wk2um4m0c8mn1n.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh1vzt4wk2um4m0c8mn1n.jpg" alt="Django-AWS CI-CD"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Link to sample django project:&lt;/em&gt; &lt;a href="https://github.com/vinclairvoyant/django-aws_cicd" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Table of Contents&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Clone GitHub repo&lt;/li&gt;
&lt;li&gt;Preparing Django project files&lt;/li&gt;
&lt;li&gt;Create yaml files to automate AWS CI-CD&lt;/li&gt;
&lt;li&gt;Create roles in AWS&lt;/li&gt;
&lt;li&gt;Launching EC2 instance for AWS CI-CD&lt;/li&gt;
&lt;li&gt;Configure AWS Code Deploy&lt;/li&gt;
&lt;li&gt;Configure AWS Code Pipeline&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;

1. Clone GitHub repo
&lt;/h3&gt;

&lt;p&gt;Open your chosen command-line interface and clone the repository with the below command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git clone git@github.com:vinclairvoyant/django-aws_cicd.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;

2. Preparing Django project files
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;For those who have cloned repo need not require to do any changes to the django files and can skip this step 2, but for others who are deploying their own django project shall continue with below steps:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you are deploying your own django application then make sure to allow all hosts by Changing ALLOWED_HOSTS in your django settings file as shown below. (Not recommended for security reasons, eventually we want to change this to an IP)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F709t1h3vhoyqswaa4ome.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F709t1h3vhoyqswaa4ome.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Make sure you have requirements.txt file for installing required dependencies.&lt;/p&gt;

&lt;h3&gt;

3. Create yaml files to automate AWS CI-CD
&lt;/h3&gt;

&lt;p&gt;For this basic tutorial we will create 3 files appspec.yml, before_install.sh &amp;amp; after_install.sh to automate the deployment process handled by AWS CI-CD.&lt;/p&gt;

&lt;p&gt;Folder/file structure:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc4kjwjg33b9vs224wqxt.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc4kjwjg33b9vs224wqxt.jpg" alt="Folder/file structure"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create appspec.yml file inside your root project directory where manage.py file is.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Step 1: Create CodeDeploy appspec.yml file&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;version: 0.0
os: linux
files:
  - source: /
    destination: /home/ubuntu/django-aws_cicd
hooks:
  BeforeInstall:
      - location: scripts/before_install.sh
  AfterInstall:
      - location: scripts/after_install.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Step 2: Create before_install.sh file&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/usr/bin/env bash

# clean codedeploy-agent files for a fresh install
sudo rm -rf /home/ubuntu/install

# install CodeDeploy agent
sudo apt-get -y update
sudo apt-get -y install ruby
sudo apt-get -y install wget
cd /home/ubuntu
wget https://aws-codedeploy-us-east-1.s3.amazonaws.com/latest/install
sudo chmod +x ./install 
sudo ./install auto

# update os &amp;amp; install python3
sudo apt-get update
sudo apt-get install -y python3 python3-dev python3-pip python3-venv
pip install --user --upgrade virtualenv

# delete app
sudo rm -rf /home/ubuntu/django-aws_cicd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;vi scripts/after_install.sh&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Step 3: Create after_install.sh file&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/usr/bin/env bash

# kill any servers that may be running in the background 
sudo pkill -f runserver

# kill frontend servers if you are deploying frontend
# sudo pkill -f tailwind
# sudo pkill -f node

cd /home/ubuntu/django-aws_cicd/

# activate virtual environment
python3 -m venv venv
source venv/bin/activate

install requirements.txt
pip install -r /home/ubuntu/django-aws_cicd/requirements.txt

# run server
screen -d -m python3 manage.py runserver 0:8000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before we start setting up AWS CI-CD we need to ensure all changes made locally inside django files are pushed to github.&lt;/p&gt;

&lt;h2&gt;

AWS CI-CD Configuration:
&lt;/h2&gt;

&lt;p&gt;Let's get started configuring AWS for CI-CD pipeline, for this we are going to be using 3 services mainly IAM roles, CodeDeploy &amp;amp; CodePipeline.&lt;/p&gt;

&lt;h3&gt;

4. Create roles in AWS
&lt;/h3&gt;

&lt;p&gt;We want to create 2 IAM roles:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AmazonEC2RoleforAWSCodeDeploy&lt;/strong&gt; provides EC2 access to S3 bucket to download revision:&lt;/p&gt;

&lt;p&gt;Step 1: Choose AWS Service &amp;amp; EC2 for Common use cases and click Next&lt;br&gt;
Step 2: Search &amp;amp; select &lt;code&gt;AmazonEC2RoleforAWSCodeDeploy&lt;/code&gt; and click Next&lt;br&gt;
Step 3: Provide a custom role name and click Create role, in my case the role name is &lt;em&gt;EC2CodeDeployRole&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AWSCodeDeployRole&lt;/strong&gt; for CodeDeploy service access to expand tags and interact with Auto Scaling on your behalf.&lt;/p&gt;

&lt;p&gt;Step 1: Choose AWS Service &amp;amp; in the 'Use cases for other AWS services' drop down choose CodeDeploy and click Next&lt;br&gt;
Step 2: &lt;code&gt;AWSCodeDeployRole&lt;/code&gt; will be the policy on display, click Next&lt;br&gt;
Step 3: Provide a custom role name and click Create role, in my case the role name is &lt;em&gt;CodeDeployRole&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;

5. Launching EC2 instance with AWS CodeDeploy configuration
&lt;/h3&gt;

&lt;p&gt;When launching a new EC2 instance ensure to add &lt;code&gt;AmazonEC2RoleforAWSCodeDeploy&lt;/code&gt; IAM role that we created and add user data for CodeDeploy agent installation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7hfztt07a2xb7i760fqt.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7hfztt07a2xb7i760fqt.jpg" alt="ec2_1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3narzdci06e4wzkrxhdi.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3narzdci06e4wzkrxhdi.jpg" alt="ec2_2"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/usr/bin/env bash
sudo apt-get -y update
sudo apt-get -y install ruby
sudo apt-get -y install wget
cd /home/ubuntu
wget https://aws-codedeploy-us-east-1.s3.amazonaws.com/latest/install
sudo chmod +x ./install 
sudo ./install auto

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You must provide a name to your instance if you had not provided when creating an instance, instance name will be required when creating CodeDeploy deployment group in upcoming steps.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx3om4u5nt9icmzi1teip.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx3om4u5nt9icmzi1teip.jpg" alt="ec2_3"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Configure Security group attached to EC2 to allow port 8000:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmnseaptlwoyvhlxnenff.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmnseaptlwoyvhlxnenff.jpg" alt="sg_1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you launch your instance wait for few minutes for status checks to be completed.&lt;/p&gt;

&lt;h3&gt;

6. Configure AWS Code Deploy
&lt;/h3&gt;

&lt;p&gt;For creating CodeDeploy we first need to create application and then create deployment group, steps below:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Step 1: Search for CodeDeploy service in AWS&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnupmb2g9107eh31hwskz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnupmb2g9107eh31hwskz.jpg" alt="cd_1"&gt;&lt;/a&gt;&lt;br&gt;
Step 2: On the left navigation panel open Deploy -&amp;gt; Select &lt;strong&gt;Applications&lt;/strong&gt; and then click on &lt;strong&gt;Create application&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjjw9den52zsaktl1crdi.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjjw9den52zsaktl1crdi.jpg" alt="cd_2"&gt;&lt;/a&gt;&lt;br&gt;
Step 3: Provide any application name of your choice, for Compute Platform choose &lt;strong&gt;EC2/On-premises&lt;/strong&gt; from the drop down and then click on &lt;strong&gt;Create application&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnutlo1dgemfy7cf0ve8v.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnutlo1dgemfy7cf0ve8v.jpg" alt="cd_3"&gt;&lt;/a&gt;&lt;br&gt;
Step 4: Will be redirected inside application that we just created, now click on &lt;strong&gt;Create deployment group&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6g1m9911arj20ij9n3ea.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6g1m9911arj20ij9n3ea.jpg" alt="cd_4"&gt;&lt;/a&gt;&lt;br&gt;
Step 5: Enter a deployment group name of your choice and then choose the service role that we created for CodeDeploy, in this tutorial we named it &lt;strong&gt;CodeDeployRole&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffl1vprlk8bbr7xxjzd2u.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffl1vprlk8bbr7xxjzd2u.jpg" alt="cd_5"&gt;&lt;/a&gt;&lt;br&gt;
Step 6: Environment configuration choose &lt;strong&gt;Amazon EC2 instances&lt;/strong&gt; and then add the ec2 instance we created, for &lt;strong&gt;Key&lt;/strong&gt; choose &lt;strong&gt;Name&lt;/strong&gt; and for &lt;strong&gt;Value&lt;/strong&gt; choose  in this tutorial we named the instance &lt;strong&gt;aws-cicd&lt;/strong&gt;.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foc6m9wpcshd6nl7mw1ce.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foc6m9wpcshd6nl7mw1ce.jpg" alt="cd_6"&gt;&lt;/a&gt;&lt;br&gt;
Step 7: Uncheck the &lt;strong&gt;Enable load balancing&lt;/strong&gt; and then click on &lt;strong&gt;Create deployment group&lt;/strong&gt;.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fboz2wyxi2k1ekrt9r295.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fboz2wyxi2k1ekrt9r295.jpg" alt="cd_7"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;

7. Configure AWS Code Pipeline
&lt;/h3&gt;

&lt;p&gt;CodePipeline brings everything together to build the final CI-CD&lt;/p&gt;

&lt;p&gt;Initial Step: On left navigation panel open &lt;strong&gt;Pipeline&lt;/strong&gt; then click on &lt;strong&gt;Pipelines&lt;/strong&gt; and finally click on &lt;strong&gt;Create Pipeline&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff2vx3j9gmnl7vekggrfb.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff2vx3j9gmnl7vekggrfb.jpg" alt="cp_1"&gt;&lt;/a&gt;&lt;br&gt;
Step 1: Enter a pipeline name of your choice, a role name gets automatically created for you, now click &lt;strong&gt;Next&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fagwb86ft7g585go8gxll.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fagwb86ft7g585go8gxll.jpg" alt="cp_2"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx1qsmhrbrvelm8vwzp1a.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx1qsmhrbrvelm8vwzp1a.jpg" alt="cp_3"&gt;&lt;/a&gt;&lt;br&gt;
Step 2: From the drop down choose &lt;strong&gt;GitHub (Version 2)&lt;/strong&gt;, click on &lt;strong&gt;Connect to GitHub&lt;/strong&gt;, once you have a successful connection choose Repository name, branch name and then click &lt;strong&gt;Next&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9wv2afz83c961dskztjr.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9wv2afz83c961dskztjr.jpg" alt="cp_4"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8jc5havj9j8k7x3enbvm.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8jc5havj9j8k7x3enbvm.jpg" alt="cp_5"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk2us7uh5iwqlqbzaas4h.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk2us7uh5iwqlqbzaas4h.jpg" alt="cp_6"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbl787l97d5gof5k4ka2a.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbl787l97d5gof5k4ka2a.jpg" alt="cp_7"&gt;&lt;/a&gt;&lt;br&gt;
Step 3:&lt;br&gt;
Build is out of scope for this tutorial, click on &lt;strong&gt;Skip build stage&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnzbns6hucr1hrh663q1n.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnzbns6hucr1hrh663q1n.jpg" alt="cp_8"&gt;&lt;/a&gt;&lt;br&gt;
Step 4: From &lt;strong&gt;Deploy provider&lt;/strong&gt; drop downs choose &lt;strong&gt;AWS CodeDeploy&lt;/strong&gt;, choose the application name and deployment group that we created from step 6 and then click &lt;strong&gt;Next&lt;/strong&gt;.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg0dpwdqvvdnoq0v9v0dt.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg0dpwdqvvdnoq0v9v0dt.jpg" alt="cp_9"&gt;&lt;/a&gt;&lt;br&gt;
Step 5: Review the page, scroll down to the bottom of the page and then click on &lt;strong&gt;Create pipeline&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj8kf99padeh4374b0ma1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj8kf99padeh4374b0ma1.jpg" alt="cp_10"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We have completed setting up and creating CI-CD pipeline on AWS, we can check the progress either by clicking on the &lt;strong&gt;Details&lt;/strong&gt; in &lt;strong&gt;Deploy&lt;/strong&gt; section or in the left panel &lt;strong&gt;Deployments&lt;/strong&gt;, then scroll down and click on &lt;strong&gt;View events&lt;/strong&gt; to see the status of deployment.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flzr9g2xkdmw5qx4pisi5.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flzr9g2xkdmw5qx4pisi5.jpg" alt="cp_12"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flbgd95own6vkq0g57ggx.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flbgd95own6vkq0g57ggx.jpg" alt="cp_13"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fenzicokbisakglxtuaoq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fenzicokbisakglxtuaoq.jpg" alt="cp_14"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Run Application:
&lt;/h2&gt;

&lt;p&gt;Go to EC2 instance, copy the &lt;strong&gt;Public IPv4 DNS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fml6s407ib997qbrkud8h.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fml6s407ib997qbrkud8h.jpg" alt="cp_15"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;navigate using this url:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://&amp;lt;Public IPv4 DNS&amp;gt;:8000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see this django app running...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjy3lzvsymi9rlo1l4ree.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjy3lzvsymi9rlo1l4ree.jpg" alt="success"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Contributors
&lt;/h2&gt;

</description>
      <category>django</category>
      <category>aws</category>
      <category>devops</category>
      <category>github</category>
    </item>
    <item>
      <title>AWS DevOps for your Django project: Automate your CI-CD with AWS CodeCommit &amp; GitHub in simple steps.</title>
      <dc:creator>Vin Bolisetti</dc:creator>
      <pubDate>Fri, 16 Sep 2022 13:50:25 +0000</pubDate>
      <link>https://forem.com/ionvin/aws-devops-for-your-django-project-automate-your-ci-cd-with-aws-codecommit-github-in-simple-steps-5a92</link>
      <guid>https://forem.com/ionvin/aws-devops-for-your-django-project-automate-your-ci-cd-with-aws-codecommit-github-in-simple-steps-5a92</guid>
      <description>&lt;p&gt;This guide covers all steps needed for setting up your CI-CD workflow with AWS CodeCommit and GitHub under the hood. We will clone a sample django application, configure CodeDeploy agent files and configure CI-CD pipeline in AWS.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Link to sample django project:&lt;/em&gt; &lt;a href="https://github.com/vinclairvoyant/django-aws_cicd" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Contents&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Clone GitHub repo (Optional)&lt;/li&gt;
&lt;li&gt;Preparing Django project files (Optional)&lt;/li&gt;
&lt;li&gt;Create yaml files to automate AWS CI-CD (Optional)&lt;/li&gt;
&lt;li&gt;Create roles in AWS&lt;/li&gt;
&lt;li&gt;Launching EC2 instance for AWS CI-CD&lt;/li&gt;
&lt;li&gt;Configure AWS Code Deploy&lt;/li&gt;
&lt;li&gt;Configure AWS Code Pipeline&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;1. Clone GitHub Repo&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open your chosen command-line interface&lt;/li&gt;
&lt;li&gt;Create new project folder --&amp;gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ mkdir folder_name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Go in to your project folder --&amp;gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; $ cd folder_name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Clone the remote repository --&amp;gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git clone git@github.com:vinclairvoyant/django-aws_cicd.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Preparing Django project files&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;For those who have cloned repo need not require any changes to the django files and can skip this step but for others who are deploying their own django project shall continue with below steps:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you are deploying your own django application then make sure to allow all hosts by Changing ALLOWED_HOSTS in your django settings file as shown below. (Not recommended for security reasons, eventually we want to change this to an IP)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F709t1h3vhoyqswaa4ome.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F709t1h3vhoyqswaa4ome.jpg" alt="Image description" width="800" height="290"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Make sure you have requirements.txt file for installing required dependencies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Create CodeDeploy yml files to automate AWS CI-CD&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For this basic tutorial we will create 3 files appspec.yml, before_install.sh &amp;amp; after_install.sh to automate the deployment process handled by AWS CI-CD.&lt;/p&gt;

&lt;p&gt;Folder/file structure:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc4kjwjg33b9vs224wqxt.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc4kjwjg33b9vs224wqxt.jpg" alt="Folder/file structure" width="155" height="219"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create appscpec.yml file inside your root project directory where manage.py file is.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Step 1: Create CodeDeploy appspec.yml file&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;version: 0.0
os: linux
files:
  - source: /
    destination: /home/ubuntu/django-aws_cicd
hooks:
  BeforeInstall:
      - location: scripts/before_install.sh
  AfterInstall:
      - location: scripts/after_install.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;mkdir scripts&lt;br&gt;
vi scripts/before_install.yml&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Step 2: Create before_install.yml file&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/usr/bin/env bash

# clean codedeploy-agent files for a fresh install
sudo rm -rf /home/ubuntu/install

# install CodeDeploy agent
sudo apt-get -y update
sudo apt-get -y install ruby
sudo apt-get -y install wget
cd /home/ubuntu
wget https://aws-codedeploy-us-east-1.s3.amazonaws.com/latest/install
sudo chmod +x ./install 
sudo ./install auto

# update os &amp;amp; install python3
sudo apt-get update
sudo apt-get install -y python3 python3-dev python3-pip python3-venv
pip install --user --upgrade virtualenv

# delete app
sudo rm -rf /home/ubuntu/django-aws_cicd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;vi scripts/after_install.yml&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Step 3: Create after_install.sh file&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/usr/bin/env bash

# kill any servers that may be running in the background 
sudo pkill -f runserver

# kill frontend servers if you are deploying frontend
# sudo pkill -f tailwind
# sudo pkill -f node

cd /home/ubuntu/django-aws_cicd/

# activate virtual environment
python3 -m venv venv
source venv/bin/activate

install requirements.txt
pip install -r /home/ubuntu/django-aws_cicd/requirements.txt

# run server
screen -d -m python3 manage.py runserver 0:8000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before we start setting up AWS CI-CD we need to ensure all changes made locally inside django files are pushed to github.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;AWS CI-CD Configuration:&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Let's get started configuring AWS for CI-CD pipeline, for this we are going to be using 3 services mainly IAM roles, CodeDeploy &amp;amp; CodePipeline.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Create roles in AWS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We want to create 2 IAM roles:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AmazonEC2RoleforAWSCodeDeploy&lt;/strong&gt; provides EC2 access to S3 bucket to download revision:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F54s252m638o8bdvvl53p.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F54s252m638o8bdvvl53p.jpg" alt="Image description" width="800" height="497"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbtddn0pxw4r7b27rcdv5.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbtddn0pxw4r7b27rcdv5.jpg" alt="Image description" width="800" height="437"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi90nnizvr9fcu6kat7ek.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi90nnizvr9fcu6kat7ek.jpg" alt="Image description" width="800" height="224"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feo0b47knme1iitkwti16.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feo0b47knme1iitkwti16.jpg" alt="Image description" width="388" height="101"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AWSCodeDeployRole&lt;/strong&gt; for CodeDeploy service access to expand tags and interact with Auto Scaling on your behalf.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq0jyy7q2x5a9vm0r316b.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq0jyy7q2x5a9vm0r316b.jpg" alt="2.1" width="800" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fop1hnex6cckkj3wq4agu.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fop1hnex6cckkj3wq4agu.jpg" alt="2.2" width="800" height="504"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9a236em424nvb40x1own.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9a236em424nvb40x1own.jpg" alt="2.3" width="800" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frm9zqs70gqq1ii8e982h.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frm9zqs70gqq1ii8e982h.jpg" alt="2.4" width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe19cah7wzs1k9y6pqtpi.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe19cah7wzs1k9y6pqtpi.jpg" alt="2.5" width="759" height="225"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fveja4dsalb1bzmfgtcdp.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fveja4dsalb1bzmfgtcdp.jpg" alt="2.6" width="800" height="412"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Launching EC2 instance for AWS CI-CD&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When launching a new EC2 instance ensure to add IAM &lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
