<?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: Zakariyae Chmaili</title>
    <description>The latest articles on DEV Community by Zakariyae Chmaili (@zakariyaechmaili).</description>
    <link>https://dev.to/zakariyaechmaili</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%2F1175221%2F82e2cc72-3cc8-4d6b-b580-db3cbcc4c4e3.jpeg</url>
      <title>DEV Community: Zakariyae Chmaili</title>
      <link>https://dev.to/zakariyaechmaili</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zakariyaechmaili"/>
    <language>en</language>
    <item>
      <title>Deploying full stack application aws FOR FREE (laravel-angular-mongodb)</title>
      <dc:creator>Zakariyae Chmaili</dc:creator>
      <pubDate>Mon, 02 Oct 2023 17:17:24 +0000</pubDate>
      <link>https://dev.to/zakariyaechmaili/deploying-full-stack-application-aws-for-free-laravel-angular-mongodb-3dff</link>
      <guid>https://dev.to/zakariyaechmaili/deploying-full-stack-application-aws-for-free-laravel-angular-mongodb-3dff</guid>
      <description>&lt;h2&gt;
  
  
  In this post, I will provide a step-by-step guide on how to deploy your full stack application using Amazon Web Services (AWS) without paying a cent
&lt;/h2&gt;

&lt;p&gt;.&lt;/p&gt;

&lt;p&gt;Prerequisites:&lt;br&gt;
• A decent understanding of Laravel, Angular, and MongoDB.&lt;br&gt;
• PHP, Composer, Node.js installed.&lt;br&gt;
• A project built with angular Laravel and mongodb&lt;/p&gt;
&lt;h2&gt;
  
  
  SETTING UP MONGODB DATABASE
&lt;/h2&gt;

&lt;p&gt;Let’s begin by creating our database MongoDB, well since our goal is to fully deploy our application online, it's wise to use a hosted database. Fortunately, MongoDB offers a cloud database service known as MongoDB Atlas. Let's start by heading over to MongoDB Atlas and creating our database for free using the following &lt;a href="https://www.mongodb.com/atlas/database"&gt;URL&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---h87MEIG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/47tx2jzf0mtd5037np8r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---h87MEIG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/47tx2jzf0mtd5037np8r.png" alt="MongoDB Atlas interface." width="800" height="501"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click &lt;strong&gt;on try free&lt;/strong&gt;, and create your account for free(&lt;em&gt;or you can simply use your google account&lt;/em&gt;).&lt;br&gt;
Next, they will prompt you with a series of questions about their service. Don't worry too much about these questions, just provide your answers. &lt;br&gt;
Eventually, you will encounter this interface: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--u9kL_kAk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/udvp53g2ybwc3e8k755s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--u9kL_kAk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/udvp53g2ybwc3e8k755s.png" alt="Atlas interface for creating a new database.&amp;lt;br&amp;gt;
Image.&amp;lt;br&amp;gt;
" width="800" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Make sure to select the free plan. For the provider, choose AWS since we will be using Amazon Web Services to deploy our application. As for the region, simply select the one closest to your location. Lastly, give a name to your cluster. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;A cluster is essentially a group of MongoDB servers that collaborate to ensure your database remains scalable and secure, even in the event of server failures. &lt;br&gt;
Don't worry too much on the technical details of the cluster, just think of it as a technology that ensures your database runs smoothly and securely.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then click &lt;strong&gt;Create&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7HETgtBv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k18g6l9rbibvpoco7j1t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7HETgtBv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k18g6l9rbibvpoco7j1t.png" alt="Atlas interface for selecting the free plan and AWS as the provider.&amp;lt;br&amp;gt;
" width="800" height="567"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, you will encounter this interface. Choose the "Username and Password" option, indicating the authentication method for our database. Fill in your desired username and password, then click &lt;strong&gt;Create User&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--miSSLgNv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ltgypzd72wf0ihhr3r6c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--miSSLgNv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ltgypzd72wf0ihhr3r6c.png" alt="MongoDB Atlas interface for creating a new username and password." width="800" height="609"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now Simply click &lt;strong&gt;Finish and close&lt;/strong&gt;. We will revisit this address list later when setting up AWS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--G21ACsLg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7k3fbfiy4e0wegi9ruwt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--G21ACsLg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7k3fbfiy4e0wegi9ruwt.png" alt="MongoDB Atlas interface for completing the database setup.&amp;lt;br&amp;gt;
" width="800" height="426"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that our database has been successfully created, all we need to do is obtain the connection string, which we will use in Laravel to connect to the newly created database.&lt;br&gt;
And to do that Click on &lt;strong&gt;CONNECT&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tbUBX4fE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sf74v0itr2romtgui3sq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tbUBX4fE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sf74v0itr2romtgui3sq.png" alt="Image description" width="800" height="706"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now click on &lt;strong&gt;MongoDb for Vs Code&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ia6tBl8A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wbvuoyuawl0tb96c1bnk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ia6tBl8A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wbvuoyuawl0tb96c1bnk.png" alt="MongoDB Atlas connection string" width="800" height="839"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, here's our connection string. In my case, it is:&lt;br&gt;
&lt;code&gt;mongodb+srv://test:&amp;lt;password&amp;gt;@cluster0.zuehizv.mongodb.net/&lt;/code&gt;&lt;br&gt;
Yours should be similar, with your username and password included. Be sure to replace &lt;strong&gt;&lt;/strong&gt; with the password you created earlier, and simply now use it in your Laravel project.&lt;/p&gt;

&lt;p&gt;To ensure our application can interact with our newly hosted database, we need to make a minor adjustment in the MongoDB Atlas dashboard. Follow these steps:&lt;br&gt;
• In the MongoDB Atlas dashboard, navigate to "Network Access." You can find this option in the left-hand side menu.&lt;br&gt;
• Click on "ADD IP ADDRESS."&lt;br&gt;
• Add the address 0.0.0.0/0. This address essentially allows&lt;/p&gt;

&lt;p&gt;all possible IP addresses, including our localhost address. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Please note that this is not a secure practice&lt;br&gt;
 but it's used for testing our local application with the hosted database.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Later on, we will restrict access to a specific IP address for our backend.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rMAgBe6D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i84z9mjk2yph6iazrxau.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rMAgBe6D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i84z9mjk2yph6iazrxau.png" alt="AWS EC2 instance creation" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mKjbaNn3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7xhmjs1ajywh5s9df13c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mKjbaNn3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7xhmjs1ajywh5s9df13c.png" alt="AWS Elastic Beanstalk creation" width="800" height="496"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, to test our application, let's try migrating our tables to the database to ensure everything works as expected.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--K6L6X6jT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tmo8fj3aecwmf3dzj7lm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--K6L6X6jT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tmo8fj3aecwmf3dzj7lm.png" alt="Configuration for Elastic Beanstalk environment" width="800" height="460"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can observe, our tables have been successfully migrated to our newly created database.&lt;/p&gt;
&lt;h2&gt;
  
  
  DEPLOYING LARAVEL
&lt;/h2&gt;

&lt;p&gt;we are now ready to begin the process of deploying our backend on AWS using the Elastic Beanstalk service.&lt;br&gt;
To get started, the first step is to create an AWS account and activate it. You can activate your account by linking your credit card to your AWS account. Don't worry, they will not charge you anything. As mentioned before, this tutorial is completely free.&lt;br&gt;
Now head to aws website using this &lt;a href="//aws.amazon.com"&gt;url &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you have set up your account,We need create a key-pair before starting with deploying our application.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;key pair acts as a secure authentication mechanism, ensuring that only authorized users can access and manage AWS instances. so basically it’s a feature that allows us to connect to our instance in a secure way&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The reason we need to create a key pair in the first place is because we will have to connect to our deployed instance later on to make configuration changes.&lt;/p&gt;

&lt;p&gt;to do so navigate to the search bar and search for ec2 instance, and on your left side of the menu click on key pairs, then click on Create key pair&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vREfXcJP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yk9wkzlje723iqddoi1g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vREfXcJP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yk9wkzlje723iqddoi1g.png" alt="Image description" width="800" height="346"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7RiZyxsm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/07xk51hb62le6f8uzlb7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7RiZyxsm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/07xk51hb62le6f8uzlb7.png" alt="Creating a key pair" width="800" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Give a name to your key-pair and then select .pem key format and click on create key pair, a file will be downloaded, this is your key to use if you want to connect to your instance using ssh through your terminal but in this tutorial we going to use another way simpler way so don’t worry too much about the file, now let start by creating an instance where we going to deploy our back-end laravel&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lylciVeu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/euyu0jmj96dmsdu1km64.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lylciVeu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/euyu0jmj96dmsdu1km64.png" alt="Creating an IAM key pair" width="800" height="586"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;navigate to the search bar and search for "Elastic Beanstalk," as shown in the image below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1nX3k7RR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pdh811nhjdhj2mehi9bm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1nX3k7RR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pdh811nhjdhj2mehi9bm.png" alt="Image description" width="800" height="369"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now click on &lt;strong&gt;create environment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--w9TNZS47--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qdw7u66nu85cuhlhhvoo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--w9TNZS47--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qdw7u66nu85cuhlhhvoo.png" alt="Image description" width="800" height="362"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, provide your application's name, then make sure to select the appropriate platform, which in our case, is PHP. Also, specify the PHP version you want to use &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3yVe6V9Z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y7w2ypderz9eocijl8xf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3yVe6V9Z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y7w2ypderz9eocijl8xf.png" alt="Image description" width="732" height="1350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To upload your code, click on &lt;strong&gt;Upload your code&lt;/strong&gt;, then check &lt;strong&gt;Local file&lt;/strong&gt; and finally &lt;strong&gt;Choose file&lt;/strong&gt; but Before doing so, we should create a zip file of our application. Here's how:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1.    Navigate to your Laravel application's location.&lt;/li&gt;
&lt;li&gt;2.    Compress your application files into a single zip file.
Make sure not to place them inside a folder; your application files should be at the root level. You can also skip adding the &lt;strong&gt;vendor&lt;/strong&gt; folder to your zip file, it's not necessary to include it.
Then select your zip file then hit &lt;strong&gt;next&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Regarding the &lt;strong&gt;service access&lt;/strong&gt;, make sure to select the key-pair that we’ve created earlier and then hit "Next."&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;NOTE: If the EC2 instance profile are empty and not there by default, you will need to create a new IAM profile role.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7biOzmjt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2b0cil6yny2g2ao1l7eo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7biOzmjt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2b0cil6yny2g2ao1l7eo.png" alt="Image description" width="800" height="539"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;IAM (Identity and Access Management) roles helps you manage access to your AWS resources securely. creating IAM roles is often necessary to grant permissions for these services to access other AWS resources securely.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Here are the steps to create a new IAM (Identity and Access Management) role. If you already have one or AWS has provided you with default ones, you can skip these steps:&lt;/p&gt;
&lt;h2&gt;
  
  
  STEPS FOR CREATING A IAM ROLE
&lt;/h2&gt;

&lt;p&gt;Search for "IAM" in the search bar at the top of the AWS Management Console.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CVdviM6m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a32zays30nll1ij0g0iu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CVdviM6m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a32zays30nll1ij0g0iu.png" alt="Image description" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ensure that you select "Roles" on the left-hand side menu, and then click on the &lt;strong&gt;Create role&lt;/strong&gt; button&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EdH8m2iC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dfp2c5a9zoh9au2mqxo9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EdH8m2iC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dfp2c5a9zoh9au2mqxo9.png" alt="Image description" width="800" height="307"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Make sure you select "AWS service" since you'll use this role to access and control AWS services. In the "Use case" section, choose "EC2 (Elastic Compute Cloud)" because your instances will be hosted on EC2. Then click &lt;strong&gt;Next&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2IF2IrAd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ats82wkk6cgfgoxiakuq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2IF2IrAd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ats82wkk6cgfgoxiakuq.png" alt="Image description" width="800" height="409"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For permissions policies, select the following policies:&lt;br&gt;
• AWSElasticBeanstalkWebTier&lt;br&gt;
• AWSElasticBeanstalkWorkerTier&lt;br&gt;
• AWSElasticBeanstalkMulticontainerDocker&lt;br&gt;
Then click &lt;strong&gt;Next&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Jw-VtIZd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ckt7c4pcnqcx486uybq4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Jw-VtIZd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ckt7c4pcnqcx486uybq4.png" alt="Image description" width="800" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Provide a name for your role and an optional description. After that, click &lt;strong&gt;Create role&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--L13-oTQ4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ikhzk3l5ioc23lcodnb3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--L13-oTQ4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ikhzk3l5ioc23lcodnb3.png" alt="Image description" width="800" height="429"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that your role has been created, go back to Elastic Beanstalk and create a new environment. When you reach the "Service access" section, you should be able to see the role you created earlier. Select it to grant the necessary permissions for your Elastic Beanstalk environment&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Z8kyEejO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8kt8ugeq1stb13lwoxis.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Z8kyEejO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8kt8ugeq1stb13lwoxis.png" alt="Image description" width="800" height="561"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  THE END OF CREATING A NEW ROLE
&lt;/h2&gt;

&lt;p&gt;Don't forget to select the key-pair that we've created earlier too &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BjsQcTR7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xku583lhrduwx345roe6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BjsQcTR7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xku583lhrduwx345roe6.png" alt="Image description" width="800" height="557"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When selecting the VPC, you should normally find a default one that you can choose.&lt;br&gt;
Make sure to check the "Public IP address" option along with its subnets, and then click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nC25eKvs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kx5km98wmply3tr6uoph.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nC25eKvs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kx5km98wmply3tr6uoph.png" alt="Image description" width="800" height="613"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the instance configuration, there's no need to make any changes, just proceed by clicking &lt;strong&gt;Next&lt;/strong&gt;.&lt;br&gt;
In the following section, make sure to modify the document root. Set it to &lt;strong&gt;/public&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AxlacUJc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7hcwkxgjsdr5igtq0jyg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AxlacUJc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7hcwkxgjsdr5igtq0jyg.png" alt="Image description" width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Additionally, add an environment variable named EXTENSIONS with a value of mongodb. Ensure that EXTENSIONS is in uppercase letters, and then click &lt;strong&gt;Next&lt;/strong&gt;&lt;br&gt;
The environment is for telling the instance to install the mongoDB driver    &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OOGNOzPU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/etyf3z2u3r6n44ha64u4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OOGNOzPU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/etyf3z2u3r6n44ha64u4.png" alt="Image description" width="800" height="273"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this point, you should be all set. You can review your environment configuration, and if everything appears correct, click "Submit" to start creating your environment where your Laravel application will be hosted.&lt;br&gt;
Now, wait patiently until your environment is successfully created. You can verify its status by checking for a notification similar to the one shown in the image:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--W4OS5-6O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/macf9b6ytdxx223seufm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--W4OS5-6O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/macf9b6ytdxx223seufm.png" alt="Image description" width="800" height="546"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This notification indicates that our Laravel application has been successfully deployed. To access it online, you can click on the link provided under the "Domain" label.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HOOmg5Ns--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9bdsirsbbrd3rgt992zb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HOOmg5Ns--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9bdsirsbbrd3rgt992zb.png" alt="Image description" width="800" height="409"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you've noticed that your API routes are not working, don't worry, we can fix this with a minor change in our instance configuration.&lt;br&gt;
To make this change, you'll need to connect to your instance, and you can do this either via SSH or using "Instance Connect," a feature provided by AWS to simplify instance connections. In this tutorial, we'll use &lt;strong&gt;Instance Connect&lt;/strong&gt; Here's how:&lt;br&gt;
First, navigate to the EC2 service. You can find it by searching for &lt;strong&gt;EC2&lt;/strong&gt; in the search bar.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FDkkzNgU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/reirhez4jmazmv0jl95q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FDkkzNgU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/reirhez4jmazmv0jl95q.png" alt="Image description" width="800" height="346"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;navigate to the &lt;strong&gt;Instances&lt;/strong&gt; section. You can find it in the left-side menu. Here, you'll see the instance we created in the Elastic Beanstalk service, which is currently running.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_B0h5tL8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6b3pgtccz7iuxil9hlqq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_B0h5tL8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6b3pgtccz7iuxil9hlqq.png" alt="Image description" width="800" height="515"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on the instance ID of your instance to access its details. Then, you'll find an option labeled "Connect." Click on it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oD7cOfhh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y1kogcub0ukgmilrosam.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oD7cOfhh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y1kogcub0ukgmilrosam.png" alt="Image description" width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Simply click &lt;strong&gt;Connect&lt;/strong&gt; again, and a new page will pop up, establishing a connection to your instance. Wait until the connection is established, and then open the following file using your favorite Linux text editor (such as Vim or Nano). In this case, we'll use Nano. Execute the following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;nano /etc/nginx/conf.d/elasticbeanstalk/php.conf&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Copy the following block of code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;location / {
    try_files $uri $uri/ /index.php?$query_string;
    gzip_static on;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NLiwIcbK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v6lwxrgefcmkl12ms4ws.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NLiwIcbK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v6lwxrgefcmkl12ms4ws.png" alt="Image description" width="800" height="664"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To save the changes, press Ctrl + S, and then press Ctrl + X to exit. Now, execute the following command to reload the Nginx web server:&lt;br&gt;
&lt;code&gt;nginx -s reload&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Nginx is a web server that can handle HTTP requests. Our instance utilizes Nginx, which is similar in function to Apache if you've had experience with it before.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now your setup is complete, and your API routes should be working fine. You can access your deployed backend to confirm.&lt;br&gt;
Don't forget about the database IP access restriction we discussed; it's time to implement it now. Here are the steps:&lt;br&gt;
Go to your EC2 instance in the EC2 service, and copy the public IP address.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---krhuORH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5adeuebqakqrc0374wmi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---krhuORH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5adeuebqakqrc0374wmi.png" alt="Image description" width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Head to your MongoDB Atlas cluster, and select the "Network Access" section from the left-side menu. Delete the "0.0.0.0/0" address that we added earlier, and then add the public IP address of your instance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qPTId6_1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qrdsmklvum1cb40n963a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qPTId6_1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qrdsmklvum1cb40n963a.png" alt="Image description" width="800" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tceYNrY---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qa1goep187ecnuw5nnk0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tceYNrY---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qa1goep187ecnuw5nnk0.png" alt="Image description" width="800" height="509"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's it! Now, your MongoDB Atlas cluster should only be accessible from your instance, enhancing the security of your database.&lt;/p&gt;

&lt;h2&gt;
  
  
  DEPLOYING FRONT-END
&lt;/h2&gt;

&lt;p&gt;Next, let's begin deploying our front-end application built with Angular using the AWS S3 service. &lt;/p&gt;

&lt;p&gt;Before we start, there are a few important steps to follow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Ensure that you have updated your Angular application to use the deployed backend's domain URL.&lt;/li&gt;
&lt;li&gt; Build your Angular application using the following command:
&lt;code&gt;ng build&lt;/code&gt;
This command will generate a new folder inside your project directory called &lt;strong&gt;dist&lt;/strong&gt; which contains your built application. We do this so that we can upload our built application to the AWS S3 service.
Now, head to the search bar and search for &lt;strong&gt;S3&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--p--Qii0I--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2l2zme32l683efwdouut.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--p--Qii0I--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2l2zme32l683efwdouut.png" alt="Image description" width="800" height="346"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on &lt;strong&gt;create bucket&lt;/strong&gt; :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DF0Ax4hC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2ruuc27hcvr4h9apkqsy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DF0Ax4hC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2ruuc27hcvr4h9apkqsy.png" alt="Image description" width="800" height="487"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then give a name to your bucket and make sure to select ACLs enabled:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ezNaT9EX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/skuyfyp40ot0pexlz5w3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ezNaT9EX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/skuyfyp40ot0pexlz5w3.png" alt="Image description" width="800" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Uncheck &lt;strong&gt;Block all public access&lt;/strong&gt; and confirm the warning message. You don't need to change anything else at this point. Then, click &lt;strong&gt;Create bucket&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OJTycaEq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sjdeudsj7akjuk6dlnt3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OJTycaEq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sjdeudsj7akjuk6dlnt3.png" alt="Image description" width="800" height="547"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on the bucket you've just created, we still need to upload your built application to this bucket.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yTou7JNk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eso3icannijm25ndq25w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yTou7JNk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eso3icannijm25ndq25w.png" alt="Image description" width="800" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on &lt;strong&gt;Upload&lt;/strong&gt; to start uploading your built application.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CwPQvLpB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x5uav4t2wttmh7x5mk0o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CwPQvLpB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x5uav4t2wttmh7x5mk0o.png" alt="Image description" width="800" height="332"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on &lt;strong&gt;Add files&lt;/strong&gt; and navigate to your built application located in the **dist **folder that we generated. Select all the files within that folder and click Open.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IY8J4nzO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nii9kbc06oemu89lof24.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IY8J4nzO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nii9kbc06oemu89lof24.png" alt="Image description" width="800" height="530"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--evw1Mbgu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6h0vwxlw37xaxjfcv7ps.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--evw1Mbgu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6h0vwxlw37xaxjfcv7ps.png" alt="Image description" width="800" height="530"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Extend the Access control list (ACL) section, select &lt;strong&gt;Grant public-read access&lt;/strong&gt;, and confirm the warning message. Then, click on &lt;strong&gt;Upload&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Zl9vmpAA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/06jom0653bp5psrs72uq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Zl9vmpAA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/06jom0653bp5psrs72uq.png" alt="Image description" width="800" height="483"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Wait for your application files to finish uploading, and click &lt;strong&gt;Close&lt;/strong&gt; when it's done.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Rli9CiBa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/32bbygbyu1zbjwpyjufr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Rli9CiBa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/32bbygbyu1zbjwpyjufr.png" alt="Image description" width="800" height="181"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, go to the &lt;strong&gt;Properties&lt;/strong&gt; section and scroll all the way down to &lt;strong&gt;Static website hosting&lt;/strong&gt;. Click on &lt;strong&gt;Edit&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--c7IJU8IC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8zc0cmh9yxpxql6di45x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--c7IJU8IC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8zc0cmh9yxpxql6di45x.png" alt="Image description" width="800" height="295"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--d62bYA8N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7scps0icv4bq2qb75dvn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--d62bYA8N--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7scps0icv4bq2qb75dvn.png" alt="Image description" width="800" height="186"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enable static website hosting, and make sure to fill in &lt;strong&gt;Index document&lt;/strong&gt; with &lt;strong&gt;index.html&lt;/strong&gt;. Then, click &lt;strong&gt;Save changes&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WZFMXJo6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q0r2hhv6cq4d98r1v102.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WZFMXJo6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q0r2hhv6cq4d98r1v102.png" alt="Image description" width="800" height="571"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That should be it! Your application should now be ready. Scroll down to find the URL for your deployed application.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YzC_Q292--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lmksk8a921205e336gwr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YzC_Q292--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lmksk8a921205e336gwr.png" alt="Image description" width="800" height="226"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Wq1fArgI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6cekm2y3l05370to9710.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Wq1fArgI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6cekm2y3l05370to9710.png" alt="Image description" width="800" height="497"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In this tutorial documentation, we've walked through the process of deploying a full-stack application built with Angular, Laravel, and MongoDB Atlas on AWS (Amazon Web Services). Here are the key steps and components we covered:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Backend Deployment with AWS Elastic Beanstalk:
• Created a new Laravel project and configured it to work with MongoDB.
• Deployed the Laravel application using AWS Elastic Beanstalk.
• Made necessary configuration changes in the Nginx server to ensure API routes work correctly.
• Used AWS Identity and Access Management (IAM) roles and users for secure access to AWS resources.&lt;/li&gt;
&lt;li&gt; Frontend Deployment with AWS S3:
• Built the Angular application and prepared it for deployment.
• Created an S3 bucket to host the frontend files.
• Uploaded the built Angular application to the S3 bucket.
• Enabled static website hosting and configured the index document.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>aws</category>
      <category>fullstack</category>
      <category>mongodb</category>
      <category>laravel</category>
    </item>
  </channel>
</rss>
