<?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: Reyes, Kier Christian F.</title>
    <description>The latest articles on Forem by Reyes, Kier Christian F. (@kier_thing).</description>
    <link>https://forem.com/kier_thing</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%2F2528472%2Fe6661088-fb7f-4394-a589-4ff7f343089f.png</url>
      <title>Forem: Reyes, Kier Christian F.</title>
      <link>https://forem.com/kier_thing</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/kier_thing"/>
    <language>en</language>
    <item>
      <title>Deploying Node.js Application with AWS Elastic Beanstalk: A Beginner's Guide</title>
      <dc:creator>Reyes, Kier Christian F.</dc:creator>
      <pubDate>Fri, 20 Dec 2024 08:15:11 +0000</pubDate>
      <link>https://forem.com/kier_thing/deploying-nodejs-application-with-aws-elastic-beanstalk-a-beginners-guide-52n7</link>
      <guid>https://forem.com/kier_thing/deploying-nodejs-application-with-aws-elastic-beanstalk-a-beginners-guide-52n7</guid>
      <description>&lt;h2&gt;
  
  
  Why Elastic Beanstalk?
&lt;/h2&gt;

&lt;p&gt;We recently spent our semester learning Node.js frameworks, and I'm curious about deploying and managing applications in the cloud. Surprisingly, recently, I got into an AWS mentorship program, and we got this activity to create technical documentation while exploring AWS  service. It's overwhelming for me since there are many configuration options to consider, like monitoring, load balancers, the  EC2 instances and more, and by that, I'm finding a service that can handle the infrastructure complexity for me, and that's the thing I find out on AWS Elastic Beanstalk.  &lt;/p&gt;




&lt;h2&gt;
  
  
  What We'll Build
&lt;/h2&gt;

&lt;p&gt;In this, I'll show you how to deploy a simple Node.js Todo list application using AWS Elastic Beanstalk. I'll focus on the basics to get you started.&lt;/p&gt;




&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Make sure you have first:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An AWS account&lt;/li&gt;
&lt;li&gt;Git installed to clone the sample repository&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Getting Started:
&lt;/h2&gt;

&lt;p&gt;You can clone my sample Node.js Todo list application from here:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/KierFR-clean/todo_nodeapp.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;1.&lt;strong&gt;Create the EB Environment&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F4e3w330ojyej7p4s2qaq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F4e3w330ojyej7p4s2qaq.png" alt="Screenshot of AWS Elastic Beanstalk console showing deployment configuration" width="800" height="268"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Login to your AWS Console and find and select AWS Elastic Beanstalk.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Navigate for Elastic Beanstalk in the services search bar, and click &lt;strong&gt;Create Application&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;2.&lt;strong&gt;Configure your Application&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fs4jrtyzrqkgfpa1m08t7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fs4jrtyzrqkgfpa1m08t7.png" alt="Screenshot of AWS Elastic Beanstalk console showing deployment configuration" width="800" height="365"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Put the desired name for the application; choose this from the platform options.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F2is62hlppnwco4slzwtl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F2is62hlppnwco4slzwtl.png" alt="Screenshot of AWS Elastic Beanstalk console showing deployment configuration" width="800" height="410"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3.&lt;strong&gt;Upload Application&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can choose between a sample application(default) or importing a custom application. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fgp7rgr3mpl8vae2ypbho.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fgp7rgr3mpl8vae2ypbho.png" alt="Screenshot of AWS Elastic Beanstalk console showing deployment configuration" width="800" height="412"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If importing, create a zip folder of all files from the project and exclude &lt;em&gt;node_modules&lt;/em&gt; and others.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fpmpc2mmk7iq15z261jmp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fpmpc2mmk7iq15z261jmp.png" alt="Screenshot of AWS Elastic Beanstalk console showing deployment configuration" width="800" height="146"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On configuration presets, select &lt;strong&gt;Single Instance&lt;/strong&gt;, then click &lt;em&gt;Next&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;4.&lt;strong&gt;Configure service access&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Next, service access rights in the existing service roles will be configured. Select &lt;strong&gt;Use existing roles&lt;/strong&gt;; also, don't forget to choose an &lt;em&gt;EC2 instance profile&lt;/em&gt;. You can create and do it in the IAM console if there's none.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After that, you can &lt;em&gt;Skip to Review&lt;/em&gt; since we can modify these settings later through the Elastic Beanstalk console. &lt;/p&gt;

&lt;p&gt;5.&lt;strong&gt;Review Settings&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fe7oootgjwe99wqgq1i3w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fe7oootgjwe99wqgq1i3w.png" alt="Screenshot of AWS Elastic Beanstalk console showing deployment configuration" width="800" height="518"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Review all the settings, click submit, and wait for the environment creation. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After creation, you can access the environment using the domain link. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;If you encounter 404 errors, follow these steps to fix them.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Check the application logs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check also the static file paths.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ensure all needed files is included in the zip file.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Flnbjpflr846uh7nnrat0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Flnbjpflr846uh7nnrat0.png" alt="Screenshot of application" width="800" height="468"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is the application's look: It's a simple ToDo list app using in-memory storage only, and I plan to add a proper database while I explore more with AWS Elastic Beanstalk. &lt;/p&gt;




&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;AWS Elastic Beanstalk makes Node.js application deployment much simpler. Although I've only covered the basics, I hope this beginner's perspective helps you start your deployments. In future posts, I will improve this application with a proper database and explore more advanced production features.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This post is part of my learning journey with AWS. If you found it helpful, consider following me on my cloud development journey!🚀&lt;/em&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>beginners</category>
      <category>node</category>
      <category>cloud</category>
    </item>
  </channel>
</rss>
