<?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>DEV Community: Sanjay Prakash</title>
    <description>The latest articles on DEV Community by Sanjay Prakash (@prakashsanjay).</description>
    <link>https://dev.to/prakashsanjay</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%2F904690%2F2a60123b-5160-41e6-ba67-960e8a6d1210.jpeg</url>
      <title>DEV Community: Sanjay Prakash</title>
      <link>https://dev.to/prakashsanjay</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/prakashsanjay"/>
    <language>en</language>
    <item>
      <title>Deploy My-Shopping-Mart Django App in AWS EC2</title>
      <dc:creator>Sanjay Prakash</dc:creator>
      <pubDate>Sun, 07 Aug 2022 18:33:40 +0000</pubDate>
      <link>https://dev.to/prakashsanjay/deploy-my-shopping-mart-django-app-in-aws-ec2-4p52</link>
      <guid>https://dev.to/prakashsanjay/deploy-my-shopping-mart-django-app-in-aws-ec2-4p52</guid>
      <description>&lt;h2&gt;
  
  
  Prequisite to Build &amp;amp; Deploy Django App in AWS EC2
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;OS Linux-Ubuntu (Windows ,Mac)&lt;/li&gt;
&lt;li&gt; &lt;a href="https://code.visualstudio.com/download"&gt; Visual Studio Code&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; &lt;a href="https://www.python.org/downloads/"&gt;Python&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; &lt;a href="https://sqlitebrowser.org/dl/"&gt; Django&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt; &lt;a href="https://getbootstrap.com/docs/5.2/getting-started/introduction/"&gt;Bootstrap&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Steps to run this Shopping-Mart Website in your local host&lt;/strong&gt;&lt;br&gt;
To get this repository, run the following command inside your git enabled terminal&lt;/p&gt;

&lt;p&gt;Step 1 $ git clone &lt;a href="https://bit.ly/3ddPqVu"&gt;https://bit.ly/3ddPqVu&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 2 $ python manage.py makemigrations&lt;/p&gt;

&lt;p&gt;This will create all the migrations file (database migrations) required to run this App.&lt;/p&gt;

&lt;p&gt;Step 3 Now, to apply this migrations run the following command&lt;/p&gt;

&lt;p&gt;$ python manage.py migrate&lt;/p&gt;

&lt;p&gt;Step 4&lt;/p&gt;

&lt;p&gt;One last step and then our ecoomerce Shopping Mart website will be live. We need to create an admin user to run this App. On the terminal, type the following command and provide username, password and email for the admin user&lt;/p&gt;

&lt;p&gt;$ python manage.py createsuperuser&lt;/p&gt;

&lt;p&gt;Step 5&lt;/p&gt;

&lt;p&gt;Now let's make the App live. We just need to start the server now and then we can start using our simple ecoomerce Shopping Mart. Start the server by following command&lt;/p&gt;

&lt;p&gt;$ python manage.py runserver&lt;/p&gt;

&lt;p&gt;Step 6&lt;/p&gt;

&lt;p&gt;Once the server is hosted, head over to &lt;a href="http://127.0.0.1:8000/products/"&gt;http://127.0.0.1:8000/products/&lt;/a&gt; for the App.That was pretty simple, right?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EaSdZSeL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182156472-9d88340d-b471-4462-bb16-e2dc0301aacc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EaSdZSeL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182156472-9d88340d-b471-4462-bb16-e2dc0301aacc.png" alt="Screenshot of website" width="880" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How To Deploy Django Application in AWS EC2&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Django comes with a development server that helps run Django projects in localhost. However, to make your web application available worldwide you will need a host machine. Amazon Web Services (AWS) provides EC2 (Elastic Compute Cloud) which is the most popular choice to host Django web applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating EC2 Instance With Ubuntu&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Step 1: Select EC2 From AWS Console and click lauch Instance&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--z-hzUSuh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182432809-b2c4a14f-a482-4cc9-97b9-8cfd0e014f89.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--z-hzUSuh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182432809-b2c4a14f-a482-4cc9-97b9-8cfd0e014f89.PNG" alt="Capture-ec2-2" width="880" height="197"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 2: Name your Instance and Select Ubuntu &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--o6HyiamR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182433167-3611baa9-7236-4854-9440-f29134f62408.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--o6HyiamR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182433167-3611baa9-7236-4854-9440-f29134f62408.PNG" alt="Capture-ec2-3" width="880" height="428"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 3: &lt;br&gt;
select instance type t2-micro (make sure free tier eligible) and create new key pair&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iyjrBh8u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182433574-8191cd03-e577-4c13-ac09-75e749b2744c.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iyjrBh8u--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182433574-8191cd03-e577-4c13-ac09-75e749b2744c.PNG" alt="Capture-ec2-4" width="880" height="463"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 4:&lt;/p&gt;

&lt;p&gt;Select launch Instance&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Qq81Yrr7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182440307-66b4b40d-a53d-46a3-bfc9-c9cfb179bd75.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Qq81Yrr7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182440307-66b4b40d-a53d-46a3-bfc9-c9cfb179bd75.PNG" alt="Capture-ec2-6" width="880" height="381"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 5:&lt;/p&gt;

&lt;p&gt;If Instance created Succesfully you can view instance&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CK2n62B_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182440371-c9e02e5b-a3da-42c8-ae1f-aae8f8a4a189.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CK2n62B_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182440371-c9e02e5b-a3da-42c8-ae1f-aae8f8a4a189.PNG" alt="Capture-ec2-7" width="880" height="381"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 6:&lt;/p&gt;

&lt;p&gt;Check instance is running and check status 2/2 passed&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RL0s1J5d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182440406-d67af11a-9951-4dd9-aae5-7860c8e67869.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RL0s1J5d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182440406-d67af11a-9951-4dd9-aae5-7860c8e67869.PNG" alt="Capture-ec2-8" width="880" height="142"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 7&lt;/p&gt;

&lt;p&gt;Now select security and edit inbound rule&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YrG0HXhe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182440992-29a1a169-7dc1-45ba-a99c-8043f08078ac.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YrG0HXhe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182440992-29a1a169-7dc1-45ba-a99c-8043f08078ac.PNG" alt="Capture-ec2-9" width="880" height="356"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Rk93ovZh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182441324-68cd4780-4356-43e7-b7d2-598b2ed90e09.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Rk93ovZh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182441324-68cd4780-4356-43e7-b7d2-598b2ed90e09.PNG" alt="Capture-ec2-10" width="880" height="256"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 8:&lt;/p&gt;

&lt;p&gt;In this Security setting add rules and edit inbound rule select custom TCP--Port range 8000 and source &lt;br&gt;
port 0.0.0.0 it will allow excess to anywhere click save rules&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0Ejiwj-_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182441867-7c75cee1-d55b-4d72-b854-905716d1db83.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0Ejiwj-_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182441867-7c75cee1-d55b-4d72-b854-905716d1db83.PNG" alt="Capture-new" width="880" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 9:&lt;/p&gt;

&lt;p&gt;Now go back to your EC2 page select your instance and right click connect&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--L75W2xby--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182442973-35df0f2f-ac7f-40bd-8135-733083559df1.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--L75W2xby--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182442973-35df0f2f-ac7f-40bd-8135-733083559df1.PNG" alt="Capture-13" width="880" height="612"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 10:&lt;/p&gt;

&lt;p&gt;Now open your ubuntu terminal &amp;amp; locate your private key file. The key used to launch this instance is YOUR_KEY_NAME.pem file&lt;/p&gt;

&lt;p&gt;in my case my pem file is in Download folder&lt;/p&gt;

&lt;p&gt;cd Downloads&lt;/p&gt;

&lt;p&gt;Run this command, to ensure your key is not publicly viewable.&lt;/p&gt;

&lt;p&gt;chmod 400 WRITE_YOUR_KEY_NAME.pem&lt;/p&gt;

&lt;p&gt;Connect to your instance using its Public DNS:&lt;/p&gt;

&lt;p&gt;sudo ec2-3-92-214-213.compute-1.amazonaws.com (Enter Your Public DNS)&lt;/p&gt;

&lt;p&gt;you will connect to AWS EC2 Ubuntu server&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--o9RZxj4x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182450782-e771faa2-be52-40c9-868c-858db27a3ce0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--o9RZxj4x--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182450782-e771faa2-be52-40c9-868c-858db27a3ce0.png" alt="Screenshot from 2022-08-03 00-13-12" width="880" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 11&lt;/p&gt;

&lt;p&gt;ls&lt;/p&gt;

&lt;p&gt;cd My_Shopping_Mart&lt;/p&gt;

&lt;p&gt;make sure git install into your ubuntu server before cloning github project type or copy this command in your terminal&lt;/p&gt;

&lt;p&gt;git clone &lt;a href="https://github.com/prakashsanjay/My-Shopping-Mart.git"&gt;https://github.com/prakashsanjay/My-Shopping-Mart.git&lt;/a&gt; and find your project by typing ls command you will fimd My_Shopping_mart&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7KYiOYVa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182451942-323f931c-cab5-4840-8f44-d47de16b71e6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7KYiOYVa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182451942-323f931c-cab5-4840-8f44-d47de16b71e6.png" alt="Screenshot from 2022-08-03 00-23-49" width="489" height="268"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 12 &lt;/p&gt;

&lt;p&gt;now go to settings.py file &lt;/p&gt;

&lt;p&gt;cd pyshop&lt;/p&gt;

&lt;p&gt;ls&lt;/p&gt;

&lt;p&gt;vim settings.py press enter&lt;/p&gt;

&lt;p&gt;make sure Python and Django both are installed in your AWS linux&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZhCgHL8W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182536572-b25bb7f8-fbaf-4236-98c4-648a10ff9803.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZhCgHL8W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182536572-b25bb7f8-fbaf-4236-98c4-648a10ff9803.PNG" alt="Capture-uu" width="880" height="262"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 13&lt;/p&gt;

&lt;p&gt;press i to insert&lt;br&gt;
than scrool down to Allowed Hosts [ ] empty box means your local host. now&lt;br&gt;
enter asterisk ['*'] it will allow any ip address or [you can enter your EC2 publiv IP ]&lt;br&gt;
press esc button &lt;br&gt;
:wq press enter&lt;br&gt;
you can also update it from vs code project folder locate settings.py file in pyshop folder &lt;br&gt;
you can change allowed host from there as well.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ma_fl5yd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182536735-730d1cb8-0285-4172-a4b1-a770e2c812d9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ma_fl5yd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182536735-730d1cb8-0285-4172-a4b1-a770e2c812d9.png" alt="Screenshot from 2022-08-03 11-26-13" width="880" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 14&lt;br&gt;
Run server &lt;/p&gt;

&lt;p&gt;Python3 manage.py runserver 0.0.0.0:8000&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DtMfqmv6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182540126-c67bd942-92d4-4329-a369-7442e2366f40.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DtMfqmv6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182540126-c67bd942-92d4-4329-a369-7442e2366f40.PNG" alt="CaptureLKJLKJ" width="880" height="160"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 15&lt;/p&gt;

&lt;p&gt;CTRL + CLICK 0.0.0.0:8000&lt;/p&gt;

&lt;p&gt;Once the server is hosted, head over to &lt;a href="http://0.0.0.0:8000/products/"&gt;http://0.0.0.0:8000/products/&lt;/a&gt; for the App.and our django app now running into AWS EC2 server&lt;br&gt;
That was also pretty simple, right?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--11-JrEcV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182540794-7c242249-fd96-4ccb-b1f7-cc6802eb3371.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--11-JrEcV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/182540794-7c242249-fd96-4ccb-b1f7-cc6802eb3371.png" alt="Screenshot from 2022-08-03 11-20-15" width="880" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;thanks &amp;amp; regards&lt;br&gt;
Happy Learning &lt;/p&gt;

</description>
      <category>aws</category>
      <category>beginners</category>
      <category>django</category>
      <category>cloudskills</category>
    </item>
    <item>
      <title>Steps To Deploy Django App in Amazon Elastic Beanstalk</title>
      <dc:creator>Sanjay Prakash</dc:creator>
      <pubDate>Sun, 07 Aug 2022 13:52:00 +0000</pubDate>
      <link>https://dev.to/prakashsanjay/steps-to-deploy-django-app-in-amazon-elastic-beanstalk-6ep</link>
      <guid>https://dev.to/prakashsanjay/steps-to-deploy-django-app-in-amazon-elastic-beanstalk-6ep</guid>
      <description>&lt;p&gt;Prerequisites To Deploy Django App in Amazon Elastic-Beanstalk&lt;/p&gt;

&lt;p&gt;Python 3.7 or later&lt;/p&gt;

&lt;p&gt;pip&lt;/p&gt;

&lt;p&gt;virtualenv&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install.html"&gt;awsebcli&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html"&gt;AWS CLI&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Set up a Python virtual environment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;create one folder where you can create a project &amp;amp; virtual environment&lt;/p&gt;

&lt;p&gt;cd Documents&lt;/p&gt;

&lt;p&gt;mkdir AWS-elasticBeanstalk&lt;/p&gt;

&lt;p&gt;now install the virtual environment in that folder&lt;/p&gt;

&lt;p&gt;sudo apt install -y python3-venv&lt;br&gt;
python3 -m venv myenv&lt;/p&gt;

&lt;p&gt;Activate virtual environment.&lt;/p&gt;

&lt;p&gt;source myenv/bin/activate&lt;/p&gt;

&lt;p&gt;Notice that the prefix now included (myenv). This lets you know that the environment is active.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--r2uqY3Jh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/183277219-52640b42-52db-42d7-849c-2fa180ed9c75.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--r2uqY3Jh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/183277219-52640b42-52db-42d7-849c-2fa180ed9c75.PNG" alt="Capture" width="880" height="147"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now install Django&lt;/p&gt;

&lt;p&gt;pip install django==4.0.6 &lt;/p&gt;

&lt;p&gt;To verify that Django is installed, enter the following.&lt;br&gt;
pip freeze&lt;br&gt;
Django==4.0.6&lt;/p&gt;

&lt;p&gt;now switch over to VS-Code &amp;amp; activate your virtual env&lt;/p&gt;

&lt;p&gt;Create a Django project in your virtual environment&lt;/p&gt;

&lt;p&gt;django-admin startproject ebdjango&lt;/p&gt;

&lt;p&gt;This command creates a standard Django site named ebdjango with the following directory structure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ntccyGaq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/183277346-cea36e2f-0670-4308-bfa6-84b13b2e9f01.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ntccyGaq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/183277346-cea36e2f-0670-4308-bfa6-84b13b2e9f01.PNG" alt="cap-2" width="880" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Run your Django site locally with manage.py runserver&lt;/p&gt;

&lt;p&gt;cd ebdjango&lt;/p&gt;

&lt;p&gt;python3 manage.py runserver&lt;/p&gt;

&lt;p&gt;In a web browser, open &lt;a href="http://127.0.0.1:8000/"&gt;http://127.0.0.1:8000/&lt;/a&gt; to view the site&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MZTahc8y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/183277130-e78cb34f-f8d7-47c7-bd1f-3d3976017f8b.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MZTahc8y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/183277130-e78cb34f-f8d7-47c7-bd1f-3d3976017f8b.PNG" alt="Capture-8000" width="880" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Configure your Django application for Elastic Beanstalk&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Activate your virtual environment in VS Code project workspace terminal &lt;br&gt;
enter command to see all your required dependency installed or not&lt;/p&gt;

&lt;p&gt;pip freeze &amp;gt; requirements.txt&lt;/p&gt;

&lt;p&gt;Next Create a directory named .ebextensions&lt;/p&gt;

&lt;p&gt;mkdir .ebextensions&lt;/p&gt;

&lt;p&gt;In the .ebextensions directory, add a configuration file named django.config with the following text.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2d0YXunr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/183279554-f5eafe89-ed8d-4abf-bc7e-fc7203cfb471.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2d0YXunr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/183279554-f5eafe89-ed8d-4abf-bc7e-fc7203cfb471.png" alt="Screenshot from 2022-08-06 23-31-48" width="880" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You've added everything you need to deploy your application on Elastic Beanstalk. Your project directory should now look like this&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--x9EL0nhW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/183277441-272458a6-0149-4417-87f9-b3a2bcb9ddee.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--x9EL0nhW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/183277441-272458a6-0149-4417-87f9-b3a2bcb9ddee.png" alt="Screenshot from 2022-08-06 23-34-46" width="368" height="577"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We didn't create git repo yet so do not worry if .gitignore not in your project folder&lt;/p&gt;

&lt;p&gt;Proceed to the IAM service on the AWS console and perform the steps below to create access keys&lt;/p&gt;

&lt;p&gt;IAM&lt;br&gt;
Users &lt;br&gt;
Existing User or Create New User&lt;br&gt;
Security Credentials&lt;br&gt;
Create Access Keys &lt;br&gt;
copy both your access keys &amp;amp; save it in your local PC&lt;/p&gt;

&lt;p&gt;After creating access keys enter below command in your terminal &amp;amp; follow the steps&lt;/p&gt;

&lt;p&gt;aws configure&lt;/p&gt;

&lt;p&gt;AWS Access Key ID [None]: ENTER_YOUR_ACCESS_KEY_ID&lt;/p&gt;

&lt;p&gt;AWS Secret Access Key [None]:ENTER_YOUR_SECRET_ACCESS_KEY&lt;/p&gt;

&lt;p&gt;Default region name [None]: ENTER_YOUR_DEFAULT_REGION&lt;/p&gt;

&lt;p&gt;Default output format [None]: json&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create an environment and deploy your Django application&lt;br&gt;
 Initialize your EB CLI repository with the eb init command.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;eb init -p python-3.8 django-app&lt;/p&gt;

&lt;p&gt;eb create django-env&lt;/p&gt;

&lt;p&gt;eb status&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WmmblggW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/183278253-80aa91ff-bf66-4996-b59b-141bcdbb0179.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WmmblggW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/183278253-80aa91ff-bf66-4996-b59b-141bcdbb0179.png" alt="Screenshot from 2022-08-06 23-52-02" width="880" height="170"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open the settings.py file in the ebdjango directory. Locate the ALLOWED_HOSTS setting, and then &lt;br&gt;
add your application's cname value save the file, and then deploy your application by running below commands&lt;/p&gt;

&lt;p&gt;eb deploy&lt;/p&gt;

&lt;p&gt;eb open&lt;/p&gt;

&lt;p&gt;If you see your app working, well done, you've deployed your first Django app with Elastic Beanstalk!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kuOzg-oF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/183276990-6f8eb85e-5c97-4a30-a56d-3dd4f0d935a0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kuOzg-oF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/183276990-6f8eb85e-5c97-4a30-a56d-3dd4f0d935a0.png" alt="Screenshot from 2022-08-06 23-54-17" width="880" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now proceed to AWS console &amp;amp; open Amazon Elastic Beanstock Service you can see app's Environment , Health , URL etc&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GtqLzitb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/183279236-7c97f437-20b9-4cff-afda-17cd03744842.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GtqLzitb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/183279236-7c97f437-20b9-4cff-afda-17cd03744842.PNG" alt="new" width="880" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qdWgjozQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/183279163-276a7a3e-d75a-4f36-89d0-41e987cf9a6a.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qdWgjozQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/23288656/183279163-276a7a3e-d75a-4f36-89d0-41e987cf9a6a.PNG" alt="Capture-eb" width="880" height="312"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links for further details on this deployment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html"&gt;AWS Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/lid-aICtbCI"&gt;Youtube Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks &amp;amp; Regards&lt;/p&gt;

&lt;p&gt;Happy Learning 😊 👍&lt;/p&gt;

</description>
      <category>aws</category>
      <category>elasticbeanstalk</category>
      <category>django</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
