<?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: sipsdaoracle</title>
    <description>The latest articles on DEV Community by sipsdaoracle (@sipsdaoracle).</description>
    <link>https://dev.to/sipsdaoracle</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%2F1058193%2F48544b9c-ef97-48bc-b788-ed3e6af0f567.png</url>
      <title>DEV Community: sipsdaoracle</title>
      <link>https://dev.to/sipsdaoracle</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sipsdaoracle"/>
    <language>en</language>
    <item>
      <title>MAKING THE MOST OUT OF MY AWS SUMMIT EXPERIENCE</title>
      <dc:creator>sipsdaoracle</dc:creator>
      <pubDate>Mon, 02 Sep 2024 16:49:05 +0000</pubDate>
      <link>https://dev.to/sipsdaoracle/making-the-most-out-of-my-aws-summit-experience-560a</link>
      <guid>https://dev.to/sipsdaoracle/making-the-most-out-of-my-aws-summit-experience-560a</guid>
      <description>&lt;p&gt;August was an incredibly eventful month, and a standout moment for me was attending the AWS Summit in Johannesburg at the Sandton Convention Centre. Here’s a look back at my experience and some insights on how to make the most out of such events.&lt;/p&gt;

&lt;h2&gt;
  
  
  Arrival, Registration, and Breakfast
&lt;/h2&gt;

&lt;p&gt;I arrived at the venue bright and early, around 7:00 am. After registering and receiving some AWS swag, I found myself eagerly asking the event staff when we could start. By 8:00 am, the doors opened, and I enjoyed a hearty breakfast before diving into the exhibition hall.&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%2Fv9lfvsaucxj03qgy1q6l.png" 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%2Fv9lfvsaucxj03qgy1q6l.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Early Morning Sessions
&lt;/h2&gt;

&lt;p&gt;This was my first AWS Summit, and I wasn’t entirely sure what to expect, especially attending solo. Fortunately, Chiche, who had encouraged me to attend, provided valuable tips and helped me plan my day. I browsed the agenda on the AWS events app and selected presentations and workshops that piqued my interest. I was excited to see some of my favorite tech companies among the sponsors, seeing this as a prime opportunity to engage with industry leaders and explore new services.&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%2F71n1fmcrozbg22wya9bp.png" 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%2F71n1fmcrozbg22wya9bp.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While wandering the exhibition hall, I stumbled upon the AWS Partyrock hub. As someone who has created around 20 apps on AWS, I’ve encountered limitations and issues with the platform’s UI. This was a perfect opportunity to discuss my challenges and explore alternatives. I learned about Amazon Q, which has a more user-friendly interface and addresses the context quota issues I faced, especially with complex use cases.&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%2F886j88rr3g2qxq19mn9y.png" 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%2F886j88rr3g2qxq19mn9y.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  First Presentation: Women in Tech
&lt;/h2&gt;

&lt;p&gt;My first session was the Women in Tech presentation. As a woman in technology, it was both inspiring and empowering to hear from successful women who have navigated the industry, balanced personal and professional roles, and achieved significant milestones. Their stories of resilience and success were truly uplifting.&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%2F7i70vrzcnbfxqrsu22s9.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%2F7i70vrzcnbfxqrsu22s9.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Keynote and Main Presentations
&lt;/h2&gt;

&lt;p&gt;The keynote presentation provided deep insights into how AWS partners and organizations are leveraging AWS for innovation and transformation. We explored various use cases, including how the pharmaceutical industry used machine learning during the pandemic to accelerate vaccine development.&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%2F47m8uqmjkflp4t7cz02z.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%2F47m8uqmjkflp4t7cz02z.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We also learned from the Johannesburg Exchange about AWS’s role in enhancing and innovating the trading industry. &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%2Fypw5o7pns4k2pcnx5f0f.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%2Fypw5o7pns4k2pcnx5f0f.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Veliswa’s demonstration of Amazon Q and Amazon Bedrock highlighted how these tools are revolutionizing application development through generative AI. This session made me even more eager to transition from AWS Partyrock to Amazon Q.&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%2Flojyhyn5rzb9i7sceb1b.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%2Flojyhyn5rzb9i7sceb1b.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Breakout sessions | Activities | Networking
&lt;/h2&gt;

&lt;p&gt;One of the highlights of the summit was the chance to meet and learn from industry leaders such as Veliswa Boya. The event was a treasure trove of information, resources, and networking opportunities. I was pleasantly surprised by the number of people who reached out to pitch ideas and opportunities.  &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%2Fbi4uypvysgkz9etrszn4.png" 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%2Fbi4uypvysgkz9etrszn4.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It enabled me access to organizations as well the opportunity to engage on a level I would not have been able to. I took this time and asked all the questions I wanted to ask and networked with as many people who shared similar interest and goals&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%2Ffv3qlgfeyxmz0v5rickk.png" 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%2Ffv3qlgfeyxmz0v5rickk.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Engaging with brilliant minds like Cinga Nyangintsimbi from Batsamayi, who shared insights into the WoW initiative transforming taxi operations in the Eastern Cape, was particularly enlightening. I gained a deeper understanding of the development process, challenges faced, and the company’s future direction.&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%2F1l88xt6ka10cqv2jueaf.png" 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%2F1l88xt6ka10cqv2jueaf.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I concluded my day at the AWS Community Lounge, which featured sessions on topics ranging from AI to FinOps. Engaging in discussions with panelists such as Thoko Mathenjwa, Kudakwashe Manhodo, Rehan van der Merwe, and Mohammed Bangie provided valuable insights and connections across various AWS groups.&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%2Fb7j929q6eupkkgag20kk.png" 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%2Fb7j929q6eupkkgag20kk.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts and Tips
&lt;/h2&gt;

&lt;p&gt;To maximize your experience at such events, plan ahead and strategize. Be open to conversations and make connections with as many people as possible. Arrive early to avoid long lines and ensure your phone is fully charged with enough storage for documenting the day. Don’t be discouraged if you’re attending alone; put yourself out there and engage with others.&lt;/p&gt;

&lt;p&gt;A huge thank you to all the AWS partners, customers, sponsors, speakers, and the AWS community for making this event memorable. Special thanks to Chiche for convincing me to attend and helping me plan. It was an invaluable experience, and I’m already looking forward to the next AWS Summit.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>awssummit</category>
      <category>awsevents</category>
      <category>johannesburg</category>
    </item>
    <item>
      <title>What is Infrastructure as Code (IaC) and Why It's Transforming DevOps</title>
      <dc:creator>sipsdaoracle</dc:creator>
      <pubDate>Sat, 17 Aug 2024 21:59:50 +0000</pubDate>
      <link>https://dev.to/sipsdaoracle/what-is-infrastructure-as-code-iac-and-why-its-transforming-devops-5h4k</link>
      <guid>https://dev.to/sipsdaoracle/what-is-infrastructure-as-code-iac-and-why-its-transforming-devops-5h4k</guid>
      <description>&lt;p&gt;Hey there, tech enthusiasts! If you've ever found yourself drowning in a sea of server configurations, network setups, and cloud resources? Well, grab a life jacket because we're about to dive into the world of Infrastructure as Code (IaC) – the superhero of modern DevOps practices.&lt;/p&gt;

&lt;h2&gt;
  
  
  What exactly is Infrastructure as Code anyway?
&lt;/h2&gt;

&lt;p&gt;Picture this: instead of manually clicking through endless setup screens or running commands till your fingers hurt, you write a few lines of code, hit "run," and voila! Your entire infrastructure springs to life. That's IaC in a nutshell.&lt;/p&gt;

&lt;p&gt;Gone are the days of "Bob's the only one who knows how to set up the staging environment" or "Why does production look different from dev?" With IaC, your infrastructure becomes as manageable as your application code. Version control? Check. Reproducibility? You bet. Collaboration? Absolutely!&lt;/p&gt;

&lt;h2&gt;
  
  
  Why should you care?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;- Consistency is king:&lt;/strong&gt; No more "works on my machine" excuses. Every environment is a carbon copy.&lt;br&gt;
&lt;strong&gt;- Speed is your new best friend:&lt;/strong&gt; Deployment time goes from "grab a coffee" to "blink and you'll miss it."&lt;br&gt;
&lt;strong&gt;- Scaling is a breeze:&lt;/strong&gt; Need 10 more servers? No sweat. How about 100? Coming right up!&lt;br&gt;
&lt;strong&gt;- Save those dollars:&lt;/strong&gt; Efficient resource use means your wallet stays happier.&lt;br&gt;
&lt;strong&gt;- Sleep better at night:&lt;/strong&gt; Standardized setups mean fewer security headaches.&lt;/p&gt;

&lt;h2&gt;
  
  
  The cool kids of IaC
&lt;/h2&gt;

&lt;p&gt;There are quite a lot of tools out there to help you jump on the IaC bandwagon. AWS CloudFormation, Ansible, Puppet – they're all great. But let's talk about the popular kid in school: Terraform.&lt;/p&gt;

&lt;p&gt;Terraform: The Swiss Army knife of IaC&lt;br&gt;
The reason this tool is so popular is because of its flexibility, it works with practically any cloud provider, speaks a language that is easy to understand, and keeps track of your infrastructure. That's Terraform for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Here's how it works:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;You write code describing your infrastructure.&lt;/li&gt;
&lt;li&gt;Terraform says, "Cool, here's what I'm gonna do."&lt;/li&gt;
&lt;li&gt;You nod, and Terraform makes it happen.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It's like having a genie, but instead of three wishes, you get infinite infrastructure possibilities!&lt;/p&gt;

&lt;h2&gt;
  
  
  IaC and DevOps: A match made in tech heaven
&lt;/h2&gt;

&lt;p&gt;Remember the age-old battle between dev and ops? IaC is like couples therapy for your tech teams. Developers can spin up environments faster than you can say "agile," and ops folks can ensure everything's running smoothly without breaking a sweat.&lt;/p&gt;

&lt;p&gt;CI/CD pipelines? IaC slides right in there, making sure your infrastructure evolves just as fast as your code.&lt;/p&gt;

&lt;p&gt;It's not all rainbows and unicorns&lt;/p&gt;

&lt;p&gt;Let's keep it real – adopting IaC isn't always a walk in the park. There's a learning curve, and you might find yourself scratching your head over new concepts. And let's not forget about keeping those API keys and passwords safe in an automated world.&lt;/p&gt;

&lt;p&gt;But fear not! Start small, train your team, use version control religiously, and before you know it, you'll be an IaC ninja.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bottom line
&lt;/h2&gt;

&lt;p&gt;Infrastructure as Code isn't just some fancy tech jargon to throw around at meetups. It's a game-changer that's making life easier for DevOps teams everywhere. It's bringing the agility of software development to the world of infrastructure, and trust me, once you go IaC, you never go back.&lt;/p&gt;

&lt;p&gt;So, are you ready to code your infrastructure into existence? Trust me, your future self will thank you. &lt;/p&gt;

&lt;p&gt;Happy coding, and may the infrastructure odds be ever in your favor!&lt;/p&gt;

</description>
      <category>terraformchallenge</category>
      <category>devops</category>
      <category>terraform</category>
      <category>iac</category>
    </item>
    <item>
      <title>Automating Linux User Creation with a Bash Script</title>
      <dc:creator>sipsdaoracle</dc:creator>
      <pubDate>Wed, 03 Jul 2024 21:47:31 +0000</pubDate>
      <link>https://dev.to/sipsdaoracle/automating-linux-user-creation-with-a-bash-script-1fc2</link>
      <guid>https://dev.to/sipsdaoracle/automating-linux-user-creation-with-a-bash-script-1fc2</guid>
      <description>&lt;h2&gt;
  
  
  A Practical Script for SysOps Engineers
&lt;/h2&gt;

&lt;p&gt;In the SysOps engineer world, automation is key, especially for repetitive tasks that save valuable time and ensure consistency. As a SysOps engineer, knowing how to write robust and efficient scripts along with strong Linux skills, boosts productivity and gives you a better workflow.  This article will walk you through a bash script designed to automate the creation of Linux users.  &lt;/p&gt;

&lt;p&gt;The script creates users and groups as specified, sets up home directories with appropriate permissions and ownership, it generates random passwords for the users, and logs all actions to &lt;code&gt;/var/log/user_management.log&lt;/code&gt;. Additionally, it stores the generated passwords securely in &lt;code&gt;/var/secure/user_passwords.txt&lt;/code&gt;. and covers error handling for scenarios like existing users.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisite:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Bash shell environment.&lt;/li&gt;
&lt;li&gt;Text editor for editing the script and preparing the input file.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's have a look at our script which we will later use to accomplish this task, and break it down by a detailed explanation of each section:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="c"&gt;# Check if the script is run as root&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[[&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt; &lt;span class="nt"&gt;-u&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;-ne&lt;/span&gt; 0 &lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"You must run the script as root"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&amp;amp;2
    &lt;span class="nb"&gt;exit &lt;/span&gt;1
&lt;span class="k"&gt;fi&lt;/span&gt;

&lt;span class="c"&gt;# Check if a filename is provided&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[[&lt;/span&gt; &lt;span class="nt"&gt;-z&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Usage: &lt;/span&gt;&lt;span class="nv"&gt;$0&lt;/span&gt;&lt;span class="s2"&gt; &amp;lt;name-of-text-file&amp;gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&amp;amp;2
    &lt;span class="nb"&gt;exit &lt;/span&gt;1
&lt;span class="k"&gt;fi&lt;/span&gt;

&lt;span class="c"&gt;# File paths&lt;/span&gt;
&lt;span class="nv"&gt;LOG_FILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"/var/log/user_management.log"&lt;/span&gt;
&lt;span class="nv"&gt;PASSWORD_FILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"/var/secure/user_passwords.csv"&lt;/span&gt;

&lt;span class="c"&gt;# Ensure /var/secure storage for passwords&lt;/span&gt;
&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; /var/secure
&lt;span class="nb"&gt;touch&lt;/span&gt; &lt;span class="nv"&gt;$PASSWORD_FILE&lt;/span&gt;
&lt;span class="nb"&gt;chown &lt;/span&gt;root:root /var/secure
&lt;span class="nb"&gt;chmod &lt;/span&gt;700 /var/secure
&lt;span class="nb"&gt;chmod &lt;/span&gt;600 &lt;span class="nv"&gt;$PASSWORD_FILE&lt;/span&gt;

&lt;span class="c"&gt;# Function to log actions&lt;/span&gt;
log_action&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;date&lt;/span&gt; &lt;span class="s1"&gt;'+%Y-%m-%d %H:%M:%S'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt; - &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | &lt;span class="nb"&gt;tee&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; &lt;span class="nv"&gt;$LOG_FILE&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# Function to generate a random password&lt;/span&gt;
generate_password&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;tr&lt;/span&gt; &lt;span class="nt"&gt;-dc&lt;/span&gt; &lt;span class="s1"&gt;'A-Za-z0-9!@#$%^&amp;amp;*()_+=-[]{}|;:&amp;lt;&amp;gt;,.?/~'&lt;/span&gt; &amp;lt;/dev/urandom | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; 16
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# Function to hash passwords&lt;/span&gt;
hash_password&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | openssl passwd &lt;span class="nt"&gt;-6&lt;/span&gt; &lt;span class="nt"&gt;-stdin&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# Read the input file line by line&lt;/span&gt;
&lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="nv"&gt;IFS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;";"&lt;/span&gt; &lt;span class="nb"&gt;read&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; username &lt;span class="nb"&gt;groups&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
    &lt;span class="c"&gt;# Trim whitespace&lt;/span&gt;
    &lt;span class="nv"&gt;username&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | xargs&lt;span class="si"&gt;)&lt;/span&gt;
    &lt;span class="nb"&gt;groups&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$groups&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | xargs&lt;span class="si"&gt;)&lt;/span&gt;

    &lt;span class="c"&gt;# Skip empty lines&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[[&lt;/span&gt; &lt;span class="nt"&gt;-z&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
        continue
    fi&lt;/span&gt;

    &lt;span class="c"&gt;# Check if user already exists&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &amp;amp;&amp;gt;/dev/null&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
        &lt;/span&gt;log_action &lt;span class="s2"&gt;"User &lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt; already exists!"&lt;/span&gt;
        &lt;span class="k"&gt;continue
    fi&lt;/span&gt;

    &lt;span class="c"&gt;# Create personal group&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;groupadd &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
        &lt;/span&gt;log_action &lt;span class="s2"&gt;"Group &lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt; created successfully."&lt;/span&gt;
    &lt;span class="k"&gt;else
        &lt;/span&gt;log_action &lt;span class="s2"&gt;"Failed to create group &lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;."&lt;/span&gt;
        &lt;span class="k"&gt;continue
    fi&lt;/span&gt;

    &lt;span class="c"&gt;# Create user with a home directory and personal group&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;useradd &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; /bin/bash &lt;span class="nt"&gt;-g&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
        &lt;/span&gt;log_action &lt;span class="s2"&gt;"User &lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt; created successfully."&lt;/span&gt;
    &lt;span class="k"&gt;else
        &lt;/span&gt;log_action &lt;span class="s2"&gt;"Failed to create user &lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;."&lt;/span&gt;
        &lt;span class="k"&gt;continue
    fi&lt;/span&gt;

    &lt;span class="c"&gt;# Create groups and add user to them&lt;/span&gt;
    &lt;span class="nv"&gt;IFS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;','&lt;/span&gt; &lt;span class="nb"&gt;read&lt;/span&gt; &lt;span class="nt"&gt;-ra&lt;/span&gt; group_array &lt;span class="o"&gt;&amp;lt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$groups&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;for &lt;/span&gt;group &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;group_array&lt;/span&gt;&lt;span class="p"&gt;[@]&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
        &lt;/span&gt;&lt;span class="nv"&gt;group&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$group&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | xargs&lt;span class="si"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt; getent group &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$group&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null 2&amp;gt;&amp;amp;1&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
            if &lt;/span&gt;groupadd &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$group&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
                &lt;/span&gt;log_action &lt;span class="s2"&gt;"Group &lt;/span&gt;&lt;span class="nv"&gt;$group&lt;/span&gt;&lt;span class="s2"&gt; created."&lt;/span&gt;
            &lt;span class="k"&gt;else
                &lt;/span&gt;log_action &lt;span class="s2"&gt;"Failed to create group &lt;/span&gt;&lt;span class="nv"&gt;$group&lt;/span&gt;&lt;span class="s2"&gt;."&lt;/span&gt;
                &lt;span class="k"&gt;continue
            fi
        fi
        if &lt;/span&gt;usermod &lt;span class="nt"&gt;-aG&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$group&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
            &lt;/span&gt;log_action &lt;span class="s2"&gt;"User &lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt; added to group &lt;/span&gt;&lt;span class="nv"&gt;$group&lt;/span&gt;&lt;span class="s2"&gt;."&lt;/span&gt;
        &lt;span class="k"&gt;else
            &lt;/span&gt;log_action &lt;span class="s2"&gt;"Failed to add user &lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt; to group &lt;/span&gt;&lt;span class="nv"&gt;$group&lt;/span&gt;&lt;span class="s2"&gt;."&lt;/span&gt;
        &lt;span class="k"&gt;fi
    done&lt;/span&gt;

    &lt;span class="c"&gt;# Generate random password&lt;/span&gt;
    &lt;span class="nv"&gt;password&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;generate_password&lt;span class="si"&gt;)&lt;/span&gt;
    &lt;span class="nv"&gt;hashed_password&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;hash_password &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$password&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;usermod &lt;span class="nt"&gt;--password&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$hashed_password&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
        &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;,&lt;/span&gt;&lt;span class="nv"&gt;$password&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="nv"&gt;$PASSWORD_FILE&lt;/span&gt;
        log_action &lt;span class="s2"&gt;"Password set for user &lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;."&lt;/span&gt;
    &lt;span class="k"&gt;else
        &lt;/span&gt;log_action &lt;span class="s2"&gt;"Failed to set password for user &lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;."&lt;/span&gt;
    &lt;span class="k"&gt;fi&lt;/span&gt;

    &lt;span class="c"&gt;# Set home directory permissions&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; &lt;span class="s2"&gt;"/home/&lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;chown&lt;/span&gt; &lt;span class="nt"&gt;-R&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"/home/&lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;chmod &lt;/span&gt;755 &lt;span class="s2"&gt;"/home/&lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
        &lt;/span&gt;log_action &lt;span class="s2"&gt;"Home directory permissions set for user &lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;."&lt;/span&gt;
    &lt;span class="k"&gt;else
        &lt;/span&gt;log_action &lt;span class="s2"&gt;"Failed to set home directory permissions for user &lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;."&lt;/span&gt;
    &lt;span class="k"&gt;fi

done&lt;/span&gt; &amp;lt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

log_action &lt;span class="s2"&gt;"User creation process completed. Check &lt;/span&gt;&lt;span class="nv"&gt;$LOG_FILE&lt;/span&gt;&lt;span class="s2"&gt; for details."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Breaking Down the Script
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. Check for Root Privileges
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[[&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt; &lt;span class="nt"&gt;-u&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;-ne&lt;/span&gt; 0 &lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"You must run the script as root"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&amp;amp;2
    &lt;span class="nb"&gt;exit &lt;/span&gt;1
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This part checks if the script is run by the root user, this is because only the root user has permission to create and manage other users. If the script is not run as root, it will print an error message and exit.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Check for Filename Argument
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[[&lt;/span&gt; &lt;span class="nt"&gt;-z&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Usage: &lt;/span&gt;&lt;span class="nv"&gt;$0&lt;/span&gt;&lt;span class="s2"&gt; &amp;lt;name-of-text-file&amp;gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&amp;amp;2
    &lt;span class="nb"&gt;exit &lt;/span&gt;1
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This section will check if the user provided a filename as an argument when running the script. If no filename is found, it will print a usage message and exit.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Define File Paths
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;LOG_FILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"/var/log/user_management.log"&lt;/span&gt;
&lt;span class="nv"&gt;PASSWORD_FILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"/var/secure/user_passwords.csv"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These lines define the file paths for logging actions and storing passwords.&lt;/p&gt;

&lt;h4&gt;
  
  
  4. Ensure Secure Storage for Passwords
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; /var/secure
&lt;span class="nb"&gt;touch&lt;/span&gt; &lt;span class="nv"&gt;$PASSWORD_FILE&lt;/span&gt;
&lt;span class="nb"&gt;chown &lt;/span&gt;root:root /var/secure
&lt;span class="nb"&gt;chmod &lt;/span&gt;700 /var/secure
&lt;span class="nb"&gt;chmod &lt;/span&gt;600 &lt;span class="nv"&gt;$PASSWORD_FILE&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This part of the script ensures that the &lt;code&gt;/var/secure&lt;/code&gt; directory and the password file exist with appropriate permissions for secure storage. &lt;code&gt;mkdir -p&lt;/code&gt; creates the directory if it doesn't exist, &lt;code&gt;touch&lt;/code&gt; creates the password file, and &lt;code&gt;chmod&lt;/code&gt; and &lt;code&gt;chown&lt;/code&gt; set the permissions so only the root user can read and write to it.&lt;/p&gt;

&lt;h4&gt;
  
  
  5. Logging Function
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;log_action&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;date&lt;/span&gt; &lt;span class="s1"&gt;'+%Y-%m-%d %H:%M:%S'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt; - &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | &lt;span class="nb"&gt;tee&lt;/span&gt; &lt;span class="nt"&gt;-a&lt;/span&gt; &lt;span class="nv"&gt;$LOG_FILE&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;log_action&lt;/code&gt; function's job is to log messages with timestamps to the log file. It uses the &lt;code&gt;date&lt;/code&gt; command to add a timestamp to each log entry and &lt;code&gt;tee&lt;/code&gt; to append the message to the log file.&lt;/p&gt;

&lt;h4&gt;
  
  
  6. Password Generation Function
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;generate_password&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;tr&lt;/span&gt; &lt;span class="nt"&gt;-dc&lt;/span&gt; &lt;span class="s1"&gt;'A-Za-z0-9!@#$%^&amp;amp;*()_+=-[]{}|;:&amp;lt;&amp;gt;,.?/~'&lt;/span&gt; &amp;lt;/dev/urandom | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; 16
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;generate_password&lt;/code&gt; function generates a random password. &lt;code&gt;tr&lt;/code&gt; is used to filter characters from &lt;code&gt;/dev/urandom&lt;/code&gt; (a random number generator), and &lt;code&gt;head -c 16&lt;/code&gt; ensures the password is 16 characters long.&lt;/p&gt;

&lt;h4&gt;
  
  
  7. Password Hashing Function
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;hash_password&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | openssl passwd &lt;span class="nt"&gt;-6&lt;/span&gt; &lt;span class="nt"&gt;-stdin&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;hash_password&lt;/code&gt; function hashes the generated password using the &lt;code&gt;openssl&lt;/code&gt; command with SHA-512 encryption. This makes the password secure before storing it.&lt;/p&gt;

&lt;h4&gt;
  
  
  8. Read and Process Input File
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;while &lt;/span&gt;&lt;span class="nv"&gt;IFS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;";"&lt;/span&gt; &lt;span class="nb"&gt;read&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; username &lt;span class="nb"&gt;groups&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
    &lt;span class="c"&gt;# Trim whitespace&lt;/span&gt;
    &lt;span class="nv"&gt;username&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | xargs&lt;span class="si"&gt;)&lt;/span&gt;
    &lt;span class="nb"&gt;groups&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$groups&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; | xargs&lt;span class="si"&gt;)&lt;/span&gt;

    &lt;span class="c"&gt;# Skip empty lines&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[[&lt;/span&gt; &lt;span class="nt"&gt;-z&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
        continue
    fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This part reads the input file line by line, separating the username and groups by the semicolon (&lt;code&gt;;&lt;/code&gt;). It also trims any whitespace around the username and groups and skips any empty lines.&lt;/p&gt;

&lt;h4&gt;
  
  
  9. Check for Existing User
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &amp;amp;&amp;gt;/dev/null&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    &lt;/span&gt;log_action &lt;span class="s2"&gt;"User &lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt; already exists!"&lt;/span&gt;
    &lt;span class="k"&gt;continue
fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This checks if the user already exists. If so, it logs the action and skips to the next user.&lt;/p&gt;

&lt;h4&gt;
  
  
  10. Create Personal Group
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;if &lt;/span&gt;groupadd &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    &lt;/span&gt;log_action &lt;span class="s2"&gt;"Group &lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt; created successfully."&lt;/span&gt;
&lt;span class="k"&gt;else
    &lt;/span&gt;log_action &lt;span class="s2"&gt;"Failed to create group &lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;."&lt;/span&gt;
    &lt;span class="k"&gt;continue
fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a personal group with the same name as the username.&lt;/p&gt;

&lt;h4&gt;
  
  
  11. Create User
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;if &lt;/span&gt;useradd &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; /bin/bash &lt;span class="nt"&gt;-g&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    &lt;/span&gt;log_action &lt;span class="s2"&gt;"User &lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt; created successfully."&lt;/span&gt;
&lt;span class="k"&gt;else
    &lt;/span&gt;log_action &lt;span class="s2"&gt;"Failed to create user &lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="s2"&gt;."&lt;/span&gt;
    &lt;span class="k"&gt;continue
fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates the user with a home directory and assigns the personal group as the primary group.&lt;/p&gt;

&lt;h4&gt;
  
  
  12. Create and Assign Groups
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Copy code
&lt;span class="nv"&gt;IFS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;','&lt;/span&gt; &lt;span class="nb"&gt;read&lt;/span&gt; &lt;span class="nt"&gt;-ra&lt;/span&gt; group_array &lt;span class="o"&gt;&amp;lt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$groups&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;for &lt;/span&gt;group &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;group_array&lt;/span&gt;&lt;span class="p"&gt;[@]&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
    &lt;/span&gt;&lt;span class="nv"&gt;group&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How to use the script?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Save the script as create_users.sh in your preferred directory.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Prepare a text file (users_and_groups.txt) with one username per line, followed by groups separated by commas. For example: light;sudo,dev,www-data idimma;sudo mayowa;dev,www-data&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make the script executable with chmod +x create_users.sh.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run the script with the path to your text file as an argument: ./create_users.sh users_and_groups.txt.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;By following the structured steps outlined above, SysOps engineers can efficiently manage large numbers of user accounts and their associated groups, providing a robust solution for onboarding new developers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Acknowledgment
&lt;/h2&gt;

&lt;p&gt;This script was developed as part of the HNG Internship DevOps track. For more details on the program, visit the &lt;a href="https://hng.tech/internship"&gt;HNG Internship Website&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can learn more about the HNG Internship program &lt;a href="https://hng.tech/hire"&gt;here&lt;/a&gt; and &lt;a href="https://hng.tech/premium"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Thank you for reading.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>bash</category>
      <category>devops</category>
      <category>hng</category>
    </item>
    <item>
      <title>Setting up VPC, Public and Private Subnets, NAT, Internet Gateway, and Route Tables on AWS</title>
      <dc:creator>sipsdaoracle</dc:creator>
      <pubDate>Tue, 05 Mar 2024 19:15:43 +0000</pubDate>
      <link>https://dev.to/sipsdaoracle/setting-up-vpc-public-and-private-subnets-nat-internet-gateway-and-route-tables-on-aws-5gck</link>
      <guid>https://dev.to/sipsdaoracle/setting-up-vpc-public-and-private-subnets-nat-internet-gateway-and-route-tables-on-aws-5gck</guid>
      <description>&lt;p&gt;If you're new to Amazon Web Services (AWS) and looking to set up your Virtual Private Cloud (VPC) along with subnets, NAT, Internet Gateway, and route tables? In this guide, we'll take a look at some use cases and walk you through the process of setting up these services step by step, making it easy for you to understand and implement.&lt;/p&gt;

&lt;p&gt;In today's digital landscape, businesses and individuals alike are embracing the power and flexibility of cloud computing to drive innovation, streamline operations, and scale their applications. As the leading cloud services provider, Amazon Web Services (AWS) offers a comprehensive suite of tools and services to meet the diverse needs of cloud users worldwide. Whether you're a seasoned IT professional or a newcomer to the world of cloud computing, understanding the foundational elements of AWS is essential for success.&lt;/p&gt;

&lt;p&gt;Before we begin, have a look at the architecture diagram that illustrates how the VPC will be structured. These diagrams are crucial for visualizing our setup and guiding us towards our objectives. They also serve as a useful tool for testing whether the implemented configuration aligns with our desired outcomes. We'll also have a look at some use cases to help with better understanding.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Use Cases:
&lt;/h2&gt;

&lt;p&gt;To understand how these services all come together we'll break down how each component (&lt;strong&gt;subnets&lt;/strong&gt;, &lt;strong&gt;internet gateway&lt;/strong&gt;, &lt;strong&gt;route tables&lt;/strong&gt;, and &lt;strong&gt;NAT gateway&lt;/strong&gt;) into the following use cases:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web Application Hosting:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;-Internet Gateway:&lt;/strong&gt; Allows resources in public subnets to communicate with the internet, enabling access to web servers.&lt;br&gt;
&lt;strong&gt;-Subnets:&lt;/strong&gt; You'll have public subnets for hosting web servers accessible to users on the internet. Backend application servers and databases will be placed in private subnets for enhanced security.&lt;br&gt;
&lt;strong&gt;-Route Tables:&lt;/strong&gt; Routes traffic from public subnets to the internet gateway for outbound internet access.&lt;br&gt;
&lt;strong&gt;-NAT Gateway:&lt;/strong&gt; Not typically used in this scenario unless backend servers need to initiate outbound connections.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Big Data Processing:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;-Internet Gateway:&lt;/strong&gt; Used for data ingestion tools in public subnets to access external data sources or services.&lt;br&gt;
&lt;strong&gt;-Subnets:&lt;/strong&gt; Public subnets host data ingestion and analysis tools, while private subnets contain databases and processing clusters.&lt;br&gt;
&lt;strong&gt;-Route Tables:&lt;/strong&gt; Routes traffic between public and private subnets, allowing communication between data processing tools and databases.&lt;br&gt;
&lt;strong&gt;-NAT Gateway:&lt;/strong&gt; May be used in private subnets for outbound internet access if necessary.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multi-tier Architecture:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;-Internet Gateway:&lt;/strong&gt; Allows communication between front-end servers and the internet.&lt;br&gt;
&lt;strong&gt;-Subnets:&lt;/strong&gt; Front-end tier hosted in public subnet, middle-tier application servers in another public subnet, and back-end database tier in private subnet.&lt;br&gt;
&lt;strong&gt;-Route Tables:&lt;/strong&gt; Directs traffic between different tiers of the application, ensuring proper communication and security.&lt;br&gt;
&lt;strong&gt;-NAT Gateway:&lt;/strong&gt; Used for outbound internet access from the private subnet, if required for backend processes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hybrid Cloud Deployment:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;-Internet Gateway:&lt;/strong&gt; Facilitates connectivity between on-premises infrastructure and AWS resources.&lt;br&gt;
&lt;strong&gt;-Subnets:&lt;/strong&gt; Used to segment resources between on-premises infrastructure and AWS resources.&lt;br&gt;
&lt;strong&gt;-Route Tables:&lt;/strong&gt; Routes traffic between on-premises network and AWS VPC, ensuring proper communication.&lt;br&gt;
&lt;strong&gt;-NAT Gateway:&lt;/strong&gt; May be used for outbound internet access from private subnets within the VPC.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VPN Connectivity:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;-Internet Gateway:&lt;/strong&gt; Enables secure connection between corporate network and VPC.&lt;br&gt;
&lt;strong&gt;-Subnets:&lt;/strong&gt; Provide connectivity between a corporate network and VPC resources.&lt;br&gt;
&lt;strong&gt;-Route Tables:&lt;/strong&gt; Directs VPN traffic between a corporate network and VPC, ensuring secure communication.&lt;br&gt;
&lt;strong&gt;-NAT Gateway:&lt;/strong&gt; This may be used for outbound internet access from private subnets, depending on the VPN setup.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Containerized Workloads:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;-Internet Gateway:&lt;/strong&gt; Allows containers in public subnets to communicate with external services if needed.&lt;br&gt;
&lt;strong&gt;-Subnets:&lt;/strong&gt; Used to deploy containerized applications, with public or private subnets based on access requirements.&lt;br&gt;
&lt;strong&gt;-Route Tables:&lt;/strong&gt; Directs traffic between containers and other resources within the VPC, ensuring proper communication.&lt;br&gt;
&lt;strong&gt;-NAT Gateway:&lt;/strong&gt; May be used for outbound internet access from private subnets containing containers.&lt;/p&gt;

&lt;p&gt;Each component plays a crucial role in facilitating communication, security, and connectivity within the VPC environment, tailored to specific use cases and networking requirements.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why do we use a VPC?
&lt;/h2&gt;

&lt;p&gt;Think of a VPC as your own virtual data center in the AWS cloud. By creating a VPC, you're essentially defining the boundaries of your network environment. Just like in a physical data center, where you set up walls to separate different areas, creating a VPC allows you to isolate your resources logically. This step establishes the foundation of your network infrastructure in AWS. With a VPC, you can securely separate and manage your resources in the AWS cloud, much like you would with a network in a traditional on-premises environment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Create a VPC&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sign in to the AWS Management Console.&lt;/li&gt;
&lt;li&gt;Navigate to the VPC dashboard.&lt;/li&gt;
&lt;li&gt;Click on "Create VPC."&lt;/li&gt;
&lt;li&gt;Specify the CIDR block for your VPC. This defines the range of IP addresses for your VPC.&lt;/li&gt;
&lt;li&gt;Configure any additional settings as needed, such as DHCP options.&lt;/li&gt;
&lt;li&gt;Click on "Create VPC" to create your VPC.&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;&lt;em&gt;What you should see after creating:&lt;/em&gt;&lt;/p&gt;

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

&lt;h2&gt;
  
  
  What is an Internet Gateway used for?
&lt;/h2&gt;

&lt;p&gt;An Internet Gateway is like a bridge that connects your VPC to the internet. It allows resources within your public subnets to communicate with the outside world. Without an Internet Gateway, your public-facing resources wouldn't be reachable from the internet, much like a house without a driveway can't be accessed from the street.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Configuring Internet Gateway (IGW)&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Navigate to the "Internet Gateways" section in the VPC dashboard.&lt;/li&gt;
&lt;/ol&gt;

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

&lt;ol&gt;
&lt;li&gt;Click on "Create internet gateway."&lt;/li&gt;
&lt;li&gt;Attach the newly created internet gateway to your VPC by selecting the VPC and clicking on "Attach internet gateway."&lt;/li&gt;
&lt;/ol&gt;

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

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

&lt;h2&gt;
  
  
  Why do we use Subnets?
&lt;/h2&gt;

&lt;p&gt;Think of your VPC like a piece of land, and subnets as different parts of that land. Public subnets are like streets in a city where everyone can go, such as sidewalks where people walk freely. This is where you'd put things like web servers that need to be reached from the internet. Meanwhile, private subnets are more like gated communities, where only residents can enter. It's similar to neighborhoods where houses are private. Here, you'd deploy things like databases and application servers that don't need to be accessed directly from the internet, making them more secure by keeping them away from public access.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Setting up Public and Private Subnets&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;After creating the VPC, navigate to the "Subnets" section in the VPC dashboard.&lt;/li&gt;
&lt;/ol&gt;

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

&lt;ol&gt;
&lt;li&gt;Click on "Create subnet."&lt;/li&gt;
&lt;li&gt;Choose the VPC that you created earlier.&lt;/li&gt;
&lt;li&gt;Specify the CIDR block for the subnet.&lt;/li&gt;
&lt;li&gt;Choose the availability zone for the subnet.&lt;/li&gt;
&lt;/ol&gt;

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

&lt;ol&gt;
&lt;li&gt;Repeat the process to create both public and private subnets, ensuring that each subnet is associated with the correct route table.&lt;/li&gt;
&lt;/ol&gt;

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

&lt;h2&gt;
  
  
  Why do we need route tables?
&lt;/h2&gt;

&lt;p&gt;Route tables act as maps for directing traffic within your VPC. Just as you need road signs to navigate through a city, route tables determine where network traffic should go based on its destination. By configuring route tables, you're essentially telling AWS how to route traffic between different subnets and out to the internet. For example, you'll set up routes to direct traffic destined for the Internet to the Internet Gateway and routes to direct internal traffic between subnets.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Configure Route Tables&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to the "Route Tables" section in the VPC dashboard.&lt;/li&gt;
&lt;li&gt;Create a route table associated with your VPC.&lt;/li&gt;
&lt;/ol&gt;

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

&lt;ol&gt;
&lt;li&gt;Add a route to the internet gateway (0.0.0.0/0) to enable outbound internet access for resources in the public subnet.&lt;/li&gt;
&lt;/ol&gt;

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

&lt;ol&gt;
&lt;li&gt;Go to the Subnet Association tab and click on Edit Subnet Association&lt;/li&gt;
&lt;/ol&gt;

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

&lt;ol&gt;
&lt;li&gt;Select the route table associated with your subnet&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;This is how it should look like&lt;/p&gt;

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

&lt;ol&gt;
&lt;li&gt;Select the route table associated with your private subnet.&lt;/li&gt;
&lt;li&gt;Add routes for any services or resources that your private subnet needs to access, such as NAT Gateway or Virtual Private Gateway.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What is a NAT Gateway used for?
&lt;/h2&gt;

&lt;p&gt;Setting up a NAT Gateway for your private subnet is like having a translator. It lets devices in your private area talk to the internet without revealing their private details. Picture it as a receptionist at a gated community. They take requests from residents who want to send packages (network requests) outside, but they don't share where those residents live (private IP addresses) to keep things safe.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Set Up NAT Gateway (for Private Subnet)&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Navigate to the "NAT Gateways" section in the VPC dashboard.&lt;/li&gt;
&lt;li&gt;Click on "Create NAT Gateway."&lt;/li&gt;
&lt;li&gt;Choose the subnet for the NAT Gateway (typically the public subnet).&lt;/li&gt;
&lt;li&gt;Allocate an Elastic IP address for the NAT Gateway.&lt;/li&gt;
&lt;li&gt;Create the NAT Gateway.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Step 6: Update Route Tables for Private Subnet&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;After creating the NAT Gateway, update the route table associated with the private subnet.&lt;/li&gt;
&lt;li&gt;Add a route to the NAT Gateway (0.0.0.0/0) to enable outbound internet access for resources in the private subnet.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After setting up the NAT Gateway, you need to update the route tables associated with your private subnets to ensure that outbound traffic is directed through the NAT Gateway. This ensures that resources in your private subnets can access the internet securely via the NAT Gateway.&lt;/p&gt;

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

&lt;p&gt;Congratulations! You've successfully set up your VPC infrastructure on AWS, laying the foundation for your cloud projects. With a secure and scalable network environment in place, you're ready to deploy and manage your applications with confidence. Whether you're hosting web applications, processing big data, or extending your on-premises infrastructure to the cloud, a well-designed VPC ensures optimal performance, security, and connectivity. As you continue your journey in the cloud, remember to adhere to AWS best practices and explore additional services to unlock the full potential of the AWS platform. Happy cloud computing!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;P.S. Don't forget to delete all the resource instances we've created when you're done.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Creating a Continuous Delivery Pipeline in AWS (Hands-On)</title>
      <dc:creator>sipsdaoracle</dc:creator>
      <pubDate>Tue, 20 Feb 2024 17:09:25 +0000</pubDate>
      <link>https://dev.to/sipsdaoracle/creating-a-continuous-delivery-pipeline-in-aws-hands-on-24g2</link>
      <guid>https://dev.to/sipsdaoracle/creating-a-continuous-delivery-pipeline-in-aws-hands-on-24g2</guid>
      <description>&lt;p&gt;This week, I decided to dive deeper into the world of DevOps and SRE. As I was exploring various resources, I stumbled upon a hands-on AWS module focusing on Creating Continuous Delivery Pipelines. Recognizing the importance of this topic and its relevance in modern software development, I felt compelled to delve into it as a starting point for my journey.&lt;/p&gt;

&lt;p&gt;For those unfamiliar with the concept, continuous deployment is a method that enables automatic deployment of code revisions to a production environment, eliminating the need for manual approval from developers. This automation streamlines the software release process and enhances efficiency.&lt;/p&gt;

&lt;p&gt;Throughout this tutorial, I gained valuable insights into the creation of a continuous delivery pipeline. I learned how to set up a system that automatically deploys a sample web application whenever changes are made to the source code. This hands-on experience provided a practical understanding of the mechanisms behind continuous delivery and its significance in modern software development practices.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Everything done in this tutorial is Free Tier eligible.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisite&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An AWS account&lt;/li&gt;
&lt;li&gt;A GitHub account&lt;/li&gt;
&lt;li&gt;Git installed on your computer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What I learned from this:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Set up a &lt;strong&gt;GitHub repository&lt;/strong&gt; for the application &lt;br&gt;
code&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create an &lt;strong&gt;AWS Elastic Beanstalk&lt;/strong&gt; environment &lt;br&gt;
to deploy the application&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Configure &lt;strong&gt;AWS CodeBuild&lt;/strong&gt; to build the source &lt;br&gt;
code from &lt;strong&gt;GitHub&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use &lt;strong&gt;AWS CodePipeline&lt;/strong&gt; to set up the continuous &lt;br&gt;
delivery pipeline with source, build, and deploy &lt;br&gt;
stages&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Visual representation of End Architecture:&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Task 1: Set Up Git Repo
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Fork a GitHub repository to create a new one&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;navigate to &lt;strong&gt;GitHub&lt;/strong&gt; &lt;/li&gt;
&lt;li&gt;open the &lt;a href="https://github.com/aws-samples/aws-elastic-beanstalk-express-js-sample"&gt;aws-elastic-beanstalk-express-js-sample&lt;/a&gt; &lt;strong&gt;repo&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Choose the white &lt;strong&gt;Fork&lt;/strong&gt; button on the top right corner of the screen and choose &lt;strong&gt;Create a fork&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Store code and metadata in GitHub Repository(&lt;strong&gt;Push Code&lt;/strong&gt;)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Go to the repository, click on the green Code button and copy the url of the repo to clone it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open the terminal or Bash platform of your choice and enter the following command and paste the URL&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;git clone https://github.com/YOUR-USERNAME/aws-elastic-beanstalk-express-js-sample&lt;/code&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F46zft9qqon5cs8os67pk.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F46zft9qqon5cs8os67pk.PNG" alt="Image description" width="763" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In the new folder there is a file named app.js. Open app.js Change the message in line 5 to say something other than "Hello World!" and save the file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Go to the folder created with the name aws-elastic-beanstalk-express-js-sample/ and Commit the change with the following commands:&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;git add app.js&lt;br&gt;
git commit -m "change message"&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Push the changes by entering the following command:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;git push&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Test the changes&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;On Github under Repositories, select the one named aws-elastic-beanstalk-express-js-sample&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose the app.js file. The contents of the file, including your change, should be displayed&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;h2&gt;
  
  
  Task 2: Deploy a Web App
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Configure and create an AWS Elastic Beanstalk environment&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;open the AWS Elastic Beanstalk console and click on Create Application button&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;under the heading Application name, enter &lt;em&gt;DevOpsGettingStarted&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Select Node.js from the Platform dropdown menu.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Ensure that sample application is selected.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Click create application button&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Once you see the green checkmark, you have successfully created an AWS Elastic Beanstalk application and deployed it to an environment.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Test the web app &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To test your sample web app, select the link under the name of your environment.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;em&gt;Once the test has completed, a new browser tab should open with a webpage congratulating you!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;We will use this environment and our continuous delivery pipeline to deploy the Hello World! web app we created in the previous module.&lt;/p&gt;

&lt;h2&gt;
  
  
  Task 3:Create Build Project
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Create a build project with AWS CodeBuild&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open the AWS CodeBuild console and choose the 
create project button.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;In the Project name field, enter Build-DevOpsGettingStarted.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Select GitHub from the Source provider dropdown menu, Connect using OAuth and Choose the white Connect to GitHub button.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose the green Authorize aws-codesuite button and Enter your GitHub password.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose the Confirm button and Select Repository in my GitHub account.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enter aws-elastic-beanstalk-express-js-sample in the search field.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select the repo you forked &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Confirm that Managed Image is selected.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select Amazon Linux 2 from the Operating system dropdown menu.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select Standard from the Runtime(s) dropdown menu.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select aws/codebuild/amazonlinux2-x86_64-standard:3.0 from the Image dropdown menu.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Confirm that Always use the latest image for this runtime version is selected for Image version.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Confirm that Linux is selected for Environment type.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Confirm that New service role is selected.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Create a Buildspec file for the project&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select Insert build commands.&lt;/li&gt;
&lt;li&gt;Choose Switch to editor.&lt;/li&gt;
&lt;li&gt;Replace the Buildspec in the editor with the code 
below:
&lt;code&gt;version: 0.2
phases:
build:
    commands:
        - npm i --save
artifacts:
files:
    - '**/*'&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;em&gt;Create build project button. You should now see a dashboard for your project.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Test the CodeBuild Project &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose the Start build button to configure the build process&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Wait for the build to complete. After a couple minutes, a green checkmark and a Succeeded message confirming the build worked.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;We have created a build project on AWS CodeBuild to run the build process of the Hello World! web app from our GitHub repository. We will be using this build project as the build step in our continuous delivery pipeline.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Task 4: Create Continuous Delivery Pipeline
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Create a new Pipeline&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open the AWS CodePipeline console and click the Create pipeline button&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In the Pipeline name field, enter Pipeline-DevOpsGettingStarted.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Confirm that New service role is selected.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose the Next button.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Configure a source stage using your GitHub repo&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Select GitHub version 1 from the Source provider dropdown menu.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose Connect to GitHub button. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose Authorize aws-codesuite button.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;From the Repository dropdown, select the repo you created. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Select main from the branch dropdown menu.&lt;/li&gt;
&lt;li&gt;Confirm that GitHub webhooks is selected.&lt;/li&gt;
&lt;li&gt;Choose the Next button.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Configure the build stage&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;From the Build provider dropdown menu, select AWS &lt;br&gt;
CodeBuild.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Under Region confirm that the US West (Oregon) &lt;br&gt;
Region is selected.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select Build-DevOpsGettingStarted under Project &lt;br&gt;
name.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Choose the Next button.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Configure Deploy stage&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Select AWS Elastic Beanstalk from the Deploy &lt;br&gt;
provider dropdown menu.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Under Region, confirm that the US West (Oregon) &lt;br&gt;
Region is selected.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select the field under Application name and &lt;br&gt;
confirm you can see the app DevOpsGettingStarted &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select DevOpsGettingStarted-env from the &lt;br&gt;
Environment name textbox.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose the Next button. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;em&gt;You will now see a page where you can review the pipeline configuration.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose the Create pipeline button.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; Watch the pipeline execution&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Once the Deploy stage has switched to green and it says Succeeded, choose AWS Elastic Beanstalk. &lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3s75uvhcpbi5xxtl3zt6.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3s75uvhcpbi5xxtl3zt6.PNG" alt="Image description" width="800" height="409"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A new tab listing your AWS Elastic Beanstalk environments will open.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select the URL in the Devopsgettingstarted-env row. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;You should see a webpage with a white background and the text you included in your GitHub commit&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;We have created a continuous delivery pipeline on AWS CodePipeline with three stages: source, build, and deploy. &lt;br&gt;
The source code from the GitHub repo  is part of the source stage. That source code is then built by AWS CodeBuild in the build stage.&lt;br&gt;
Finally, the built code is deployed to the AWS Elastic Beanstalk environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Task 5:Finalize Pipeline and Test
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Create Review Stage in Pipeline&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Open the AWS CodePipeline console&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select Pipeline-DevOpsGettingStarted&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose the Edit button and click the Add stage button between the Build and Deploy stages.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;In the Stage name field, enter Review.&lt;/li&gt;
&lt;li&gt;Choose the Add stage button.&lt;/li&gt;
&lt;li&gt;In the Review stage, choose the Add action group 
button.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Under Action name, enter Manual_Review.&lt;/li&gt;
&lt;li&gt;From the Action provider dropdown, select Manual 
approval.&lt;/li&gt;
&lt;li&gt;Confirm that the optional fields have been left 
blank.
Choose the  Done button.
Choose the  Save button at the top of the page.
Choose the orange Save button to confirm the changes. You will now see your pipeline with four stages: Source, Build, Review, and Deploy.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;In summary, this tutorial has equipped you with the knowledge to set up a continuous delivery pipeline on AWS using services like CodePipeline, Elastic Beanstalk, and CodeBuild. By automating the deployment process for a sample web application, you've learned the benefits of continuous delivery, including faster release cycles and improved efficiency.&lt;/p&gt;

&lt;p&gt;As you delve deeper into DevOps and SRE practices, remember to regularly review and optimize your pipelines to meet evolving organizational needs. By embracing automation and continuous improvement, you'll be better positioned to respond to customer feedback and market demands effectively.&lt;/p&gt;

&lt;p&gt;I hope this tutorial has empowered you to embark on your continuous delivery journey with confidence. Happy coding and deploying!&lt;/p&gt;

</description>
      <category>devops</category>
      <category>continuousdelivery</category>
      <category>aws</category>
      <category>codepipeline</category>
    </item>
    <item>
      <title>Understanding Apache Spark and Hadoop Jobs</title>
      <dc:creator>sipsdaoracle</dc:creator>
      <pubDate>Tue, 20 Feb 2024 14:16:48 +0000</pubDate>
      <link>https://dev.to/sipsdaoracle/understanding-apache-spark-and-hadoop-jobs-4m59</link>
      <guid>https://dev.to/sipsdaoracle/understanding-apache-spark-and-hadoop-jobs-4m59</guid>
      <description>&lt;p&gt;In the fast-changing world of technology, where new tools and concepts pop up constantly, understanding terms like Spark and Hadoop can feel overwhelming. Even after trying to research them online, it's easy to feel lost in the details. That's why I decided to dive into the world of Apache Spark and Hadoop jobs. I created this blog to help beginners like myself grasp what they're all about and how they're used in real-world scenarios. &lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction:
&lt;/h2&gt;

&lt;p&gt;Apache Spark and Hadoop stand out as two powerhouse tools for efficiently managing massive datasets. Both Apache Spark and Hadoop are open-source frameworks meticulously engineered to distribute and process data across clusters of computers, providing scalable solutions to address the complexities associated with big data.&lt;/p&gt;

&lt;p&gt;Apache Spark excels in in-memory processing and real-time analytics, while Hadoop, with its distributed file system (HDFS) and MapReduce processing paradigm, specializes in batch processing and storage.  In this blog, we will explore the concepts of Apache Spark and Hadoop jobs, exploring their functionalities and use cases.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Understanding Apache Spark:
&lt;/h2&gt;

&lt;p&gt;Apache Spark is highly regarded for its impressive speed, flexibility, and ability to handle large amounts of data. At the core of Spark are its jobs, which serve as the fundamental components for processing data. These jobs are crucial for helping organizations gain valuable insights and drive innovation.&lt;br&gt;
With its rapid processing speed and ability to handle complex analytical tasks, Spark jobs have become indispensable tools for data professionals like engineers, analysts, and scientists.&lt;/p&gt;

&lt;p&gt;Here is an architecture diagram to illustrate Apache Spark:&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Use Case 1: Real-Time Analytics
&lt;/h2&gt;

&lt;p&gt;Apache Spark is good at quickly analyzing data as it comes in, which makes it perfect for doing things in real time, like giving personalized recommendations to customers on e-commerce websites. Imagine a company wanting to do this to make their website more enjoyable for users.&lt;/p&gt;

&lt;p&gt;Apache Spark can help by taking in all the data about what users are doing on the site as it happens, like clicks and views. Then, it can use that information to figure out what each user might like and suggest things they might want to buy. This helps make the website more fun for users and keeps them happy. Apache Spark is great at doing this fast, so businesses can keep up with all the action happening online and make sure their customers are happy.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Use Case 2: Machine Learning at Scale
&lt;/h2&gt;

&lt;p&gt;Spark's machine learning library, MLlib, enables scalable and distributed machine learning. Imagine a scenario where healthcare providers are faced with the daunting task of analyzing enormous volumes of patient data to foresee medical outcomes. In this scenario, Spark's machine learning library, MLlib, emerges as a lifesaver. MLlib enables healthcare professionals to tackle this challenge by employing scalable and distributed machine learning techniques. &lt;/p&gt;

&lt;p&gt;With Spark's assistance, they can efficiently process and analyze vast datasets, training sophisticated machine learning models to predict patient outcomes with precision. This transformative capability empowers healthcare providers to make informed decisions, guiding their medical strategies based on comprehensive insights gleaned from thorough data analysis. Thus, Spark's machine learning capabilities offer beginners an accessible and powerful tool to delve into the world of data-driven decision-making in healthcare and beyond.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Understanding Hadoop Jobs
&lt;/h2&gt;

&lt;p&gt;Imagine you have a gigantic pile of data, like all the information stored on the internet or every transaction made by a company over many years. It's so much data that a regular computer can't handle it all at once. That's where Hadoop comes in. Hadoop is like a super-powered tool that can manage and process this massive amount of information efficiently.&lt;/p&gt;

&lt;p&gt;Inside Hadoop, different kinds of jobs do specific tasks like bringing in data, sorting it out, and doing analysis or machine learning on it. These jobs are what makes Hadoop so useful for working with big data.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Hadoop's MapReduce
&lt;/h2&gt;

&lt;p&gt;Hadoop's MapReduce is a key component of the Apache Hadoop ecosystem, designed to handle batch processing tasks efficiently. It comprises two main phases: the Map phase, where data is divided into smaller chunks and processed in parallel across multiple nodes, and the Reduce phase, where the results from the Map phase are aggregated to produce the final output. This distributed computing paradigm enables Hadoop to tackle large-scale data processing tasks with ease.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Use Case 1: Batch Processing
&lt;/h2&gt;

&lt;p&gt;In the realm of big data, batch processing stands as a cornerstone for handling vast amounts of information efficiently. One of the most prominent tools in this domain is Hadoop's MapReduce, a framework renowned for its capability to process extensive datasets in a parallel and distributed manner.&lt;/p&gt;

&lt;p&gt;To demonstrate how Hadoop's MapReduce is applied in real-world scenarios, imagine a situation where a financial organization must analyze extensive transaction data to detect fraud and ensure compliance. Utilizing Hadoop's MapReduce, this data can be processed in parallel and distributed fashion overnight, facilitating thorough analysis and identification of potentially fraudulent activities. Through the scalability and fault tolerance capabilities of Hadoop, businesses can extract valuable insights from their data while meeting regulatory standards.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use Case 2: Data Warehousing
&lt;/h2&gt;

&lt;p&gt;In scenarios where businesses need to store and analyze structured and unstructured data for reporting and analysis, Hadoop provides a cost-effective solution. Retailers, for example, can use Hadoop to store and analyze sales data, customer interactions, and social media sentiments to gain a holistic view of customer behavior and preferences.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Integration of Apache Spark and Hadoop:
&lt;/h2&gt;

&lt;p&gt;Apache Spark and Hadoop are two powerful tools often used separately, but they can also work well together. Spark can take advantage of Hadoop's ability to store data across many computers, called distributed storage. This means Spark can read data from and write data to Hadoop's storage system, known as HDFS. By combining Spark's fast and easy-to-use features with Hadoop's strong storage and ability to handle big batches of data at once, organizations get the best of both worlds.&lt;/p&gt;

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

&lt;p&gt;In the world of big data, Apache Spark and Hadoop are like superheroes for organizations. They help companies handle and understand huge amounts of data. Whether a company needs to analyze data in real time, use machine learning to learn from lots of data, process data in big batches, or store data for later use, these frameworks have tools to do it all. By learning about what Apache Spark and Hadoop can do, businesses can unlock the potential of big data to come up with new ideas and make smart choices.&lt;/p&gt;

</description>
      <category>apachespark</category>
      <category>apachehadoop</category>
      <category>bigdataanalytics</category>
      <category>dataprocessing</category>
    </item>
    <item>
      <title>Build a JavaScript single-page application (SPA) (Microsoft Graph)</title>
      <dc:creator>sipsdaoracle</dc:creator>
      <pubDate>Thu, 25 May 2023 12:50:47 +0000</pubDate>
      <link>https://dev.to/sipsdaoracle/build-a-javascript-single-page-application-spa-microsoft-graph-349i</link>
      <guid>https://dev.to/sipsdaoracle/build-a-javascript-single-page-application-spa-microsoft-graph-349i</guid>
      <description>&lt;p&gt;Today, I'll be building a JavaScript Single Page Application that signs in users and calls Microsoft Graph, it does this by using authorization code flow with PKCE&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Here is what we will be covering throughout:&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Perform the OAuth 2.0 authorization code flow with PKCE&lt;/li&gt;
&lt;li&gt;Sign in personal Microsoft accounts as well as work and school accounts&lt;/li&gt;
&lt;li&gt;Acquire an access token&lt;/li&gt;
&lt;li&gt;Call Microsoft Graph or your own API that requires access tokens obtained from the Microsoft identity platform&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Node.js&lt;/strong&gt; for running a local webserver&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Visual Studio Code&lt;/strong&gt; or another code editor&lt;/li&gt;
&lt;li&gt; Microsoft Authentication Library for JavaScript v2.0&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How the app works:
&lt;/h2&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%2Fb1wtga3meq0aictejidk.png" 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%2Fb1wtga3meq0aictejidk.png" alt="Image description" width="800" height="357"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The application you create in this tutorial enables a JavaScript SPA to query the Microsoft Graph API by acquiring security tokens from the the Microsoft identity platform. In this scenario, after a user signs in, an access token is requested and added to HTTP requests in the authorization header. Token acquisition and renewal are handled by the Microsoft Authentication Library for JavaScript (MSAL.js).&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Microsoft Graph App
&lt;/h2&gt;

&lt;p&gt;Microsoft Graph App enables developers to create applications that integrate with Microsoft services, enabling seamless collaboration, data access, and functionality across various Microsoft platforms and services.&lt;/p&gt;

&lt;h2&gt;
  
  
  Task 1: Create your project
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;: Change to your project directory in your terminal and then run the following npm commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm init -y
npm install @azure/msal-browser
npm install express
npm install morgan
npm install yargs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt;: Create file named server.js and add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const express = require('express');
const morgan = require('morgan');
const path = require('path');

const DEFAULT_PORT = process.env.PORT || 3000;

// initialize express.
const app = express();

// Initialize variables.
let port = DEFAULT_PORT;

// Configure morgan module to log all requests.
app.use(morgan('dev'));

// Setup app folders.
app.use(express.static('app'));

// Set up a route for index.html
app.get('*', (req, res) =&amp;gt; {
    res.sendFile(path.join(__dirname + '/index.html'));
});

// Start the server.
app.listen(port);
console.log(`Listening on port ${port}...`);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Task 2: Create the SPA UI
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;:Create an app folder and in it create an &lt;strong&gt;index.html&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%2Fmi61cgsvlywncsj4n3q1.PNG" 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%2Fmi61cgsvlywncsj4n3q1.PNG" alt="Image description" width="261" height="380"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;In the index.html file, add the following code:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;

&amp;lt;head&amp;gt;
  &amp;lt;meta charset="UTF-8"&amp;gt;
  &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no"&amp;gt;
  &amp;lt;title&amp;gt;Microsoft identity platform&amp;lt;/title&amp;gt;
  &amp;lt;link rel="SHORTCUT ICON" href="./favicon.svg" type="image/x-icon"&amp;gt;

   &amp;lt;!-- msal.min.js can be used in the place of msal.js; included msal.js to make debug easy --&amp;gt;
  &amp;lt;script src="https://alcdn.msauth.net/browser/2.30.0/js/msal-browser.js"
    integrity="sha384-o4ufwq3oKqc7IoCcR08YtZXmgOljhTggRwxP2CLbSqeXGtitAxwYaUln/05nJjit"
    crossorigin="anonymous"&amp;gt;&amp;lt;/script&amp;gt;

  &amp;lt;!-- adding Bootstrap 4 for UI components  --&amp;gt;
  &amp;lt;link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
    integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"&amp;gt;
  &amp;lt;link rel="SHORTCUT ICON" href="https://c.s-microsoft.com/favicon.ico?v2" type="image/x-icon"&amp;gt;
&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;
  &amp;lt;nav class="navbar navbar-expand-lg navbar-dark bg-primary"&amp;gt;
    &amp;lt;a class="navbar-brand" href="/"&amp;gt;Microsoft identity platform&amp;lt;/a&amp;gt;
    &amp;lt;div class="btn-group ml-auto dropleft"&amp;gt;
      &amp;lt;button type="button" id="SignIn" class="btn btn-secondary" onclick="signIn()"&amp;gt;
        Sign In
      &amp;lt;/button&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/nav&amp;gt;
  &amp;lt;br&amp;gt;
  &amp;lt;h5 class="card-header text-center"&amp;gt;Vanilla JavaScript SPA calling MS Graph API with MSAL.js&amp;lt;/h5&amp;gt;
  &amp;lt;br&amp;gt;
  &amp;lt;div class="row" style="margin:auto"&amp;gt;
    &amp;lt;div id="card-div" class="col-md-3" style="display:none"&amp;gt;
      &amp;lt;div class="card text-center"&amp;gt;
        &amp;lt;div class="card-body"&amp;gt;
          &amp;lt;h5 class="card-title" id="WelcomeMessage"&amp;gt;Please sign-in to see your profile and read your mails&amp;lt;/h5&amp;gt;
          &amp;lt;div id="profile-div"&amp;gt;&amp;lt;/div&amp;gt;
          &amp;lt;br&amp;gt;
          &amp;lt;br&amp;gt;
          &amp;lt;button class="btn btn-primary" id="seeProfile" onclick="seeProfile()"&amp;gt;See Profile&amp;lt;/button&amp;gt;
          &amp;lt;br&amp;gt;
          &amp;lt;br&amp;gt;
          &amp;lt;button class="btn btn-primary" id="readMail" onclick="readMail()"&amp;gt;Read Mails&amp;lt;/button&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;br&amp;gt;
    &amp;lt;br&amp;gt;
    &amp;lt;div class="col-md-4"&amp;gt;
      &amp;lt;div class="list-group" id="list-tab" role="tablist"&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;div class="col-md-5"&amp;gt;
      &amp;lt;div class="tab-content" id="nav-tabContent"&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
  &amp;lt;br&amp;gt;
  &amp;lt;br&amp;gt;

  &amp;lt;!-- importing bootstrap.js and supporting js libraries --&amp;gt;
  &amp;lt;script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
    integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
    crossorigin="anonymous"&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
    integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
    crossorigin="anonymous"&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
    integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
    crossorigin="anonymous"&amp;gt;&amp;lt;/script&amp;gt;

  &amp;lt;!-- importing app scripts (load order is important) --&amp;gt;
  &amp;lt;script type="text/javascript" src="./authConfig.js"&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;script type="text/javascript" src="./graphConfig.js"&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;script type="text/javascript" src="./ui.js"&amp;gt;&amp;lt;/script&amp;gt;

  &amp;lt;!-- &amp;lt;script type="text/javascript" src="./authRedirect.js"&amp;gt;&amp;lt;/script&amp;gt;   --&amp;gt;
  &amp;lt;!-- uncomment the above line and comment the line below if you would like to use the redirect flow --&amp;gt;
  &amp;lt;script type="text/javascript" src="./authPopup.js"&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;script type="text/javascript" src="./graph.js"&amp;gt;&amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Create a file named &lt;strong&gt;ui.js&lt;/strong&gt; in the app folder&lt;/p&gt;

&lt;p&gt;Add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Select DOM elements to work with
const welcomeDiv = document.getElementById("WelcomeMessage");
const signInButton = document.getElementById("SignIn");
const cardDiv = document.getElementById("card-div");
const mailButton = document.getElementById("readMail");
const profileButton = document.getElementById("seeProfile");
const profileDiv = document.getElementById("profile-div");

function showWelcomeMessage(username) {
    // Reconfiguring DOM elements
    cardDiv.style.display = 'initial';
    welcomeDiv.innerHTML = `Welcome ${username}`;
    signInButton.setAttribute("onclick", "signOut();");
    signInButton.setAttribute('class', "btn btn-success")
    signInButton.innerHTML = "Sign Out";
}

function updateUI(data, endpoint) {
    console.log('Graph API responded at: ' + new Date().toString());

    if (endpoint === graphConfig.graphMeEndpoint) {
        profileDiv.innerHTML = ''
        const title = document.createElement('p');
        title.innerHTML = "&amp;lt;strong&amp;gt;Title: &amp;lt;/strong&amp;gt;" + data.jobTitle;
        const email = document.createElement('p');
        email.innerHTML = "&amp;lt;strong&amp;gt;Mail: &amp;lt;/strong&amp;gt;" + data.mail;
        const phone = document.createElement('p');
        phone.innerHTML = "&amp;lt;strong&amp;gt;Phone: &amp;lt;/strong&amp;gt;" + data.businessPhones[0];
        const address = document.createElement('p');
        address.innerHTML = "&amp;lt;strong&amp;gt;Location: &amp;lt;/strong&amp;gt;" + data.officeLocation;
        profileDiv.appendChild(title);
        profileDiv.appendChild(email);
        profileDiv.appendChild(phone);
        profileDiv.appendChild(address);

    } else if (endpoint === graphConfig.graphMailEndpoint) {
        if (!data.value) {
            alert("You do not have a mailbox!")
        } else if (data.value.length &amp;lt; 1) {
            alert("Your mailbox is empty!")
        } else {
            const tabContent = document.getElementById("nav-tabContent");
            const tabList = document.getElementById("list-tab");
            tabList.innerHTML = ''; // clear tabList at each readMail call

            data.value.map((d, i) =&amp;gt; {
                // Keeping it simple
                if (i &amp;lt; 10) {
                    const listItem = document.createElement("a");
                    listItem.setAttribute("class", "list-group-item list-group-item-action")
                    listItem.setAttribute("id", "list" + i + "list")
                    listItem.setAttribute("data-toggle", "list")
                    listItem.setAttribute("href", "#list" + i)
                    listItem.setAttribute("role", "tab")
                    listItem.setAttribute("aria-controls", i)
                    listItem.innerHTML = d.subject;
                    tabList.appendChild(listItem)

                    const contentItem = document.createElement("div");
                    contentItem.setAttribute("class", "tab-pane fade")
                    contentItem.setAttribute("id", "list" + i)
                    contentItem.setAttribute("role", "tabpanel")
                    contentItem.setAttribute("aria-labelledby", "list" + i + "list")
                    contentItem.innerHTML = "&amp;lt;strong&amp;gt; from: " + d.from.emailAddress.address + "&amp;lt;/strong&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;" + d.bodyPreview + "...";
                    tabContent.appendChild(contentItem);
                }
            });
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What is the DOM?&lt;/strong&gt;&lt;br&gt;
The DOM is a World Wide Web Consortium standard.&lt;/p&gt;

&lt;p&gt;The DOM defines a standard for accessing documents:&lt;/p&gt;

&lt;p&gt;"The Document Object Model (DOM) is a platform and language-neutral interface that allows programs and scripts to dynamically access and update the content, structure, and style of a document."&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;DOM standard&lt;/strong&gt; is separated into 3 different parts:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Core DOM&lt;/strong&gt; - standard model for all document types&lt;br&gt;
&lt;strong&gt;XML DOM&lt;/strong&gt; - standard model for XML documents&lt;br&gt;
&lt;strong&gt;HTML DOM&lt;/strong&gt; - standard model for HTML documents&lt;/p&gt;
&lt;h2&gt;
  
  
  Task 3: Register your application
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Sign in to the Azure portal.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Search for and select Azure Active Directory.&lt;/li&gt;
&lt;/ul&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%2Ff4neohesss624dl604fv.PNG" 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%2Ff4neohesss624dl604fv.PNG" alt="Image description" width="800" height="200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Under Manage, select App registrations &amp;gt; New registration.&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%2Foagkphqbbauexrov4fm0.PNG" 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%2Foagkphqbbauexrov4fm0.PNG" alt="Image description" width="751" height="576"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Enter a Name for your application.&lt;br&gt;
Users of your app might see this name, and you can change it later.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose the Supported account types for the application. &lt;/li&gt;
&lt;/ul&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%2Fod3kpnwtdyfutv35hftj.PNG" 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%2Fod3kpnwtdyfutv35hftj.PNG" alt="Image description" width="743" height="586"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; Select Register to create the app registration.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 3&lt;/strong&gt;: Under Management&amp;gt;Authentication enable the Implicit grant and hybrid flows&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select ID tokens.&lt;/li&gt;
&lt;li&gt;Select Access tokens.&lt;/li&gt;
&lt;/ul&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%2Fgmb2ddhccm9vsbmge5o3.PNG" 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%2Fgmb2ddhccm9vsbmge5o3.PNG" alt="Image description" width="800" height="167"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;_Select save.&lt;/p&gt;

&lt;p&gt;You've now completed the registration of your single-page application (SPA) and configured a redirect URI to which the client will be redirected and any security tokens will be sent. By selecting one or both of ID tokens and Access tokens, you've enabled the implicit grant flow._&lt;/p&gt;

&lt;p&gt;Next Configure the app's code to use the app registration created.&lt;/p&gt;
&lt;h2&gt;
  
  
  Task 4: Configure your JavaScript SPA
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;: Create a file named &lt;strong&gt;authConfig.js&lt;/strong&gt; in the app folder&lt;/p&gt;

&lt;p&gt;Add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
/**
 * Configuration object to be passed to MSAL instance on creation. 
 * For a full list of MSAL.js configuration parameters, visit:
 * https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/configuration.md 
 */
const msalConfig = {
    auth: {
        // 'Application (client) ID' of app registration in Azure portal - this value is a GUID
        clientId: "Enter_the_Application_Id_Here",
        // Full directory URL, in the form of https://login.microsoftonline.com/&amp;lt;tenant-id&amp;gt;
        authority: "Enter_the_Cloud_Instance_Id_HereEnter_the_Tenant_Info_Here",
        // Full redirect URL, in form of http://localhost:3000
        redirectUri: "Enter_the_Redirect_Uri_Here",
    },
    cache: {
        cacheLocation: "sessionStorage", // This configures where your cache will be stored
        storeAuthStateInCookie: false, // Set this to "true" if you are having issues on IE11 or Edge
    },
    system: {   
        loggerOptions: {    
            loggerCallback: (level, message, containsPii) =&amp;gt; {  
                if (containsPii) {      
                    return;     
                }       
                switch (level) {        
                    case msal.LogLevel.Error:       
                        console.error(message);     
                        return;     
                    case msal.LogLevel.Info:        
                        console.info(message);      
                        return;     
                    case msal.LogLevel.Verbose:     
                        console.debug(message);     
                        return;     
                    case msal.LogLevel.Warning:     
                        console.warn(message);      
                        return;     
                }   
            }   
        }   
    }
};

/**
 * Scopes you add here will be prompted for user consent during sign-in.
 * By default, MSAL.js will add OIDC scopes (openid, profile, email) to any login request.
 * For more information about OIDC scopes, visit: 
 * https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-permissions-and-consent#openid-connect-scopes
 */
const loginRequest = {
    scopes: ["User.Read"]
};


/**
 * Add here the scopes to request when obtaining an access token for MS Graph API. For more information, see:
 * https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/resources-and-scopes.md
 */
const tokenRequest = {
    scopes: ["User.Read", "Mail.Read"],
    forceRefresh: false // Set this to "true" to skip a cached token and go to the server to get a new token
};


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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt;: create a file named &lt;strong&gt;graphConfig.js&lt;/strong&gt;. in the app folder&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Add the following code to provide your application the configuration parameters for calling the Microsoft Graph API:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;graphMeEndpoint: "https://graph.microsoft.com/v1.0/me",
graphMailEndpoint: "https://graph.microsoft.com/v1.0/me/messages"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fwblzc70snqhjbsbv9dou.PNG" 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%2Fwblzc70snqhjbsbv9dou.PNG" alt="Image description" width="800" height="205"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Task 5: Use (MSAL) to sign in user
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;: Create a file named *&lt;em&gt;authPopup.js *&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Add the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Create the main myMSALObj instance
// configuration parameters are located at authConfig.js
const myMSALObj = new msal.PublicClientApplication(msalConfig);

let username = "";

function selectAccount() {

    /**
     * See here for more info on account retrieval: 
     * https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/docs/Accounts.md
     */

    const currentAccounts = myMSALObj.getAllAccounts();
    if (currentAccounts.length === 0) {
        return;
    } else if (currentAccounts.length &amp;gt; 1) {
        // Add choose account code here
        console.warn("Multiple accounts detected.");
    } else if (currentAccounts.length === 1) {
        username = currentAccounts[0].username;
        showWelcomeMessage(username);
    }
}

function handleResponse(response) {

    /**
     * To see the full list of response object properties, visit:
     * https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/request-response-object.md#response
     */

    if (response !== null) {
        username = response.account.username;
        showWelcomeMessage(username);
    } else {
        selectAccount();
    }
}

function signIn() {

    /**
     * You can pass a custom request object below. This will override the initial configuration. For more information, visit:
     * https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/request-response-object.md#request
     */

    myMSALObj.loginPopup(loginRequest)
        .then(handleResponse)
        .catch(error =&amp;gt; {
            console.error(error);
        });
}

function signOut() {

    /**
     * You can pass a custom request object below. This will override the initial configuration. For more information, visit:
     * https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/request-response-object.md#request
     */

    const logoutRequest = {
        account: myMSALObj.getAccountByUsername(username),
        postLogoutRedirectUri: msalConfig.auth.redirectUri,
        mainWindowRedirectUri: msalConfig.auth.redirectUri
    };

    myMSALObj.logoutPopup(logoutRequest);
}

function getTokenPopup(request) {

    /**
     * See here for more info on account retrieval: 
     * https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/docs/Accounts.md
     */
    request.account = myMSALObj.getAccountByUsername(username);

    return myMSALObj.acquireTokenSilent(request)
        .catch(error =&amp;gt; {
            console.warn("silent token acquisition fails. acquiring token using popup");
            if (error instanceof msal.InteractionRequiredAuthError) {
                // fallback to interaction when silent call fails
                return myMSALObj.acquireTokenPopup(request)
                    .then(tokenResponse =&amp;gt; {
                        console.log(tokenResponse);
                        return tokenResponse;
                    }).catch(error =&amp;gt; {
                        console.error(error);
                    });
            } else {
                console.warn(error);   
            }
    });
}

function seeProfile() {
    getTokenPopup(loginRequest)
        .then(response =&amp;gt; {
            callMSGraph(graphConfig.graphMeEndpoint, response.accessToken, updateUI);
        }).catch(error =&amp;gt; {
            console.error(error);
        });
}

function readMail() {
    getTokenPopup(tokenRequest)
        .then(response =&amp;gt; {
            callMSGraph(graphConfig.graphMailEndpoint, response.accessToken, updateUI);
        }).catch(error =&amp;gt; {
            console.error(error);
        });
}

selectAccount();

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Task 6: Redirect
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;: Create a file named &lt;strong&gt;authRedirect.js&lt;/strong&gt; in the app folder&lt;/p&gt;

&lt;p&gt;Add the following authentication and token acquisition code for login redirect:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Create the main myMSALObj instance
// configuration parameters are located at authConfig.js
const myMSALObj = new msal.PublicClientApplication(msalConfig);

let username = "";

/**
 * A promise handler needs to be registered for handling the
 * response returned from redirect flow. For more information, visit:
 * https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/acquire-token.md
 */
myMSALObj.handleRedirectPromise()
    .then(handleResponse)
    .catch((error) =&amp;gt; {
        console.error(error);
    });

function selectAccount () {

    /**
     * See here for more info on account retrieval: 
     * https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/docs/Accounts.md
     */

    const currentAccounts = myMSALObj.getAllAccounts();

    if (currentAccounts.length === 0) {
        return;
    } else if (currentAccounts.length &amp;gt; 1) {
        // Add your account choosing logic here
        console.warn("Multiple accounts detected.");
    } else if (currentAccounts.length === 1) {
        username = currentAccounts[0].username;
        showWelcomeMessage(username);
    }
}

function handleResponse(response) {
    if (response !== null) {
        username = response.account.username;
        showWelcomeMessage(username);
    } else {
        selectAccount();
    }
}

function signIn() {

    /**
     * You can pass a custom request object below. This will override the initial configuration. For more information, visit:
     * https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/request-response-object.md#request
     */

    myMSALObj.loginRedirect(loginRequest);
}

function signOut() {

    /**
     * You can pass a custom request object below. This will override the initial configuration. For more information, visit:
     * https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/request-response-object.md#request
     */

    const logoutRequest = {
        account: myMSALObj.getAccountByUsername(username),
        postLogoutRedirectUri: msalConfig.auth.redirectUri,
    };

    myMSALObj.logoutRedirect(logoutRequest);
}

function getTokenRedirect(request) {
    /**
     * See here for more info on account retrieval: 
     * https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/docs/Accounts.md
     */
    request.account = myMSALObj.getAccountByUsername(username);

    return myMSALObj.acquireTokenSilent(request)
        .catch(error =&amp;gt; {
            console.warn("silent token acquisition fails. acquiring token using redirect");
            if (error instanceof msal.InteractionRequiredAuthError) {
                // fallback to interaction when silent call fails
                return myMSALObj.acquireTokenRedirect(request);
            } else {
                console.warn(error);   
            }
        });
}

function seeProfile() {
    getTokenRedirect(loginRequest)
        .then(response =&amp;gt; {
            callMSGraph(graphConfig.graphMeEndpoint, response.accessToken, updateUI);
        }).catch(error =&amp;gt; {
            console.error(error);
        });
}

function readMail() {
    getTokenRedirect(tokenRequest)
        .then(response =&amp;gt; {
            callMSGraph(graphConfig.graphMailEndpoint, response.accessToken, updateUI);
        }).catch(error =&amp;gt; {
            console.error(error);
        });
}

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Task 6: Call the Microsoft Graph API
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;: Create file named &lt;strong&gt;graph.js&lt;/strong&gt; in the app folder.&lt;/p&gt;

&lt;p&gt;Add the following code for making REST calls to the Microsoft Graph API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/** 
 * Helper function to call MS Graph API endpoint
 * using the authorization bearer token scheme
*/
function callMSGraph(endpoint, token, callback) {
    const headers = new Headers();
    const bearer = `Bearer ${token}`;

    headers.append("Authorization", bearer);

    const options = {
        method: "GET",
        headers: headers
    };

    console.log('request made to Graph API at: ' + new Date().toString());

    fetch(endpoint, options)
        .then(response =&amp;gt; response.json())
        .then(response =&amp;gt; callback(response, endpoint))
        .catch(error =&amp;gt; console.log(error));
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the sample application created in this tutorial, the &lt;strong&gt;callMSGraph()&lt;/strong&gt; method is used to make an HTTP GET request against a protected resource that requires a token.&lt;/p&gt;

&lt;p&gt;The request then returns the content to the caller. This method adds the acquired token in the HTTP Authorization header. &lt;/p&gt;

&lt;p&gt;In the sample application created in this tutorial, the protected resource is the Microsoft Graph API me endpoint which displays the signed-in user's profile information.&lt;br&gt;
_&lt;/p&gt;

&lt;h2&gt;
  
  
  Test your application
&lt;/h2&gt;

&lt;p&gt;On Visual Studio Code, once you have completed following all the steps, run and debug. The Application should load &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%2Fahzql9nxd66d8b5k57jg.PNG" 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%2Fahzql9nxd66d8b5k57jg.PNG" alt="Image description" width="800" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;There you go!!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I have also provided the code on GitHub.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/sipsdaoracle/JavaScript-SPA" rel="noopener noreferrer"&gt;https://github.com/sipsdaoracle/JavaScript-SPA&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Remember to delete your resources once done.&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to create a JSON ARM template with Visual Studio Code</title>
      <dc:creator>sipsdaoracle</dc:creator>
      <pubDate>Fri, 19 May 2023 07:25:14 +0000</pubDate>
      <link>https://dev.to/sipsdaoracle/how-to-create-a-json-arm-template-with-visual-studio-code-3cfb</link>
      <guid>https://dev.to/sipsdaoracle/how-to-create-a-json-arm-template-with-visual-studio-code-3cfb</guid>
      <description>&lt;p&gt;In this exercise, we will use the extension to create an &lt;em&gt;ARM template&lt;/em&gt; from scratch. While doing so you experience the extensions capabilities such as &lt;em&gt;ARM template snippets&lt;/em&gt; , &lt;em&gt;validation&lt;/em&gt; , &lt;em&gt;completions&lt;/em&gt;, and &lt;em&gt;parameter&lt;/em&gt; file support.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is JSON ARM and what is it useful for?&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;em&gt;JSON&lt;/em&gt;, or &lt;em&gt;JavaScript Object Notation&lt;/em&gt;, is a data interchange format that is commonly used for configuration and data exchange in modern applications. &lt;/p&gt;

&lt;p&gt;In &lt;em&gt;Azure Resource Manager&lt;/em&gt;, &lt;em&gt;JSON templates&lt;/em&gt; are used to define and deploy resources in a declarative way.&lt;/p&gt;

&lt;p&gt;This means that instead of writing imperative scripts to specify the steps required to create and configure resources, you can define the desired state of your resources using &lt;em&gt;JSON templates&lt;/em&gt;.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Prerequisite:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Visual Studio Code&lt;/li&gt;
&lt;li&gt;Azure Resource Manager Tools extension&lt;/li&gt;
&lt;li&gt;Azure CLI or Azure Powershell&lt;/li&gt;
&lt;li&gt;Azure subscription&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Task 1: Create an ARM template
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Create and open with VSCode new file &lt;em&gt;azuredeploy.json&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enter &lt;code&gt;arm&lt;/code&gt;into the code editor, which initiates &lt;em&gt;Azure Resource Manager&lt;/em&gt; snippets for scaffolding out an ARM template.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Select &lt;code&gt;arm!&lt;/code&gt; to create a template scoped for an Azure resource group deployment&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;em&gt;The result should be the template below:&lt;/em&gt;&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Task 2: Add an Azure resource
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Scroll down to line 7 and place the cursor in the template resources block and then select &lt;em&gt;arm-storage&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;em&gt;You should see the following storage template below:&lt;/em&gt;&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Task 3: Add template parameters
&lt;/h2&gt;

&lt;p&gt;Parameters will be used to specify the storage account name.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; On line 4 place the cursor in the parameters block, type &lt;code&gt;"&lt;/code&gt; and select the new-parameter snippet.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This should add a parameter to your template.&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Set the name of the parameter to &lt;code&gt;storageAccountName&lt;/code&gt; and the description to &lt;code&gt;Storage Account Name&lt;/code&gt;.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Add min and max storage account name &lt;/p&gt;

&lt;p&gt;length &lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Update name property to use it&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Navigate&lt;/em&gt; to line 14 on the resource storage&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Remove&lt;/em&gt; current name &lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Enter&lt;/em&gt; a double quote &lt;code&gt;"&lt;/code&gt; and an opening square 
bracket&lt;code&gt;[&lt;/code&gt;, select &lt;em&gt;parameters&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; Enter round brackets and a single quote ' inside the brackets&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A list of defined parameters will be listed, select the parameter&lt;/em&gt;&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Task 4: Create a parameter file
&lt;/h2&gt;

&lt;p&gt;A &lt;em&gt;parameter file&lt;/em&gt; allows you to store environment-specific parameter values and pass these values in as a group during deployment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Right-click on the template (code editor) and select &lt;code&gt;Select/Create Parameter File&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Select &lt;code&gt;New&lt;/code&gt; &amp;gt; &lt;code&gt;All Parameters&lt;/code&gt;&lt;br&gt;
Enter a name and choose a &lt;em&gt;location&lt;/em&gt; for the parameter file&lt;/p&gt;

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

&lt;p&gt;&lt;em&gt;The extension between the parameter file and the template validates both the files together.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Task 5 Deploy the template
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt;&lt;br&gt;
Open &lt;em&gt;Visual studio code&lt;/em&gt; terminal or Azure &lt;em&gt;Powershell&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;N.B: Make sure that on your Visual Studio Code you have singed in to your Microsoft account. To do this you need select the accounts icon and &lt;em&gt;Turn On Cloud&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Now...Deploy by pasting the following code on the CLI/Powershell:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;az group create --name arm-vscode --location eastus

az deployment group create --resource-group arm-vscode --template-file azuredeploy.json --parameters azuredeploy.parameters.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpdssdp9b0qzrl1m08fv2.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpdssdp9b0qzrl1m08fv2.PNG" alt="Image description" width="800" height="344"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;The first code was executed successfully now it will deploy and create an ARM resource group&lt;/em&gt;&lt;/p&gt;

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

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

&lt;p&gt;&lt;em&gt;Now we can head on to our Azure portal and check if indeed it has been created.&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;So far so good!&lt;/p&gt;

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

&lt;p&gt;&lt;em&gt;There you go you have successfully deployed.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you prefer you can push your code to your Github repository as I have done:&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Clean up Resources
&lt;/h2&gt;

&lt;p&gt;Now that you have successfully deployed ensure you clean by deleting all the resources to avoid unnecessary incurred cost.&lt;/p&gt;

&lt;p&gt;Log back to your Azure portal and search for resources that have just been created and ensure that you have deleted them.&lt;/p&gt;

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

&lt;p&gt;Congratulations, on completing this tutorial.&lt;/p&gt;

</description>
      <category>shecodeafrica</category>
      <category>tutorial</category>
      <category>azure</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Create a Virtual Machine Instance(EC2) in AWS &amp; Connect Via SSH(Cloudshell)</title>
      <dc:creator>sipsdaoracle</dc:creator>
      <pubDate>Sun, 07 May 2023 01:06:35 +0000</pubDate>
      <link>https://dev.to/sipsdaoracle/create-a-virtual-machine-instanceec2-in-aws-connect-via-sshcloudshell-13i3</link>
      <guid>https://dev.to/sipsdaoracle/create-a-virtual-machine-instanceec2-in-aws-connect-via-sshcloudshell-13i3</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;What is an EC2?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;An EC2 (Elastic Compute Cloud) is a virtual computing environment provided by Amazon Web Services (AWS). It allows you to create and manage virtual machines (instances) in the cloud.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;How can you use an EC2?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;You can use an EC2 to run your applications, services, or workloads in the cloud. You can choose the hardware specifications (CPU, memory, storage) and the operating system of your instances, and you only pay for the resources you use.&lt;/p&gt;

&lt;p&gt;By the end of this tutorial you should be able to accomplish the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create EC2 instance&lt;/li&gt;
&lt;li&gt;SSH into EC2 Virtual Instance Machine using Cloudshell&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What you'll need to get started:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An AWS account &lt;/li&gt;
&lt;li&gt;SSH Client(Cloudshell) &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now let's get started and create an EC2 instance:&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 1:&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Sign into the [AWS Management Console]&lt;/strong&gt;(&lt;a href="https://aws.amazon.com/console/"&gt;https://aws.amazon.com/console/&lt;/a&gt;)&lt;/p&gt;

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

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 2:&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Navigate to the EC2 Dashboard&lt;/strong&gt; ( &lt;strong&gt;search for EC2&lt;/strong&gt; )&lt;/p&gt;

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

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 3:&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Click on Instance&lt;/strong&gt;&lt;/p&gt;

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

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 4:&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Click on the "Launch Instance" button.&lt;/strong&gt;&lt;/p&gt;

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

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 5:&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Name your EC2 Instance:&lt;/strong&gt;&lt;/p&gt;

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

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 6:&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Choose an Amazon Machine Image (AMI)&lt;/strong&gt;&lt;br&gt;
An AMI is a pre-configured image that contains the software and operating system you want to use on your instance.&lt;/p&gt;

&lt;p&gt;We'll use AWS Linux in this tutorial&lt;/p&gt;

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

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 7:&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Select an Instance Type&lt;/strong&gt;&lt;br&gt;
An Instance Type determines the hardware specifications of your virtual machine, such as CPU, memory, and storage.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 8:&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Create a key pair&lt;/strong&gt;&lt;br&gt;
A key pair is a set of public and private keys that allows you to securely connect to your instance over SSH.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 9:&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Configure the &lt;strong&gt;Network&lt;/strong&gt; Instance Details, such as the &lt;strong&gt;VPC&lt;/strong&gt; settings, the &lt;strong&gt;subnet&lt;/strong&gt;.&lt;/p&gt;

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

&lt;p&gt;Configure &lt;strong&gt;Security Group&lt;/strong&gt; settings to allow inbound traffic to your instance.&lt;/p&gt;

&lt;p&gt;You can add rules to your security group to &lt;strong&gt;allow access&lt;/strong&gt; over specific ports or protocols, such as SSH or HTTP.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 10:&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Add Storage to your instance&lt;/strong&gt;&lt;br&gt;
You can choose the storage type (such as SSD or HDD), size, and number of volumes. You can add up 30GB on the free tier account&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Review Summary&lt;/strong&gt;&lt;br&gt;
A summary of your configurations will be displaced you can also select the number of instances you'd like, if you're happy with everything you can &lt;strong&gt;click on launch&lt;/strong&gt;&lt;/p&gt;

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

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 11:&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Launch your instance and connect&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After a few minutes, your virtual machine will be launched and ready to use.&lt;/p&gt;

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

&lt;p&gt;&lt;em&gt;You've successfully created a virtual machine (EC2) in AWS.&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;You can now &lt;strong&gt;connect&lt;/strong&gt; to your instance by following the steps below:&lt;br&gt;
&lt;strong&gt;1. Click on the check box **&lt;br&gt;
**2. Click on connect&lt;/strong&gt;&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Connect using SSH client
&lt;/h2&gt;

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

&lt;p&gt;&lt;strong&gt;Open an SSH client&lt;/strong&gt;&lt;br&gt;
In the AWS Management Console, at the top of the screen, choose the AWS CloudShell icon&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Locate your private key file&lt;/strong&gt;.&lt;br&gt;
The key used to launch this instance is &lt;code&gt;sips.pem&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Run this command&lt;/strong&gt;&lt;br&gt;
To ensure your key is not publicly viewable.&lt;br&gt;
 &lt;code&gt;chmod 400 sips.pem&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect to your instance&lt;/strong&gt; &lt;br&gt;
using its Public DNS:&lt;br&gt;
&lt;code&gt;ec2-3-90-208-38.compute-1.amazonaws.com&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Run command:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ssh -i "sips.pem" ec2-user@ec2-3-90-208-38.compute-1.amazonaws.com&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;Voila! You've successfully created a virtual machine (EC2) in AWS and used AWS cloudshell to SSH into it. &lt;/p&gt;

</description>
      <category>scacloudschool</category>
      <category>cloudpractitioner</category>
      <category>awscloushell</category>
      <category>ec2</category>
    </item>
    <item>
      <title>Exploring AWS CloudShell and the AWS Cloud9 IDE</title>
      <dc:creator>sipsdaoracle</dc:creator>
      <pubDate>Fri, 05 May 2023 14:39:12 +0000</pubDate>
      <link>https://dev.to/sipsdaoracle/exploring-aws-cloudshell-and-the-aws-cloud9-ide-jpf</link>
      <guid>https://dev.to/sipsdaoracle/exploring-aws-cloudshell-and-the-aws-cloud9-ide-jpf</guid>
      <description>&lt;p&gt;As a graduate trainee in the AWS re/Start program I've decided to write about my experiences by documenting and creating tutorials and so this will be my first article covering one of the lab practicals.&lt;/p&gt;

&lt;p&gt;This article is based on the AWS lab practical -  AWS Cloud9 IDE which is available on the AWS re/start Canvas platform.&lt;/p&gt;

&lt;p&gt;Let's get started.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Cloudshell and AWS Cloud9?
&lt;/h2&gt;

&lt;p&gt;AWS CloudShell and AWS Cloud9 IDE are both tools provided by Amazon Web Services (AWS) to help developers build, test, and deploy applications on the AWS platform.&lt;/p&gt;

&lt;h2&gt;
  
  
  What can you do with AWS Cloud9?
&lt;/h2&gt;

&lt;p&gt;With AWS Cloud9, you can code, build, run, test, debug, and release software in many exciting scenarios and variations.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does AWS Cloud9 work?
&lt;/h2&gt;

&lt;p&gt;The following diagram shows a high-level overview of how AWS Cloud9 works.&lt;/p&gt;

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

&lt;p&gt;From the diagram (starting at the bottom), you use the AWS Cloud9 IDE, running in a web browser on your local computer, to interact with your AWS Cloud9 environment. A computing resource (for example, an Amazon EC2 instance or your own server) connects to that environment. Finally, your work is stored in an AWS CodeCommit repository or other type of remote repository.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What we'll do and what you should learn by the end of this.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Connect to AWS CloudShell
&lt;/li&gt;
&lt;li&gt;Run AWS CLI commands &lt;/li&gt;
&lt;li&gt;Run AWS software development kit (SDK) code &lt;/li&gt;
&lt;li&gt;Create an AWS Cloud9 development environment &lt;/li&gt;
&lt;li&gt;Connect to the browser-based IDE&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Copy files to and from&lt;/em&gt; (Amazon S3), CloudShell, 
and AWS Cloud9&lt;/li&gt;
&lt;li&gt;_Install AWS SDK for Python _(Boto3) on an AWS 
Cloud9 instance&lt;/li&gt;
&lt;li&gt;Use AWS Cloud9 to &lt;em&gt;create files and run code files&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Connect to an AWS CloudShell&lt;/em&gt; environment and 
explore its capabilities&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Duration&lt;/strong&gt;: It should take approximately &lt;strong&gt;60 minutes&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  SCENARIO:
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuytw7u9vzjw535lfz64v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuytw7u9vzjw535lfz64v.png" alt="Image description" width="800" height="463"&gt;&lt;/a&gt;&lt;br&gt;
This lab is based on a scenario from small café business that sells desserts and coffee.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpw0pvo71mq5p1kqb0drs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpw0pvo71mq5p1kqb0drs.png" alt="Image description" width="403" height="427"&gt;&lt;/a&gt;&lt;br&gt;
The owner's daughter Sofía is eager to start developing a web presence for the café.&lt;/p&gt;

&lt;p&gt;She thinks that before she starts coding, it would be a good idea to decide on a development environment for developing and running her code. &lt;/p&gt;

&lt;p&gt;She decides to explore at least two options available on Amazon Web Services (AWS).&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisite:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;An empty S3 bucket bucket&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is a visual demonstration of how the start of the architecture and and the end of the architecture should look like.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start Architecture:&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;End Architecture:&lt;/strong&gt;&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Task 1: Connect to CloudShell and explore.
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt;  In the AWS Management Console, at the top of the screen, choose the AWS CloudShell icon&lt;/p&gt;

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

&lt;p&gt;A new browser tab opens with the AWS CloudShell interface.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Verify that the AWS CLI is installed&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run the following command: &lt;code&gt;aws --version&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Test the ability to run an AWS CLI command&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run the following simple AWS CLI command: aws s3 ls&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;A list of the S3 buckets that exist in the account is returned&lt;/em&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Focns05sivw8r4k0im1e1.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Focns05sivw8r4k0im1e1.PNG" alt="Image description" width="800" height="224"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; From the Actions menu, choose Tabs layout &amp;gt; Split into columns.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A second terminal window opens.&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; Test the ability to run SDK for Python code.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://aws-tc-largeobjects.s3.us-west-2.amazonaws.com/CUR-TF-200-ACCDEV-2-44869/01-lab-cloud9/s3/list-buckets.py"&gt;Download this file to your local computer&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 6:&lt;/strong&gt; From the Actions menu, choose Files &amp;gt; Upload file, and then choose Select file. Browse to where the file is and click on Upload&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 7:&lt;/strong&gt; In the terminal on the right side, run the following command: &lt;code&gt;cat list-buckets.py&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;You should see the contents of the file that you uploaded&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 8:&lt;/strong&gt; Run the SDK for Python code by issuing the following command: &lt;code&gt;python3 list-buckets.py&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The name of the S3 bucket is returned.&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;em&gt;You have now used two different programmatic ways to retrieve a list of the S3 buckets that exist in the AWS account.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 9:&lt;/strong&gt; Copy a file from CloudShell to an S3 bucket.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Copy the name of the bucket that includes -sample bucket- in the name.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy the list-buckets.py file to the bucket, go to the terminal on the left and run this command (replace  with your actual bucket name):&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;aws s3 cp list-buckets.py s3://&amp;lt;bucket-name&amp;gt;&lt;/code&gt;&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Update from the café
&lt;/h2&gt;

&lt;p&gt;Sophia would like to build a website, she would like to use a fully featured integrated development environment (IDE) where she can visually write, edit, run, and debug her code.&lt;/p&gt;

&lt;p&gt;CloudShell provides the vi and vim terminal-based text editors, but it doesn't provide many of the additional features that Sofía is looking for.&lt;/p&gt;

&lt;p&gt;Sofía is eager to explore AWS Cloud9, which is what you will do next!&lt;/p&gt;

&lt;h2&gt;
  
  
  Task 2: Creating an AWS Cloud9 instance
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;: Return to the AWS Management Console browser window.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; In the search bar at the top of the AWS Management Console, enter Cloud9, and select it.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Choose Create environment.&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; In the Name box, enter MyCloud9. &lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; In the Network settings section under Connection, &lt;br&gt;
  choose Secure Shell (SSH)&lt;/p&gt;

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

&lt;p&gt;&lt;em&gt;Choose Create .&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; Select the Open link to open your AWS Cloud9 IDE&lt;/p&gt;

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

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

&lt;h2&gt;
  
  
  Task 3: Exploring the AWS Cloud9 IDE
&lt;/h2&gt;

&lt;p&gt;In this task, you will explore some features of the AWS Cloud9 IDE and learn how to use them. &lt;/p&gt;

&lt;p&gt;You will also interact with Amazon S3 from the AWS Cloud9 environment. &lt;/p&gt;

&lt;p&gt;Finally, you will &lt;strong&gt;publish&lt;/strong&gt; a Hello World &lt;strong&gt;webpage&lt;/strong&gt; in AWS Cloud9 and &lt;strong&gt;host&lt;/strong&gt; the webpage &lt;strong&gt;in Amazon S3&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This AWS Cloud9 environment runs on an Amazon Elastic Compute Cloud (Amazon EC2) instance that is now running in your AWS account. Notice that the root directory is named MyCloud9, which is the name that you used for your AWS Cloud9 environment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Copy a file from Amazon S3 to your local storage in AWS Cloud9 &lt;/p&gt;

&lt;p&gt;In the Bash terminal return the name of your bucket by running the following command &lt;code&gt;aws s3 ls&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; Download the list-buckets.py file from Amazon S3 to the local storage on AWS Cloud9&lt;/p&gt;

&lt;p&gt;&lt;code&gt;aws s3 cp s3://&amp;lt;bucket-name&amp;gt;/list-buckets.py&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The list-buckets.py file should now be listed in the navigation pane.&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Open a code file that uses the SDK for Python and run it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Double-click the list-buckets.py file so it opens in the file editor window. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;The code displays&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;em&gt;The command does not run successfully. Instead, a new tab opens in the bottom panel and you see an error message: ModuleNotFoundError: No module named 'boto3'&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Return to the Bash terminal and install the SDK for Python libraries by running this command:&lt;br&gt;
&lt;code&gt;sudo pip3 install boto3&lt;/code&gt;&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Try running the Python code again
&lt;code&gt;sudo pip3 install boto3&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;_ You can also invoke the same code from the Bash terminal directly by running the python3 &lt;code&gt;list-buckets.py command&lt;/code&gt;. The Run button is a convenience._&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; Create a new file and upload it to Amazon S3&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Choose File &amp;gt; New From Template &amp;gt; HTML File.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Between the &lt;/p&gt; tags, add the following text: Hello World&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;strong&gt;Step 6:&lt;/strong&gt; Choose File &amp;gt; Save  and save the file as index.html.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 7:&lt;/strong&gt; On the left side of the AWS Cloud9 editor, choose the AWS icon.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Expand the Region—for example, US East (N. Virginia)—expand S3, and then expand your bucket.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;The contents of the bucket are listed.&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 8:&lt;/strong&gt; Right-click the bucket name and choose Upload File.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the dialog box that appears, select index.html and choose Upload.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;&lt;em&gt;The file is uploaded from the AWS Cloud9 instance to the S3 bucket&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 9:&lt;/strong&gt; Access the webpage that's hosted on Amazon S3 from the internet.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make the index.html file that you uploaded to Amazon S3 publicly accessible by running the following AWS CLI command:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;aws s3api put-object-acl --bucket &amp;lt;bucket-name&amp;gt; --key index.html --acl public-read&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 10:&lt;/strong&gt; Back in the AWS Management Console, browse to the Amazon S3 console.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Tip: Alternatively, choose the Cloud9 icon in the top left of the Cloud9 IDE and choose Go To Your Dashboard to open the AWS Management Console in a new browser tab.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 11:&lt;/strong&gt; Choose your bucket, choose the index.html file, and choose the Object URL.&lt;/p&gt;

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

&lt;p&gt;&lt;em&gt;The webpage, with your Hello World message, should open.&lt;/em&gt;&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Update from the café
&lt;/h2&gt;

&lt;p&gt;Sofía is pleased that she identified an IDE that has the features she will need to develop the café website. She likes that AWS Cloud9 offers a graphical text editor, a file browser, a terminal for running AWS CLI commands, and code that uses the AWS SDKs. She's also glad that she knows about the features of CloudShell because it's easy to open from the AWS Management Console. CloudShell also provides some features that are similar to AWS Cloud9, but without the need to run an EC2 instance.  &lt;/p&gt;

&lt;p&gt;In the next lab, Sofia will use AWS Cloud9 to accomplish her development objectives&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to Deploy and configure servers and database for Azure SQL</title>
      <dc:creator>sipsdaoracle</dc:creator>
      <pubDate>Mon, 01 May 2023 18:31:02 +0000</pubDate>
      <link>https://dev.to/sipsdaoracle/how-to-deploy-and-configure-servers-and-database-for-azure-sql-e6k</link>
      <guid>https://dev.to/sipsdaoracle/how-to-deploy-and-configure-servers-and-database-for-azure-sql-e6k</guid>
      <description>&lt;p&gt;If you have ever wondered and would like to know how to Deploy and configure servers and database for Azure SQL and query some sample data then this article is just the cup of tea you need to get you going. &lt;/p&gt;

&lt;p&gt;Before you get started make sure you have the following:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Azure subscription account (you can create a free trial)&lt;/li&gt;
&lt;li&gt;Azure Data Studio&lt;/li&gt;
&lt;li&gt;SQL Server Management Studio-SSMS&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Firstly in order for you to deploy and configure anything you need to be on the Azure portal and create the server and database for Azure SQL. These two go hand in hand as the database would require a database server in order to run.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 1:&lt;/strong&gt; Sign in to the Azure portal (&lt;a href="https://portal.azure.com"&gt;https://portal.azure.com&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STEP 2:&lt;/strong&gt; Create a new resource group for your Azure SQL deployment.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdekmov9aph0f92ge0d93.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdekmov9aph0f92ge0d93.PNG" alt="Image description" width="800" height="368"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;STEP 3:&lt;/strong&gt; Create a new Azure SQL Server instance.&lt;/p&gt;

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

&lt;p&gt;You will need to specify a server name, choose the subscription, resource group, location, and administrator login and password.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;STEP 4:&lt;/strong&gt; Create a new Azure SQL database. &lt;br&gt;
Search for database and click on SQL Database and click create &lt;/p&gt;

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

&lt;p&gt;Click the + symbol or click on create&lt;/p&gt;

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

&lt;p&gt;Under the &lt;strong&gt;Basic&lt;/strong&gt; Tab:&lt;/p&gt;

&lt;p&gt;Select the subscription account and and choose the resource group you previously created. &lt;/p&gt;

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

&lt;p&gt;Fill in the &lt;strong&gt;Database name&lt;/strong&gt; , make sure that the &lt;strong&gt;Server&lt;/strong&gt; you have created is selected, if you have any issues you can always click on the &lt;strong&gt;Create new&lt;/strong&gt; link and add a new server.&lt;/p&gt;

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

&lt;p&gt;Next up is the Service Tier, &lt;strong&gt;Compute + storage&lt;/strong&gt; , the default compute and storage is a bit costly and not really what we need so we'll configure the preferred service tier and go for the &lt;strong&gt;basic tier&lt;/strong&gt; .&lt;/p&gt;

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

&lt;p&gt;Next up you have to configure &lt;strong&gt;backups and disaster recovery&lt;/strong&gt; settings for your Azure SQL database. &lt;br&gt;
By default, Azure SQL Database stores backups in &lt;strong&gt;geo-redundant storage&lt;/strong&gt; blobs that are replicated to a paired region. Geo-redundancy helps protect against outages that affect backup storage in the primary region.&lt;/p&gt;

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

&lt;p&gt;Under the &lt;strong&gt;Networking&lt;/strong&gt; tab:&lt;/p&gt;

&lt;p&gt;Configure firewall settings for the server. By default, Azure SQL will block all connections that originate outside of Azure. &lt;/p&gt;

&lt;p&gt;Set the connectivity method to &lt;strong&gt;Public Endpoint&lt;/strong&gt; . Adjust the &lt;strong&gt;firewall&lt;/strong&gt; settings to *&lt;em&gt;Yes *&lt;/em&gt; to Allow access to the server, and to add the current client IP address&lt;/p&gt;

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

&lt;p&gt;Under the &lt;strong&gt;Additional Settings&lt;/strong&gt; tabs:&lt;/p&gt;

&lt;p&gt;You can choose to create an empty database, import an existing database, or create a database from a template. For this exercise you can select use &lt;strong&gt;sample data&lt;/strong&gt; .&lt;/p&gt;

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

&lt;p&gt;Now you can create and deploy your database.&lt;br&gt;
Once it has completed deploying you can click on the Go to resource button to navigate your database resources and settings.&lt;/p&gt;

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

&lt;p&gt;Now you need to configure you firewall. &lt;/p&gt;

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

&lt;p&gt;Add a client IP address. You can use the Azure portal to specify which IP addresses or ranges can access your Azure SQL server.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;STEP 5:&lt;/strong&gt; Test your connection&lt;/p&gt;

&lt;p&gt;Test the connection to the Azure SQL database to ensure that everything is working as expected.&lt;/p&gt;

&lt;p&gt;Click on Open with and choose Azure Data Studio&lt;/p&gt;

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

&lt;p&gt;Click Launch it now link&lt;/p&gt;

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

&lt;p&gt;Click Open Azure Data Studio&lt;/p&gt;

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

&lt;p&gt;Connect by entering the details of your database and sql server&lt;/p&gt;

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

&lt;p&gt;Well done you have connected and here is your database&lt;/p&gt;

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

&lt;p&gt;If you have downloaded Microsoft SQL Server Management Studio&lt;br&gt;
You can simply open the app and connect to the database.&lt;/p&gt;

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

&lt;p&gt;Congratulations! Here is your database&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhibmnb5qit46xbhh0kvk.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhibmnb5qit46xbhh0kvk.PNG" alt="Image description" width="800" height="425"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;STEP 6: Query data&lt;/strong&gt;&lt;br&gt;
You can go a step further and query some data as indicated below and execute to run the query.&lt;/p&gt;

&lt;p&gt;SELECT * FROM SalesLT.Product&lt;br&gt;
WHERE color = 'red';&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;br&gt;
What we have done and learned in summary is the process of setting up infrastructure to host and manage data in a scalable and secure manner on Microsoft's cloud platform, Azure.&lt;/p&gt;

&lt;p&gt;We went a step further and connected the database to SQL Server Management Studio-SSMS.&lt;/p&gt;

&lt;p&gt;Lastly we queried some sample data that is provided by Microsoft. &lt;/p&gt;

</description>
      <category>cloudcomputing</category>
      <category>sql</category>
      <category>database</category>
      <category>azuresql</category>
    </item>
    <item>
      <title>How to Build your first Static Web App on Azure</title>
      <dc:creator>sipsdaoracle</dc:creator>
      <pubDate>Sun, 30 Apr 2023 19:03:52 +0000</pubDate>
      <link>https://dev.to/sipsdaoracle/how-to-build-your-first-static-web-app-on-azure-4f12</link>
      <guid>https://dev.to/sipsdaoracle/how-to-build-your-first-static-web-app-on-azure-4f12</guid>
      <description>&lt;p&gt;Building a Static Web App might sound a bit intimidating especially if you're a beginner to using cloud platforms such as Azure. You might wonder why do you even need to build one? And with your busy schedule, you might ask how long will it take you to complete.&lt;/p&gt;

&lt;p&gt;Well, here's a []minute read that takes you step by step, answering those questions, putting your doubts and worries to rest so you can get to building your very first Static Web App using Azure.&lt;/p&gt;

&lt;p&gt;Alright now let's get started.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisite
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Create an Azure subscription free trial account.&lt;/li&gt;
&lt;li&gt;GitHub account&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Firstly, you need to decide on which hosting platform you are going to use to host your static web app, you can choose between &lt;strong&gt;Github&lt;/strong&gt; or &lt;strong&gt;Azure DevOps&lt;/strong&gt; in this tutorial we are going to choose &lt;strong&gt;Github&lt;/strong&gt; .&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Create A Repository
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In this instance we are going to navigate to the following &lt;br&gt;
location to &lt;strong&gt;create a new repository&lt;/strong&gt;:&lt;br&gt;
&lt;a href="https://github.com/staticwebdev/react-basic/generate"&gt;https://github.com/staticwebdev/react-basic/generate&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Name your repository &lt;strong&gt;my-first-static-web-app&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Select Create repository&lt;/strong&gt; from template.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Here is the repository...&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Step 2: Create a static web app
&lt;/h2&gt;

&lt;p&gt;Now that we have created our repository we are going to have to create the static web app from &lt;a href="https://portal.azure.com/"&gt;Azure Portal&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;After logging in to the portal:&lt;br&gt;
&lt;strong&gt;1.Select Create a Resource.&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;2.Search for Static Web Apps.&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;3.Select Static Web Apps.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnrkoq1ap1wg5e9t32psr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnrkoq1ap1wg5e9t32psr.png" alt="Image description" width="800" height="455"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;4.Select Create.&lt;/strong&gt;&lt;br&gt;
Enter the static web app details as below, enter in the &lt;strong&gt;name&lt;/strong&gt; , choose the &lt;strong&gt;region&lt;/strong&gt; . Under the Deployment details &lt;strong&gt;Sign in with Github&lt;/strong&gt; and then click on &lt;strong&gt;Review and Create&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;Choose the organization and repository and then choose &lt;strong&gt;main ** for the branch.&lt;br&gt;
Select **React&lt;/strong&gt; as your build preset, leave everything as default and  click on &lt;strong&gt;Review + Create&lt;/strong&gt;&lt;/p&gt;

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

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

&lt;h2&gt;
  
  
  Step 3: Visit the website
&lt;/h2&gt;

&lt;p&gt;Once deployment is complete click on &lt;strong&gt;Go to Resource&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;Under the &lt;strong&gt;Overview&lt;/strong&gt; pane look for the *&lt;em&gt;URL *&lt;/em&gt; and click to open &lt;/p&gt;

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

&lt;p&gt;Congratulations here is your first static web app!&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Step 4: Clean up resources
&lt;/h2&gt;

&lt;p&gt;Once you have completed creating and visiting the static web app, you clean up by deleting the static web app to avoid incurring costs.&lt;/p&gt;

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

</description>
      <category>azure</category>
      <category>github</category>
      <category>cloudskills</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
