<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Pierre Hauser on Medium]]></title>
        <description><![CDATA[Stories by Pierre Hauser on Medium]]></description>
        <link>https://medium.com/@pierrephauser?source=rss-dd75ac1149df------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*2lWaRXeXjy4BSZ0gRWOiPQ.jpeg</url>
            <title>Stories by Pierre Hauser on Medium</title>
            <link>https://medium.com/@pierrephauser?source=rss-dd75ac1149df------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 22 May 2026 23:21:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pierrephauser/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Migrating an On-Prem Linux Server to EC2 Instance]]></title>
            <link>https://medium.com/@pierrephauser/migrating-an-on-prem-linux-server-to-ec2-instance-d84e354829c7?source=rss-dd75ac1149df------2</link>
            <guid isPermaLink="false">https://medium.com/p/d84e354829c7</guid>
            <category><![CDATA[user-data]]></category>
            <category><![CDATA[bash-scripting]]></category>
            <category><![CDATA[ec2-instance]]></category>
            <dc:creator><![CDATA[Pierre Hauser]]></dc:creator>
            <pubDate>Thu, 21 Nov 2024 07:45:37 GMT</pubDate>
            <atom:updated>2024-11-21T07:45:37.479Z</atom:updated>
            <content:encoded><![CDATA[<h4>Hello all, welcome to my next project with Level Up In Tech. We will be working on solving our next issue with our fictitious bank again, Level-Up Bank.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WHdOMrrWGmCkp2q1" /></figure><h3>Background</h3><p>The <strong>Level-Up Bank</strong> wants to move its website and online banking platform to the cloud to improve scalability, reliability, and security. The bank would like to use AWS for its cloud services.</p><h3><strong>Why would the bank move from an on-prem Linux server to EC2?</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Thtd0CKIA3Nt_NlT" /><figcaption>The bank would move its app from on-premises to the EC2 instance on AWS for several reasons.</figcaption></figure><p><strong>Scalability — </strong>On-premises infrastructure can be difficult and expensive to scale. By moving its app to an EC2 instance on AWS, the bank can take advantage of the cloud’s scalability. EC2 instances can be easily scaled up or down depending on demand, allowing the bank to handle spikes in traffic without having to invest in additional hardware or infrastructure. This means that the bank can quickly respond to changes in customer demand and avoid the risk of under provisioning or overprovisioning resources.</p><p><strong>Reliability — </strong>AWS offers a highly reliable infrastructure with multiple availability zones and automatic failover capabilities. By moving its app to AWS, the bank can ensure that it is highly available and that customers can access it at all times. AWS’s infrastructure is designed to be fault-tolerant, which means that the bank’s app can continue to function even if there is an issue with a server or availability zone. This helps to minimize downtime and ensure that customers can access the bank’s services whenever they need them.</p><p><strong>Security — </strong>Banks are a prime target for cyber attacks, and securing customer data is paramount. AWS provides robust security features, such as encryption, access controls, and network security, that can help the bank improve the security of its app and customer data. AWS also offers compliance certifications for various industry standards, which can help the bank meet regulatory requirements and protect against legal and reputational risks.</p><p><strong>Cost savings — </strong>Maintaining on-premises infrastructure can be expensive, requiring significant upfront investment in hardware, software, and personnel. By using AWS, the bank can take advantage of pay-as-you-go pricing and avoid the upfront costs of purchasing and maintaining hardware. This means the bank can focus its resources on improving its app and services rather than managing and maintaining infrastructure. Additionally, AWS offers cost optimization tools and resources to help the bank optimize its infrastructure and reduce costs over time.</p><p><strong>Flexibility — </strong>The banking industry is constantly evolving, and banks need to be able to adapt quickly to changing market conditions and customer needs. Moving its app to AWS gives the bank the flexibility to quickly spin up new instances, test new features, and experiment with different configurations. This can help the bank innovate and respond more quickly to changing market conditions, giving it a competitive advantage.</p><h3>Solution</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZN6CV-zZ1x8PbZe_" /></figure><p>I will create a t2.micro EC2 instance selecting an Amazon Machine Image (AMI) with Amazon Linux as the OS. For more details on a manual install of an EC2 and install of Apache please see my article <a href="https://medium.com/@pierrephauser/understanding-the-why-behind-using-an-apache-web-server-on-linux-b60967fa5e67">here</a>. This article will focus on the ease of applying scripting during the install of an EC2 to aid in efficiency of AWS instances in a real-world environment.</p><h3>Let’s Get Started!</h3><p>As I mentioned earlier, I will not go into the details of creating an EC2 instance and will focus on the ease of utilizing Bash scripting during the install. I will incorporate a small script in the AWS user data section on the AWS Console while launching an EC2 instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_vYYoKfa7laT414T" /><figcaption>You can find user data in the Advanced details section of creating an instance on the AWS console.</figcaption></figure><p><strong>What is User Data?</strong></p><p>When you launch an Amazon EC2 instance, you can pass user data to the instance that is used to perform automated configuration tasks, or to run scripts after the instance starts. <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html">More</a></p><p>User data can be very useful in configuring in an automated fashion vs. manually having to enter those steps which allows you to create the instance, update the repository, install/enable Apache webservices all while creating the instance.</p><pre>#!/bin/bash<br><br>yum update -y # Update all packages<br>yum install httpd -y # Install Apache<br>systemctl start httpd # Start Apache service<br>systemctl enable httpd # Enable Apache service to start on boot</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/0*WJVgtUwqu22FBmLu" /><figcaption>You can write directly in the User data section or point to a locally stored script.</figcaption></figure><p>Launch instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/0*bi1i_vFjAmr_xjTT" /><figcaption>You should see this updated default Apache webpage image after launch.</figcaption></figure><p>Congratulations, you have created a preconfigured AWS EC2 instance. This saves you time as Cloud Engineer that you can launch and configure an EC2 instance in one step vs. manually configuring after launch.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d84e354829c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Secure and Efficient Infrastructure Management at Level Up Bank]]></title>
            <link>https://medium.com/@pierrephauser/secure-and-efficient-infrastructure-management-at-level-up-bank-5a7cdf78c0b7?source=rss-dd75ac1149df------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a7cdf78c0b7</guid>
            <category><![CDATA[command-line]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[user-permission]]></category>
            <dc:creator><![CDATA[Pierre Hauser]]></dc:creator>
            <pubDate>Mon, 21 Oct 2024 05:03:49 GMT</pubDate>
            <atom:updated>2024-10-22T21:30:08.024Z</atom:updated>
            <content:encoded><![CDATA[<h4>HELLO ALL, THIS WILL BE MY SECOND LINUX PROJECT AND FOURTH OVERALL. I REALLY STRUGGLED WITH THIS PROJECT COMING FROM A WINDOWS GUI WORLD; IT TOOK ME A MINUTE TO GRASP THE COMMAND LINE WORLD WITHOUT THE PRETTY ICONS TO GUIDE ME. HOWEVER, ONCE I WAS ABLE TO MAKE SENSE OF THE COMMANDS IT BROUGHT ME CLOSER TO A REAL-WORLD EXPERIENCE OF BEING A CLOUD ENGINEER.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*B_2oQfFNQCAe0yUB" /></figure><h3>Project Scenario</h3><p>This week we used our fictitious <em>Level Up Bank </em>again. With the ever growing and evolving IT infrastructure, particularly in managing user access and ensuring data security within the growing organization. It highlights the need for a secure user management system to facilitate efficient operations across departments, protect sensitive data, ensure privacy and comply with regulations. We will create the basic folder structure, group creation and user permissions in Linux with the following requirements.</p><h4>Requirements</h4><p>As the root user:</p><ol><li>Create 3 directories: Development, Operations, Analytics</li></ol><ul><li>Add several blank dummy files to each directory using the appropriate commands. Do not use a text editor.</li></ul><p>2. Create 3 Groups in Linux: Developers, Operations, Data Analysts</p><p>3. Each group should only have view and access to their respective directory.</p><ul><li>Use the <strong>chown</strong> command to change the owner of each directory to their respective group.</li><li>Use the <strong>chmod<em> </em></strong>command to modify the permissions to the directory so that only the owner of the group can read, write and execute. Users should not be able to access the directory if they are not in the correct group.</li></ul><p>4. Create the following users with the associated information</p><ul><li>Jess Waller, username= jwaller, email=jwaller@‌levelupbank.com, group= Developers</li><li>Blake Dorsey, username= bdorsey, email=bdorsey@‌levelupbank.com, group= Operations</li><li>Joey Ewart, username= jewart, email=jewart@levelupbank.com, group= Data Analysts</li></ul><p>5. Switch to each newly created user and verify they are only able to see the directories associated with their Group and that they are able to view and open the files in the directory.</p><h3>Let’s get started!</h3><p>I will create the Linux environment using Amazon Web Services (AWS) by launching an EC2 instance with an Ubuntu Amazon Machine Image (AMI) utilizing a t2.micro Instance type.</p><p>I will start with creating the following 3 directories: Development, Operations, Analytics with the <strong>mkdir </strong>command using the <strong>-p</strong> option. The<strong> -p</strong> option will allow me to create all three directories at once making them all parent directories.</p><pre>sudo mkdir -p Development Operations Analytics</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/0*higpJcpLAMrZsqnt" /><figcaption>-p Allows me to create the 3 directories at a parent level in one command.</figcaption></figure><p>Next, we move on to the “dummy” file creation for each folder.</p><pre>sudo touch Analytics/AnaDummy1 Analytics/AnaDummy2 Analytics/AnaDummy3<br>sudo touch Development/DevDummy1 Development/DevDummy2 Development/DevDummy3<br>sudo touch Operations/OpDummy1 Operations/OpDummy2 Operations/OpDummy3</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qZM1GE50Z_V2XPHH" /></figure><p>We can now move on to the Group creation: Developers, Operations, Data Analysts</p><p>I will create the groups with the following command:</p><pre>sudo addgroup groupname</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MXRqiY0eOaHvvuv2" /></figure><p>To view the newly created groups, I used the <strong>cat </strong>command with the following syntax:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JbwuDTot-6ovKClN" /></figure><p>Next, we will update the permissions for each directory to match their respective group.</p><pre>sudo chown :data_analysts Analytics<br>sudo chown :developers Development<br>sudo chown :operations Operations</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IlseF6yaLJLCHBiQ" /><figcaption>Notice the Group Owner column changed to match the Directory names respectfully.</figcaption></figure><p>Next, we use the <strong>chmod </strong>command to modify the permission for each directory so that only the owner of the group can read, write and execute. Users should not be able to access the directory if they are not in the correct group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2-VsGXn-WSqhc0DZ" /><figcaption>The owner already has full permission to the directory so we will concentrate on the Group and World columns. I will also use the Octal Notation version of <em>chmod</em>.</figcaption></figure><p>Octal Notation Explanation:</p><ul><li><strong>7 (Owner)</strong>: The owner of the directory has <strong>read (r)</strong>, <strong>write (w)</strong>, and <strong>execute (x)</strong> permissions.</li><li><strong>7 (Group)</strong>: Members of the group have <strong>read (r)</strong>, <strong>write (w)</strong>, and <strong>execute (x)</strong> permissions.</li><li><strong>0 (Others)</strong>: No permissions for users who are not the owner or in the group.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*laoR91Yy4Jfau8-f" /></figure><p>Using the following commands, I was able to change the permissions for the directories:</p><pre>sudo chmod 770 Analytics/<br>sudo chmod 770 Development/<br>sudo chmod 770 Operations/</pre><p>Next will create the users with the following information:</p><ol><li>Jess Waller, username= jwaller, email=jwaller@‌levelupbank.com, group= Developers</li><li>Blake Dorsey, username= bdorsey, email=bdorsey@‌levelupbank.com, group= Operations</li><li>Joey Ewart, username= jewart, email=jewart@levelupbank.com, group= Data Analysts</li></ol><p>Using the <strong>adduser </strong>command I created the users with the following code:</p><pre>sudo adduser jwaller --gecos &quot;Jess Waller, , , jwaller@levelupbank.com&quot; --ingroup developers<br>sudo adduser bdorsey --gecos &quot;Blake Dorsey, , , bdorsey@levelupbank.com&quot; --ingroup operations<br>sudo adduser jewart --gecos &quot;Joey Ewart, , , jewart@levelupbank.com&quot; --ingroup data_ analysts</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*D9bDF24Z901JUzV3" /></figure><p><strong>Syntax Explanation:</strong></p><ul><li><strong>sudo adduser username:</strong> Adds the user with the given username.</li><li>—<strong> gecos “Full Name, Room Number, Work Phone, Home Phone”:</strong> The — — <strong>gecos </strong>flag allows you to set additional user information like the full name, which can include email information.</li><li>—<strong> ingroup groupname:</strong> Adds the user to the specified group. If the group name has spaces (like “Data Analysts”), make sure to put it in quotes.</li></ul><p><strong>User Access(verification)</strong></p><p>Earlier I created the 3 directories in the home directory and I will need to move them to a directory (Project) in the root directory. This will allow the respective users access to their own directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/0*idjgxRnGocK1TheA" /></figure><p>Congratulations! You have now created a basic user folder structure utilizing security best practices and least privileges.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a7cdf78c0b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding The Why Behind Using An Apache Web Server On Linux]]></title>
            <link>https://medium.com/@pierrephauser/understanding-the-why-behind-using-an-apache-web-server-on-linux-b60967fa5e67?source=rss-dd75ac1149df------2</link>
            <guid isPermaLink="false">https://medium.com/p/b60967fa5e67</guid>
            <dc:creator><![CDATA[Pierre Hauser]]></dc:creator>
            <pubDate>Sun, 06 Oct 2024 22:46:27 GMT</pubDate>
            <atom:updated>2024-10-07T22:52:03.536Z</atom:updated>
            <content:encoded><![CDATA[<h4>Last week, on my LUIT journey, we began exploring the world of Linux. For my case study this week, I set up an AWS EC2 Amazon Linux 2 image running the Apache webservice that I will detail below.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3rFQAJq4k1XEKafu" /></figure><h3>Project Description</h3><p>As a junior cloud engineer at Level Up Bank, your team has been tasked with creating a new web server using Amazon Linux 2, an open-source Linux distribution widely used for web servers.</p><p>The web server will host the bank’s website, providing information about its services and allowing customers to access their accounts online.</p><h3>Background</h3><h4>What is an Apache Web Server?</h4><p>Apache Web Server, commonly called<strong> “Apache,” </strong>is free, open-source software that hosts websites and web applications. It is one of the world’s most widely used web server software, powering over half of the websites on the Internet.</p><p>Apache is known for its flexibility and ability to run on various operating systems, including Linux, Windows, and macOS. It supports various programming languages, including PHP, Perl, and Python, and can be configured to work with various database systems, such as MySQL and PostgreSQL.</p><p>Apache is designed to be highly customizable, with a modular architecture that allows administrators to add or remove features as needed. It also includes a wide range of security features, such as SSL/TLS encryption and support for digital certificates, to help protect websites and web applications from potential security threats.</p><p>Overall, Apache is a reliable and powerful web server software that provides a secure and efficient platform for hosting websites and web applications.</p><h3>The Why</h3><p>Here are some common reasons on why a bank may use an Apache web server on Linux for:</p><ul><li>Stability: Reliable for critical applications.</li><li>Performance: Scalable to handle high traffic.</li><li>Security: Strong security features and support.</li><li>Flexibility: Customizable with plug-ins and modules.</li><li>Cost: Open-source and free, lowering IT costs.</li></ul><p>Using an Apache web server on Linux allows a bank to take advantage of these benefits and provide a secure, high-performance platform for its online applications and services.</p><h3>Let’s Get Started!</h3><h4>Task Summary</h4><p>Set up an AWS EC2 instance with an Amazon Linux 2 server image. Next, set up the server to allow inbound HTTP traffic. SSH into the server to update and install Apache, then start the service. Confirm successful installation by accessing the server with the public IP in a web browser to get the Apache welcome screen to show a successful installation and completion.</p><p>As always when working with EC2 instances they must be created in AWS using the AWS console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*78XO0q9OYkk-Z8PO" /><figcaption>Select <em>Launch instances</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/0*RlizCyFbqnTQo5wl" /><figcaption>Once you launch your instance make sure you name your instance, select the Amazon Linux OS and select the Amazon Linux 2 AMI image.</figcaption></figure><p>We will continue with the default <strong>t2.micro</strong> Instance type and don&#39;t forget to create a new key pair in order to SSH into the instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/0*HHyNMFQ24-PzhIwf" /></figure><p>Next, we will move to the Network settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/0*Ih_3A1riqRYPbyOS" /><figcaption>Make sure you allow SSH and HTTP traffic anywhere and the internet.</figcaption></figure><p>You can now launch your instance and move to connecting to your new server with SSH.</p><p>You should see the following screen when you connect with SSH.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*n3AhgObavXReSJSg" /><figcaption>Notice the Amazon Linux 2 confirming the correct image.</figcaption></figure><p>The first order of business is to upgrade the Apache software utilizing the yum command with option -y.</p><pre>sudo yum install httpd -y</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*S0OSpxx5Flqv4jLF" /><figcaption>YUM Definition</figcaption></figure><p>Next, we will install Apache with the following command:</p><pre>sudo yum install httpd -y</pre><p>Once installed we must start the Apache service on the server with the next command:</p><pre>sudo systemctl start httpd</pre><p>Navigate back to the AWS console and copy your public IP and paste into your web browser. Make sure to use HTTP vs HTTPs or your page will not display</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*Nq_qO0gUaFUZTeYn" /><figcaption>Default Welcome Page</figcaption></figure><p>Congratulations!</p><p>You have successfully launched an AWS EC2 instance with an Amazon Linux 2 server image running Apache as your web server.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b60967fa5e67" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Secure Remote Administration of EC2 Instances]]></title>
            <link>https://medium.com/@pierrephauser/secure-remote-administration-of-ec2-instances-f9b7e6a9a761?source=rss-dd75ac1149df------2</link>
            <guid isPermaLink="false">https://medium.com/p/f9b7e6a9a761</guid>
            <dc:creator><![CDATA[Pierre Hauser]]></dc:creator>
            <pubDate>Mon, 30 Sep 2024 04:46:39 GMT</pubDate>
            <atom:updated>2024-09-30T06:21:33.571Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Hello everyone, I am back with my next project, I hope you are enjoying the articles. Feel free to provide feedback.</blockquote><h3>Secure Remote Administration of EC2 Instances</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vHlfZi32bD1j_46NMwQ2Lg.png" /></figure><h3>The Business Problem</h3><p><em>Level Up Corporation, a mid-sized tech company, leverages the power of Amazon Web Services (AWS) Elastic Compute Cloud (EC2) to host both its Linux and Windows applications. The company currently has 100+ EC2 instances running simultaneously. Level Up has a dedicated IT team located globally to handle the administration and maintenance of these instances. However, due to the absence of a reliable, secure, and direct remote administration tool, the IT team faces significant challenges in efficiently managing, troubleshooting, and maintaining these servers, leading to prolonged downtime, decreased productivity, and potential security risks.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*20nXesTv146tva2o" /><figcaption>Photo by <a href="https://unsplash.com/@olav_ahrens?utm_source=medium&amp;utm_medium=referral">Olav Ahrens Røtne</a> on <a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Proposed Solution</h3><p>Implement SSH (Secure Shell) for Linux EC2 instances and RDP (Remote Desktop Protocol) for Windows EC2 instances. Both SSH and RDP provide secure, encrypted channels for remote administration, allowing the IT team to effectively manage and troubleshoot servers, regardless of their geographical location.</p><h3>Benefits of the Solution</h3><ul><li><strong>Improved Productivity and Efficiency:</strong> SSH and RDP provide direct access to EC2 instances. This enables the IT team to promptly respond to server issues, reducing downtime and improving overall operational efficiency.</li><li><strong>Enhanced Security:</strong> Both SSH and RDP provide secure, encrypted channels for communication. This helps to prevent unauthorized access and data breaches, maintaining the integrity and confidentiality of the company’s data.</li><li><strong>Cost Savings:</strong> By reducing server downtime and enhancing IT team efficiency, the company can decrease operational costs. In addition, a fast response to issues can prevent potential financial losses associated with severe server malfunctions or security breaches.</li><li><strong>Easy Administration and Troubleshooting:</strong> SSH and RDP enable the execution of commands and access to server resources, simplifying server management, configuration, and troubleshooting. This allows the IT team to provide better support and maintenance.</li><li><strong>Scalability:</strong> As Level Up expands and the number of EC2 instances increases, having a robust, secure remote access tool is crucial for managing a larger server infrastructure.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*k1U0zI9Yai2oCyLx" /><figcaption>Photo by <a href="https://unsplash.com/@jannerboy62?utm_source=medium&amp;utm_medium=referral">Nick Fewings</a> on <a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Summary Steps</h3><p>I will walk you through the creation of both EC2 instances with the AWS console. Log in to instances respectfully with SSH and RDP. With the focus on the outlined benefit solutions</p><p><strong>1st EC2 instance (Linux)</strong></p><ul><li>Deploy a Linux EC2 with keypair</li><li>Create a Security Group to allow SSH</li><li>SSH into the deployed EC2</li><li>Run the “whoami” command to verify entry of the EC2instance</li></ul><p><strong>2nd EC2 instance (Windows)</strong></p><ul><li>Deploy Windows EC2</li><li>Create a Security Group to allow RDP</li><li>RDP into your deployed Windows EC2</li></ul><h3>Let’s Get Started!</h3><p>Create the first EC2(Linux) instance by logging into the AWS Console and searching for EC2 in the search bar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7s3vkY17tRRHZ7d6" /></figure><p>Launch Instance from either location</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NOH4FvwP7Qgj-_cn" /></figure><p>Next, we will Name our Instance (Linux Project EC2) and select the Amazon Linux instance image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/0*q9Syl7JEo-8jp4Mn" /></figure><ol><li>Select the t2.micro (free tier) Instance type.</li></ol><p>2. In order to connect to our instance via SSH will need to establish a “Key Pair” for access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/0*I5tegRg2588tW597" /></figure><ol><li>Name your Key Pair (i.e. LinuxKeyPair)</li><li>Use the default key pair type “RSA”</li><li>.pem for the private key format to use with SSH</li><li>Select “Create key pair”</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/0*gc5selo1FgDDfKbf" /></figure><p>By default, the .pem file will be located in your download folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/419/0*DI6uR5204CgTSFw2" /><figcaption>Note: Remember the download location, this will be used in the later steps.</figcaption></figure><p>Next, we will create a security group that will only access via SSH</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/0*W4kVzBoy1LglTt2r" /></figure><p>We can now select “Launch instance”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/0*37vBN5UShdD7aoec" /></figure><p>You should have received the “Success” menu bar upon completion!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QaZF-cuOBj4XWclF" /></figure><p>When your instance is created you should show “Running” for the Instance state and “2/2 checks passed” for the status check. We now can move to connecting to the instance with SSH.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-VTQrK84ImHNUrgO" /></figure><p>Next launch a command prompt from your desktop and navigate to the “Downloads” directory. Earlier we created the Keypair and download to our Downloads folder. Here is where we will run the SSH to login.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/379/0*t2bWcNWTvMcdC1Le" /></figure><p>Now lets connect!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GsNdkO7Bh-uShlIw" /><figcaption>Select the connect button.</figcaption></figure><ol><li>Select “SSH client” tab</li><li>Copy the example to run in the command prompt.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/0*NfDfCMb18siHkGu1" /><figcaption>Note — If you are on a MAC or non-Windows OS, you will be required to run steps 1–3.</figcaption></figure><p>Once you have completed the steps you should see the following screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ph2ji_B8dKyn-Kqx" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/1*oxk74-1S9pvBuW_ZTvmlEg.png" /></figure><p>Congratulations you have connected to your EC2 instance using SSH!</p><h3>Creation of the 2nd EC2 instance (Windows)</h3><p>Next, we will create a 2nd EC2 instance but using a Windows image. Then use RDP (Remote Desktop Protocol) to remote into the Window’s instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/0*ouvXwSVdzB44LyfI" /><figcaption>The steps are the same as the ones we used to create a Linux instance</figcaption></figure><p>Select a t2.micro type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/781/0*3i8VvhWRIXfG5mqJ" /></figure><p>Create your Key pair.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/0*9Zrl6CQUS69wfRM1" /></figure><p>Your Security group settings will default to allow RDP traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/0*m6vPYqkfIfod01Fk" /></figure><p>Select the Windows instance then select “Connect”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5LKPj3D0gqbBcAnq" /></figure><p>Select the RDP Client tab and select download remote desktop file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Qht9EfXChl2dRNYw" /></figure><p>After the download, launch the RDP file. You will need to select the “Get password” for the Administrator password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/456/0*sk7rFgEGvxErW0fF" /></figure><p>Upload your private key from the download folder and decrypt. Paste the now decrypted password to connect to your Windows instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/0*BTNqsUUYbCXwUU4S" /></figure><p>Congratulations you have now remoted into your Windows EC2 instance!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f9b7e6a9a761" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[S3 Static Website Use Case]]></title>
            <link>https://medium.com/@pierrephauser/s3-static-website-use-case-43562cf213c1?source=rss-dd75ac1149df------2</link>
            <guid isPermaLink="false">https://medium.com/p/43562cf213c1</guid>
            <dc:creator><![CDATA[Pierre Hauser]]></dc:creator>
            <pubDate>Sun, 22 Sep 2024 04:14:44 GMT</pubDate>
            <atom:updated>2024-09-22T05:17:43.514Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9y52fFKlmKWNIPna" /><figcaption>Photo by <a href="https://unsplash.com/@fennings?utm_source=medium&amp;utm_medium=referral">Marc PEZIN</a> on <a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>Hello everyone, as promised I am publishing my first completed project with Level Up in Tech, please enjoy the read.</h4><blockquote>Level Up Bank is a fictitious fintech startup that offers digital banking services to customers. The company’s website is the primary means of acquiring new customers, providing them with information about the services offered, and serving as a platform for them to interact with the bank. Currently, the website is hosted on an on-premises server, which requires a dedicated IT team to manage and maintain it. This creates additional costs for the company, and also adds a level of complexity to the infrastructure. To address these challenges, Level Up Bank has decided to move its website to AWS S3.</blockquote><blockquote>Assist the client Level Up Bank with lifting their on-prem hosted website to the Cloud utilizing Amazon’s S3 service.</blockquote><h3>What is Amazon S3?</h3><p>Amazon Simple Storage Service (Amazon S3) is an object storage service that offers industry-leading scalability, data availability, security, and performance. Customers of all sizes and industries can use Amazon S3 to store and protect any amount of data for a range of use cases, such as data lakes, websites, mobile applications, backup and restore, archive, enterprise applications, IoT devices, and big data analytics. Amazon S3 provides management features so that you can optimize, organize, and configure access to your data to meet your specific business, organizational, and compliance requirements. More on this topic can be found at <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html">What is Amazon S3? — Amazon Simple Storage Service</a></p><h3>What are the benefits from this decision</h3><ol><li>Cost savings: Hosting a static website on AWS S3 is more cost-effective compared to using an EC2 or on-premises server. This is because AWS S3 charges only for the amount of storage used, and the cost of data transfer is also minimal. On the other hand, an EC2 instance requires additional expenses for compute power, storage, and data transfer.</li><li>Improved scalability: AWS S3 provides automatic scalability without requiring any additional effort from the company. If the website receives more traffic, AWS S3 can easily handle the increased load without any downtime.</li><li>High availability: AWS S3 offers high availability and durability, ensuring that the website is accessible to users at all times. This is achieved through the use of multiple availability zones and redundancy.</li><li>Reduced management overhead: Since AWS S3 is a fully managed service, Level Up Bank can reduce the burden of managing and maintaining the website. This frees up the company’s IT team to focus on more critical tasks, such as developing new banking features and improving customer experience.</li></ol><h3>Let’s Get Started!</h3><p>Brief overview of what the client needs</p><ol><li>Create an S3 bucket using the AWS Console</li><li>Upload the index.html file</li><li>Modify the S3 bucket to host a static website to be reachable through the internet</li></ol><h3>S3 Bucket Creation for Static website hosting</h3><p>Step 1. Login to your AWS account</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/0*j6Iel6dSD0KzeZKy" /><figcaption>Search for “S3” services</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/0*BF__ZG1xCqG0QDbD" /></figure><p>Step 2. Select <em>Create bucket to</em> create your first S3 Bucket</p><p>This should take you to the Amazon S3 &gt; Buckets screen.</p><p>Select to <em>Create bucket to</em> create your first S3 Bucket</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Rbz4uQWeKPpo6YOc" /><figcaption>Select <em>Create bucket to</em> create your first S3 Bucket</figcaption></figure><p>Step 3. Create your Bucket Name</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/0*WndrCFyMu_J8aTIW" /><figcaption>Create a Bucket name</figcaption></figure><p>Continue with the bucket creation with the default selections.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/0*AnDuC5jSC6AXMo2Q" /><figcaption>Select Create bucket</figcaption></figure><p>Step 4. Enabling your S3 bucket to host your static website</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oed3yh4--6wM9sMk" /><figcaption>Enable this feature in the Properties menu of the newly created S3 bucket.</figcaption></figure><p>Scroll to the bottom of the Properties page select Edit to Enable Static website hosting and select Bucket hosting then save your updates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XgI4Tr0-ViTuEi-c" /><figcaption>Enable Static website hosting and Bucket hosting</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/0*TnFCes3IiDdL7N04" /></figure><p>You will then return to the Amazon S3 &gt; Buckets screen with your newly created S3 Bucket listed. To allow S3 to host your static website we need to enable this feature in the Properties menu of the newly created S3 bucket.</p><p>Step 3. Select the Properties menu and scroll to the bottom of the Properties page select Edit to Enable Static website hosting than save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NQVMOQDZuMwE398D" /><figcaption>Select Properties</figcaption></figure><p>Scroll to the bottom of the Properties page select Edit to Enable Static website hosting than save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Hq_41sBh5L-j5guw" /><figcaption>Save the changes.</figcaption></figure><p>Next we adjust the Block public access setting under the Permissions section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1L3WMRC8JdkboQMh" /><figcaption>Select Permissions</figcaption></figure><p>Edit the Block public access by clearing the Block all public access box and save the changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/0*1i-DtGnsLM4ixvkT" /><figcaption>Note: This setting will be reverted back to secure the files on the S3 bucket.</figcaption></figure><p>Step 4. Adding a bucket policy to make your bucket content publicly available.</p><p>After you edit S3 Block Public Access settings, you can add a bucket policy to grant public read access to your bucket. When you grant public read access, anyone on the internet can access your bucket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yiHnSGy_wej-2huC" /><figcaption>Select permissions</figcaption></figure><p>Under Bucket policy paste the following code that allows the public read access to your website.</p><pre>{<br>    &quot;Version&quot;: &quot;2012-10-17&quot;,<br>    &quot;Statement&quot;: [<br>        {<br>            &quot;Sid&quot;: &quot;PublicReadGetObject&quot;,<br>            &quot;Effect&quot;: &quot;Allow&quot;,<br>            &quot;Principal&quot;: &quot;*&quot;,<br>            &quot;Action&quot;: [<br>                &quot;s3:GetObject&quot;<br>            ],<br>            &quot;Resource&quot;: [<br>                &quot;arn:aws:s3:::Bucket-Name/*&quot;<br>            ]<br>        }<br>    ]<br>}</pre><p>Make sure you save your changes.</p><p>Step 5. Upload your index.html file for your website homepage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GdxP_Nc1to7OI_pF" /><figcaption>At this time you can upload any additional objects if needed.</figcaption></figure><p>We have now added the index.html into S3 bucket to host the website.</p><p>Select the index.html file showing and view the object</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ojvBekFg3tK8rWST" /></figure><p>Copy the Object URL to paste in a separate browser to test.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*I4_SMaUf3tsq9tbN" /><figcaption>Photo by <a href="https://unsplash.com/@elishaterada?utm_source=medium&amp;utm_medium=referral">Elisha Terada</a> on <a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Congratulations you have completed the task of hosting a static website in the cloud using AWS S3!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43562cf213c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>