<?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 Jamal Palmer on Medium]]></title>
        <description><![CDATA[Stories by Jamal Palmer on Medium]]></description>
        <link>https://medium.com/@palmer.jamal?source=rss-f503f82da60d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*QgUqSFYRFDGOc1B9</url>
            <title>Stories by Jamal Palmer on Medium</title>
            <link>https://medium.com/@palmer.jamal?source=rss-f503f82da60d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 12:01:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@palmer.jamal/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[Creating a script that generates a list of dictionaries for files in your current directory using…]]></title>
            <link>https://medium.com/@palmer.jamal/creating-a-script-that-generates-a-list-of-dictionaries-for-files-in-your-current-directory-using-ab0bda236e0a?source=rss-f503f82da60d------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab0bda236e0a</guid>
            <category><![CDATA[programming-for-beginners]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[cloud9]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[level-up-in-tech]]></category>
            <dc:creator><![CDATA[Jamal Palmer]]></dc:creator>
            <pubDate>Sun, 09 Apr 2023 20:41:04 GMT</pubDate>
            <atom:updated>2023-04-09T20:41:04.126Z</atom:updated>
            <content:encoded><![CDATA[<h3>Creating a script that generates a list of dictionaries for files in your current directory using Python.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6rH5MOfnDbvOQYCvh6xeyw.png" /></figure><p>Welcome to Week 13 with Level Up In Tech! For the last two weeks, we’ve been learning Python and working in AWS Cloud9 to push our scripting into GitHub. In this article, I will provide step-by-step directions on creating a Python script that generates a list of dictionaries for files using AWS Cloud9.</p><h4>Let’s level set —</h4><p><strong>What is Python?</strong></p><p><strong>Python</strong> is a high-level, interpreted programming language known for its simplicity and readability. It supports multiple programming paradigms and has a large and active community of users and developers.</p><p><strong>What is AWS Cloud9?</strong></p><p><strong>Cloud9</strong> is a cloud-based Integrated Development Environment (IDE) that allows developers to write, run, and debug their code in the cloud. It provides a web-based interface with a code editor, terminal, and built-in support for popular programming languages like Python, JavaScript, and PHP. AWS Cloud9 integrates with other AWS services, making it easy to develop, test, and deploy applications in the cloud.</p><h3><strong>Scenario:</strong></h3><p>Your company needs to learn about the files located on various machines. You have been asked to build a script that extracts information such as the name and size about the files in the current working directory and stores it in a list of dictionaries.</p><p>Create a script to that generates a list of dictionaries about files in the working directory. Then print the list.</p><p>Push your code to GitHub and include the link in your write-up.</p><h3><strong>Create the script</strong></h3><ol><li>Log in to your AWS Cloud9 environment.</li><li>Create a branch from ‘main’ repo.</li><li>Create a new file to get started: File &gt; New From Template &gt; Python File&gt; Save As… don’t forget to keep the extension a <em>.py</em></li><li>Start writing the following script:</li></ol><ul><li>To indicate a script is being written, use this line at the top of the code</li></ul><pre>#!/usr/bin/env python3.7</pre><ul><li>Import the <em>os</em> module to interact with the file system:</li></ul><pre>import os</pre><ul><li>Get the <em>current working directory:</em></li></ul><pre># working directory   <br>current_dir = os.getcwd() </pre><ul><li>Create an empty list to store file information:</li></ul><pre># empty list to store file info<br>file_info = []</pre><ul><li>Create a Dictionary within a list that includes file name and size</li></ul><pre># walk through dicrectory tree and file info<br>for dirpath, dirnames, filenames in os.walk(current_dir):<br>    for file in filenames:<br>        file_path = os.path.join(dirpath, file)<br>        file_size = os.path.getsize(file_path)<br>        file_info.append({&quot;name&quot;: file, &quot;size&quot;: file_size}</pre><ul><li>Print the <em>file</em> to see the list of dictionaries with names and sizes</li></ul><pre># Print the list of file information<br>for file in file_info:<br>    print(file)</pre><p>Source code used:</p><p>&lt;script src=”<a href="https://gist.github.com/jamalpalmer/32ca1fc146decbf828b6d1efa7d9f7cf.js">https://gist.github.com/jamalpalmer/32ca1fc146decbf828b6d1efa7d9f7cf.js</a>&quot;&gt;&lt;/script&gt;</p><p>To run code in AWWS Cloud9, enter the following command:</p><pre>ls</pre><p>List of all my files in the directory :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*Lq-e9XWeMryiA_ksq_GJCw.png" /></figure><p>Now, let’s run the script!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zDKlPSNGHO7iJP_UuWVuCQ.png" /></figure><p>Perfect, we can see the files&#39; names and sizes!</p><p>Now let’s push the code to GitHub — use the following command:</p><pre>git push --set-upstream origin Your_project_or_file_name</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zYosQibv265h4TC2IQGNAg.png" /></figure><p>Oops, looks like I wasn’t able to pull this code using the command line for some reason. So I’ll use my second option of pushing it to GitHub via Cloud9.</p><p><a href="https://github.com/jamalpalmer/gold-member/blob/main/week13.py">https://github.com/jamalpalmer/gold-member/blob/main/week13.py</a></p><p>Above is the link to my GitHub account, where the Source Code is located.</p><h3>Thank you!</h3><p>I appreciate you for taking the time to learn and practice with me. This is just the beginning of my Python learning journey, and I cannot wait to take things a step further.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab0bda236e0a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS: Building a 3-Tier Architecture]]></title>
            <link>https://medium.com/@palmer.jamal/aws-building-a-3-tier-architecture-85b453f3257c?source=rss-f503f82da60d------2</link>
            <guid isPermaLink="false">https://medium.com/p/85b453f3257c</guid>
            <category><![CDATA[web-server]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[rds-mysql]]></category>
            <category><![CDATA[3-tier-architecture]]></category>
            <dc:creator><![CDATA[Jamal Palmer]]></dc:creator>
            <pubDate>Sun, 12 Mar 2023 21:23:59 GMT</pubDate>
            <atom:updated>2023-03-12T21:23:59.783Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, we will walk through the steps of building a 3-tier architecture on Amazon Web Services. A 3-tier architecture offers a flexible, scalable, and secure approach to building applications that can help improve maintainability and flexibility. The applications are split into three physical tiers.</p><p>Presentation Layer: The user interface layer presents data and information to the user and receives user input. The presentation layer can include web pages, forms, mobile apps, or any other interface through which the user interacts with the application.</p><p>Application Layer: Responsible for processing and managing data, enforcing business rules, and implementing application logic. The application logic layer is an intermediary between the presentation and data storage layers.</p><p>Database Layer: Responsible for storing and retrieving data from a database or other data storage system. The data storage layer communicates with the application logic layer to provide the necessary data and information to the presentation layer.</p><p>Here’s a view of a 3-Tiers of application architecture design below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*yHUwWoEILquMh5Y8sQ37lA.png" /></figure><p>Benefits of a 3-Tier Architecture</p><ol><li>Scalability: The three-tier architecture is scalable, allowing developers to easily add or remove resources as needed without affecting the other tiers.</li><li>Maintainability: The separation of presentation, application logic, and data access layers in the 3-tier architecture makes it easier to maintain and update each layer independently.</li><li>Security: Allows for improved security by isolating the application layer and data access layers from the presentation layer. This prevents unauthorized access to sensitive data or critical functionality.</li><li>Reusability: Allows for the reusability of code modules. Developers can reuse the code modules in different applications and in different layers of the same application.</li><li>Flexibility: The three-tier architecture provides flexibility in terms of technology choices. Developers can use different technologies for different tiers based on the requirements of the application.</li></ol><h3>Requirements</h3><ul><li>AWS account</li><li>Access to Command-line Interface (CLI)</li></ul><h3>Scenario</h3><p>You have been asked to design and create a highly available 3 Tier architecture for your company’s new web application.</p><p>By creating the 3-Tier architecture and separating the different tiers, the company can scale each tier independently to handle the workload, improve reliability, enhance security, and optimize costs.</p><h3><strong>Building the foundation</strong></h3><h4>Web Tier</h4><ol><li>2 public subnets</li><li>Minimum of 2 EC2 instances with an OS of your choice (free tier) in an Auto Scaling Group.</li><li>EC2 Web Server Security Group allowing inbound permission from the internet.</li><li>Boot strap static web page or create a custom AMI that already includes the static web page.</li><li>Create a public route table and associate the 2 public subnets</li><li><strong>Create VPC</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*MkxW9OdY0aX-EWo-VkyXLQ.png" /></figure><pre>Name tag:  3TierVPC<br>IPv4 CIDR manual import: Selected<br>IPv4 CIDR: 10.10.0.0/16</pre><ul><li>Next, Go to VPC Setting → enable DNS hostname → Save</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*xcGrxw9eC0Vn6zodhqw8fw.png" /></figure><p><strong>2. Subnets</strong></p><ul><li>Go to Subnets → Create Subnets and create all 6 subnets.</li><li>Choose the VPC ID just recently created above</li></ul><pre>Subnet 1 WebPublic1 us-east-2a 10.10.1.0/24<br>Subnet 2 WebPublic2 us-east-2b 10.10.2.0/24<br>Subnet 3 AppPrivate1 us-east-2a 10.10.3.0/24<br>Subnet 4 AppPrivate2 us-east-2b 10.10.4.0/24<br>Subnet 5 DBPrivate1 us-east-2a 10.10.5.0/24<br>Subnet 6 DBPrivate2 us-east-2b 10.10.6.0/24</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*g5mot6vPKUKBgeDI8lHT2A.png" /><figcaption>Important: Go to edit subnet setting to Enable auto-assign public IPv4 address for both public subnets</figcaption></figure><p><strong>3. Create an Internew Gateway</strong></p><blockquote>Internet Gateway : It’s a service that helps you connect your VPC to the public internet. It serves as a gateway for internet-bound traffic to enter or exit the VPC. AWS Internet Gateway is a fully managed service and automatically scales to meet the demands of your applications.</blockquote><ul><li>Go to Internet Gateway → Create Internet Gateway → Attach the newly created VPC</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*NrD9mkLGNy9Lz1k4D_TfiA.png" /></figure><p><strong>4: Create NAT Gateway</strong></p><p>NAT Gatway: It is a service that allows instances in a private subnet of a VPC to communicate with the internet or other AWS services that are outside the VPC. It translate the private IP addresses of the instances into public IP addresses, and vice versa.</p><ul><li>Navigate to Virtual Private Cloud → NAT Gateway → Create NAT Gateway</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*9L5BXexUquKOTc_l1TSnTQ.png" /></figure><pre>Name: NAT<br>Subnet:  WebPublicSubnet1<br>Connectivity type: Public<br>Elastic IP Allocation ID: VPC</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/1*hZHJ39H1woEnRIM0e_x6MA.png" /></figure><p><strong>5: Create Route Table</strong></p><blockquote>Route Tables: a virtual table that contains a set of rules, called routes, that determine where network traffic is directed. Each subnet in a Virtual Private Cloud (VPC) must be associated with a route table, which specifies the rules for routing traffic to and from the subnet.</blockquote><p>· Go to VPC Dashboard → Virtual Private Cloud → Route table → Create Route table</p><p>· Fill out your route table as shown below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*xbdnrCAFbtwM74SOS9wzNA.png" /></figure><ul><li>Next, add subnets to the table</li><li>Pubic Subnet Actions → Edit Subnet Association → Save</li><li>Add the internet gateway as target</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*ZM3nalaVzXYbg82fyiID2Q.png" /></figure><ul><li>Next, add 4 private subnets to the table</li><li>Private Subnet Actions → Edit Subnet Association → Save</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*YwemKe2sEyalRyfh9g4-wg.png" /></figure><ul><li>Add NAT gateway routes and save changes</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*aZMo8sE09zUW23xntTV77A.png" /></figure><ul><li>To verify we have a Route Table associated with 4 private subnet w/ target: NAT Gateway</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*dOqWvOdznFb2WspCPkuVSQ.png" /></figure><h3><strong>Build the Web Tier</strong></h3><h4>Presentation Layer</h4><ul><li>Go to EC2 Dashboard → Instances → Launch Instances from Template → Create Launch Template</li><li>Follow steps demonstrated below:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*bJ1bs9jSQrVfhSW8Ryqw8g.png" /></figure><ul><li>Provide the following details</li></ul><pre>o Template:  Name<br>o Description:  Name<br>o Select:  Providence Guidance<br>o Quickstart: Amazon Linux 2 AMI (free-tier eligible)<br>o Network setting—Create Public security group<br> HTTP 80<br> SSH 22<br> All ICMP IPv4</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*msSSbx2-a_n4oIJ0I8N15g.png" /></figure><p>Note: It is important to “ENABLE” Auto-assign public IP under the Advanced network configuration.</p><ul><li>Advanced Details → enter Bash script in “User Data”</li></ul><pre>#Update all yum package repositories<br>yum update -y<br><br>#Install Apache Web Server<br>yum install -y httpd.x86_64<br><br>#Start and Enable Apache Web Server<br>systemctl start httpd.service<br>systemctl enable httpd.service<br><br>#Adds custom webpage html code to &quot;index.html&quot; file.<br>echo &quot;&lt;html&gt;&lt;body&gt;&lt;h1&gt;Welcome to JLP Technology &amp; Consulting h1&gt;&lt;/body&gt;&lt;html&gt;&quot; &gt; /var/www/html/index.html</pre><ul><li>Create and launch the template.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*9725Vjfh4zRKrmixnL6FHA.png" /></figure><ul><li>Next, Go to Actions → create Auto-Scaling Group</li></ul><blockquote>Auto-Scaling Group: is feature that allows you to automatically scale your EC2 instances up or down based on demand. This helps you ensure that you have the right amount of compute capacity available to handle your workload at any given time, without the need for manual intervention.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*3ZhJc6ELFhBy9O0xXUUHLg.png" /></figure><ul><li>Attach VPC- WebPublic 1 &amp; 2</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*c1bPQt_29eEwJaVQPcm9vQ.png" /></figure><ul><li>Attach to load balancer</li><li>Application Load Balancer</li><li>Load balancer scheme — Internet Facing</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*EZtUDQFf1E3ocleCIvosWA.png" /></figure><ul><li>Create a target group</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*Ono6kb860MsFiCObEnmQ5A.png" /></figure><ul><li>Update group size as shown below</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*v2dilevNqNXSouMa6LQy4Q.png" /></figure><ul><li>Click Create Auto</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*kTfl_ohwdIjx8C8_aqUm7g.png" /></figure><p>The Web Application Tier has now been created!</p><ul><li>Go to EC2 instance window to verify the 2 new instances are running as expected</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*Ve05nT7SN03tgosj47S-rg.png" /></figure><p>· Next, verify that the 2nd instance is up and running as well</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*39_tvuMRiX3tQY-yV026BQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*m7wx-Tw2BEN_COX8TVOU6g.png" /><figcaption>Working!!!!</figcaption></figure><h3>Create an Application Tier</h3><ol><li>2 private subnets</li><li>Minimum of 2 EC2 instances with an OS of your choice (free tier) in an Auto Scaling Group.</li><li>EC2 Application Server Security Group allowing inbound permission from the Web Server Security Group.</li><li>Associate with private route table.<br>Note: This is not a true application tier as we don’t have any provided code to run on the EC2 instances.</li></ol><blockquote>An application tier is a logical division of an application architecture that contains the business logic and processing logic. It typically runs on a separate set of servers or instances from the web or database tiers and is responsible for processing user requests, performing calculations, and communicating with other services or databases as needed.</blockquote><h4>Launch Template</h4><ul><li>Create a Launch Template by following the guidance below:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*dl4IheHMXXm04Xlqbcaisw.png" /></figure><ul><li>Create Inbound security group and rules</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*BXpkGnVzpzJxDrQPoA210g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*BuYbiyXwkIm20QOMAiupMg.png" /><figcaption>Done!!</figcaption></figure><h4>Application Tier Auto Scaling Group</h4><ul><li>Create a new ASG a name → Select <strong>Launch Template</strong> → Next</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*rkIMxvcV1Bt5V-5csO7nnw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*doifTWQIHA-W3W92Hiq7Vw.png" /></figure><p>Follow the same steps above for creating a 2nd Auto Scaling Group</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*58cH1GBypUvQq7VYeN2TrA.png" /></figure><ul><li>Now, we have 2 Auto-Scaling group now crated</li><li>When going back to the EC2 Dashboard you will see all 4 instances running!</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*Jc_wCG-Bsh44IQh1PUCHpw.png" /></figure><h4>Create Database Tier</h4><ol><li>Use a free Tier MySql RDS Database.</li><li>The Database Security Group should allow inbound traffic for MySQL from the Application Server Security Group.</li><li>2 private subnets.</li><li>Associate with private route table.<br>Note: No need to use Multi-AZ but be sure to document how you would add it</li><li>Remember that when diagraming this tier you are only creating one RDS instance in one subnet even though you are creating two subnets. If you use multi-az or a read replica then and only then should you have a second instance. Make sure to label accordingly.</li></ol><blockquote>The database layer is a logical division of an application architecture that contains the data storage and management components.</blockquote><ul><li>Navigate to Amazon RDS Dashnoard → Database → Create Database → Standard Create → MySQL (Free Tier)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*341DAc9uovVqBH6tsdgBNQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*TD-zL9rbg2SLQoZrpntjiA.png" /></figure><ul><li>VPC Security Group → Create New → New VPC Security group name → Database port: 3306</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*uCyr7VvuiTJt-Zalz0edSQ.png" /></figure><ul><li>Click → Creat Database</li><li>Creating the database may take a while</li><li>Next, Edit inbound security group rules</li><li>Select ThreeTierDatabase name → Action → Edit inbound rules</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*ppcF4vgFux-ardpXDxkzUQ.png" /></figure><ul><li>Edit Inbound rules → Delete previous security group rule ID → Add Rule → MYSQL/Aurora → Source: 3TierDB → Save Rules</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JfEMslglw96eXK8499jlKg.png" /></figure><h3>Final Verification</h3><p>SSH using the Web-Tier Instance then using the App Tier instance Private address to ping!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ne-8KDhsotHEZ5Fbgsk7kA.png" /><figcaption>Successful!</figcaption></figure><p>That is all folks! Thank you for stopping by!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=85b453f3257c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create a DynamoDB table and configure IAM-based access controls]]></title>
            <link>https://medium.com/@palmer.jamal/create-a-dynamodb-table-and-configure-iam-based-access-controls-5dd9aac31af7?source=rss-f503f82da60d------2</link>
            <guid isPermaLink="false">https://medium.com/p/5dd9aac31af7</guid>
            <category><![CDATA[iam-roles]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[amazon-web-services]]></category>
            <category><![CDATA[ec2-instance]]></category>
            <category><![CDATA[dynamodb]]></category>
            <dc:creator><![CDATA[Jamal Palmer]]></dc:creator>
            <pubDate>Sun, 05 Mar 2023 06:55:18 GMT</pubDate>
            <atom:updated>2023-03-05T06:55:18.081Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jiSmO9R8z-Y7ez-lc8bwNA.png" /></figure><h4>IAM Roles with EC2</h4><p>Introduction: In this article, I’ll show you how to ‘Square-Up’ by walking through the steps to create a <em>Boxing Movies </em>Amazon DynamoDB table, populate the table with some of the most popular boxing movies of all time and use AWS IAM to demonstrate the principle of least privilege by allowing read-only access using the AWS CLI from an EC2 Instance.</p><h3><strong>Go deeper:</strong></h3><p><strong>What is Amazon DynamoDB?</strong></p><p>Amazon DynamoDB is a fully managed NoSQL database service offered by AWS. It provides low latency, high scalability, and high availability for applications with consistent performance at any scale. DynamoDB supports both document and key-value data models and offers automatic and seamless scalability with its “pay-as-you-go” pricing model. It also includes features for managing data at scale, such as automatic partitioning, indexing, and distributed transactions.</p><p><strong>What are AWS Identity and Access Management (IAM) Roles?</strong></p><p>An AWS Identity and Access Management (IAM) role is an AWS Identity and Access Management entity that defines a set of permissions for making AWS service requests. IAM Roles are a secure way to grant permissions to entities that you trust. Roles enable you to delegate access with the least privilege permissions to trusted entities such as AWS services, applications, or external accounts. IAM roles also allow temporary access, which can be useful in situations where you need to grant access for a specific period.</p><p>Overall, IAM roles are a powerful tool for managing access to AWS resources in a secure and flexible way.</p><h4>Prerequisites</h4><ul><li>AWS Account and IAM user</li><li>Command Line Interface (CLI)</li></ul><h3><strong>Step 1: Create a DynamoDB table</strong></h3><p>Navigate to the DynamoDB dashboards and click “<strong>Create table</strong>”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D-MEClWUSNPjYrtwrbt7ag.png" /></figure><p>Next, give the DynamoDB table a name then provide a Partition key and optional Sort key.</p><p>In my demonstration, I went with “<strong>Movie Title</strong>” as my Partition key and “<strong>Boxer</strong>” as my Sort Key in the anticipation of <em>Creed III</em> this opening weekend!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7EQFpjJaoF_ZlwhyMG6dPA.png" /></figure><p>After entering the Partition key and Sort Key, click “<strong>Create Table</strong>”</p><p>Within a few seconds, the status should change from “<strong><em>Creating</em></strong>” to “<strong><em>Active</em></strong>”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wHCm6_gkgq4gddVDBgLOsA.png" /></figure><h4><strong>Add items to DynamoDB tables</strong></h4><p>On the left panel, click “<strong>Explore items</strong>”, then “<strong>Create items</strong>”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_02bdI298GAbUn2t5YJQLQ.png" /></figure><p>Now start entering the attributes with the corresponding values. In my demo, I added the Boxer “<strong>Apollo Creed</strong>” from the movie “<strong>Creed I, II, III</strong>”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wEYkmw0LULLRvzH18YUoHw.png" /></figure><p>After adding all items to the DynamoDB table, you have the ability to preview the table and all its items. This Boxing Movie table has been created with 11 of the most popular Boxing movies ever!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7iAR0HDA3j35cXnFob-H9g.png" /></figure><p>Since the DynamoDB tabel has now been created. We can proceed to our next step — IAM</p><h3><strong>Step 2: Launch EC2 with IAM role to scan DynamoDB table</strong></h3><ul><li>Create IAM Role to aollow read-only access authorization</li></ul><p>Navigate to the IAM landing page and on the left panel, click “<strong>Roles</strong>”, then “<strong>Create role</strong>”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e0iGUG--uQ_QkO4kEhFJMA.png" /></figure><p>Next select “<strong>AWS Service</strong>”, then in our used case we’re going to create an EC2 Instance so we’ll need to select “<strong>EC2</strong>”, then click “<strong>Next”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*umo1codt1qLEdJiVdARQ8g.png" /></figure><p>Now, we will search for the AWS managed IAM policy “<strong>DynamoDB</strong>”, selecting “<strong>DynamoDBReadOnlyAccess</strong>” policy then click “<strong>Next</strong>”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kAFuGRdq2kQMLpFJqdFuKg.png" /></figure><p>The policy is written in JSON, “<strong>Allows</strong>” the assuming of the role “<strong>Action</strong>” from the EC2 Instance “<strong>Service</strong>”. Next give the IAM role a name, then click “<strong>Create role</strong>”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y2AALCSV2QFsQ572I_wmKQ.png" /></figure><h3><strong>Step 3: Launch EC2 Instance</strong></h3><p>In order to connect into the AWS CLI to scan the DynamoDB table, we’’ll need to create an EC2 Instance.</p><p>Navigate to the EC2 dashboard, click “<strong>Launch instance</strong>”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*egNcKRAWD68M0qOXsCIOEg.png" /></figure><p>In the Amazon EC2 configuration option page, most of the configurations will remail at their default state to launch the EC2 Instance</p><p>Options:</p><blockquote><strong>Amazon Linux 2 AMI</strong></blockquote><blockquote>Instance type: <strong>t2.micro</strong></blockquote><blockquote>Select <strong>key pair</strong></blockquote><blockquote>Network setting: <strong>Auto-assign public IP</strong></blockquote><blockquote>Firewall: allow <strong>SSH</strong>, <strong>HTTPs</strong> and <strong>HTTP</strong> and allowing from <strong>Anywhere</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RS0F1MKX9MIRXppTl9FhUw.png" /></figure><p>Confirm configurations setting in the <strong>Summary</strong> section, then click “<strong>Launch instance</strong>”</p><h3>Step 4: Attach IAM Role to EC2 Instance</h3><p>Now it’s time to attach the DynamoDB read-only access IAM role to the EC2 which will allow the scan of the DynamoDB table. To do so: <strong>Actions</strong> → <strong>Security</strong> → <strong>Modify IAM role</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*96_ZATuXary28pMXoOaBYA.png" /></figure><p>Click “<strong>Update IAM role</strong>”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FOi_NMffIveEmYLsba5_MA.png" /></figure><p>The EC2 Instance is now launched with the IAM role authorizing read-only access to the DynamoDB table.</p><h3>Step 5: Verify scanning of DynamoDB table</h3><h4>Connect into EC2 Instance</h4><p>Go to EC2 dashboard, then select our EC2 Instance — the EC2 instnace can be connected into two ways</p><ul><li>EC2 Instance Connect</li><li>SSH from local machine</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z43HmVFbDTaBddHFRz80Og.png" /></figure><h3>Step 6: Scan DynamoDB Table</h3><p>To verify that the DynamoDB tabel can be scanned, which assures that the user have read access</p><p>To scan DynamoDB table, run the AWS CLI command — using the name of your DynamoDB table</p><pre>aws dynamodb scan --table-name &lt;name_of_dynamodb_table&gt; --region us-east-2</pre><p>A successful scan ran without any errors look like this below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HLm-D8-T4TnC0AzLfSFqAg.png" /></figure><h3>Step 7: Validate inability to write item to DynamoDB table</h3><p>Based on the IAM role which allows read-only access from the EC2 Instance, the user shouldn’t be able to write to the DynamoDB table.</p><p>Run the following command to attepmpt to write an item to the DynamoDB table</p><pre>aws dynamodb put-item --table-name &lt;table_name&gt; --item &#39;{&quot;&lt;partition_key&gt;&quot;: {&quot;S&quot;: &quot;&lt;value&gt;&quot;},&quot;&lt;sort_key&gt;&quot;: {&quot;S&quot;: &quot;&lt;value&gt;&quot;}}&#39; --region us-east-1</pre><p>You should recieved an “<strong>AccessDeniedException</strong>” error, saying you’re not “<strong>authorized to perform</strong>” put-item to write to the DynamoDB table</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5dd9aac31af7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Implement High Availability for Your Application with an Auto-Scaling Group of EC2 Instances]]></title>
            <link>https://medium.com/@palmer.jamal/how-to-implement-high-availability-for-your-application-with-an-auto-scaling-group-of-ec2-instances-9610495d42b4?source=rss-f503f82da60d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9610495d42b4</guid>
            <category><![CDATA[autoscaling]]></category>
            <category><![CDATA[high-availability]]></category>
            <category><![CDATA[amazon-web-services]]></category>
            <category><![CDATA[ec2-instance]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Jamal Palmer]]></dc:creator>
            <pubDate>Sun, 26 Feb 2023 04:01:50 GMT</pubDate>
            <atom:updated>2023-02-26T04:01:50.549Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jj_MW0Qzjdaix0fH9h4yhg.png" /></figure><p>Task:</p><ol><li>Create a VPC with cidr 10.10.0.0/16</li><li>Create three public subnets with 10.10.1.0/24 &amp; 10.10.2.0/24 &amp; 10.10.3.0/24</li><li>Create an autoscaling group using t2.micro instances. All instances should have apache installed on each instance with the ability to check any random IP address and be able to produce a test page. Ensure the autoscaling group is using the public subnets from #2.</li><li>The autoscaling min and max should be 2 and 5.</li><li>Create an Application Load Balancer to distribute traffic to the autoscaling group.</li><li>Create web server security group that allows inbound traffic from HTTP from your Application Load Balancer.</li><li>Create a load balancer security group that allows inbound traffic from HTTP from 0.0.0.0/0.</li></ol><p><strong>To create an Auto Scaling Group of EC2 Instances for High Availability, follow these steps:</strong></p><ol><li>Inside the AWS console navigate or search for VPC</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*JF9xj0IovH9eQwwIaxCrng.png" /></figure><p>2. Create a new VPC with CIDR block of 10.10.0.0/16</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*YQtWv8QqQpr2A9Gpsp4QDw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/306/1*t8l3C3PKXGR8BgXFkMH8nA.png" /><figcaption>Ensure you change IPv4 to 10.10.0.0/16</figcaption></figure><p>2. Customize public subnet in CIDR block to 10.10.1.0/24 &amp; 10.10.2.0/24 &amp; 10.10.3.0/24 and continue to creating VPC</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HV6WHPA9O1iDbiaa5lQTUw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/306/1*My8RBzI7wzx8PgwqMnEtWg.png" /><figcaption>Please Note: you have to manually do this take</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*WldBS27yJclCOIsTY-wdlg.png" /><figcaption>This is what success looks like!</figcaption></figure><p>3. Next, create an EC2 Launch Template</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*F57o4pChsTlsfT4Sciafrw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*L8kWhU6eGF_Dj80E-SFIig.png" /></figure><p>Select:</p><ul><li>AMI- Amazon Linux (Free tier)</li><li>T2 Micro (Free tier)</li><li>Key Pair</li></ul><p>4. Scroll down to create new security group</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/539/1*guDDhbNX9sXTPxHmoRM8DA.png" /><figcaption>Attached the VPC just created here</figcaption></figure><p>5. Security Group: Ensure it will be reachable from anywhere</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*dlcH2sBd-nUKo2_o5s_5-w.png" /></figure><p>6. Advance Details: Install Apache</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/297/1*4H1cUDtDpnjGfdLlSJIAVw.png" /></figure><p>7. Create Launch Template</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*w-mUNVx-cnqj0_ygtJuHuw.png" /></figure><p>8. Go to auto-scaling, create and launch template</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*xvCxB_d6YojLqXJYBKooBg.png" /></figure><p>9. Next, attach week 7 VPC and the 3 public subnet</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*g5_EOOU4zqV8tHyC5rBoVw.png" /></figure><p>10. Next, add Application Load Balancer</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/313/1*G5LdTb1ltIqI2_O6ke6h8g.png" /></figure><p>11. Configure group size and create auto-scaling group</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*tQZtjhDSi7EFqkpiMERmHQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XmYsV_gQQQ0D1DrxEoMVKw.png" /></figure><p>12. Looks like a success now let’s verify the public IP address</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M2CgVX_mXLuG1ajI-6VsWA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m5Xzi--oVBbEhLJF7aVxBw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jy1l_YsHqv7NmeCqdaPeBg.png" /><figcaption>SUCCESSFUL!</figcaption></figure><p>By following these steps, you can create an Auto Scaling Group of EC2 Instances for High Availability. This will help to ensure that your application is always available, even during periods of high traffic or demand.</p><p>Go deeper:</p><p>Auto Scaling Groups (ASG) is a feature provided by Amazon Web Services (AWS) that allows you to automatically scale the number of Amazon Elastic Compute Cloud (EC2) instances in response to changes in demand for your application. This helps to ensure that your application is highly available, and able to handle increased traffic without any downtime.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9610495d42b4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Installing Apache on AWS EC2]]></title>
            <link>https://medium.com/@palmer.jamal/installing-apache-on-aws-ec2-155d34593e3f?source=rss-f503f82da60d------2</link>
            <guid isPermaLink="false">https://medium.com/p/155d34593e3f</guid>
            <category><![CDATA[ec2-instance]]></category>
            <category><![CDATA[ec2]]></category>
            <category><![CDATA[apache]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[apache-web-server]]></category>
            <dc:creator><![CDATA[Jamal Palmer]]></dc:creator>
            <pubDate>Sun, 19 Feb 2023 06:05:27 GMT</pubDate>
            <atom:updated>2023-02-20T23:37:07.665Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*ebjFQ2aqzvE47vkTnEhIGA.png" /></figure><p>Hi everyone! Welcome to Week # 6: Level Up in Tech…</p><p><strong>Situation</strong>: Create an Ec2 instance with a webserver, use the user-data field, write a script that updates all packages, installs Apache, and start the Apache service. Once done, verify the instance has the Apache webserver downloaded and install via the public IP. Good luck!</p><p><strong>Actions</strong></p><p>Step 1: Create a EC2 Instance in AWS Management Console — use a t2.micro EC2 instance with the OS of your choice</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*Lquk_MLkJPKKA-nPtzES8A.png" /></figure><p>Step 2: Enter all the custom parameters — in this scenario I chose the following:</p><ul><li>Give it a name and tag</li><li>Amazon Linux</li><li>T2.micro instance type</li><li>Assign a Key Pair</li><li>Network setting (see image below)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*KKeFei143dWdt8GOZ5bnhg.png" /></figure><p>Step 3: Use a script that updates all packages, install Apache, and start the Apache service.</p><blockquote>Scroll down to the advanced details section where you’ll find ‘User- data’ field at the bottom of the page. Write or paste the BASH script to update and install all services</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*ofiqIspWn9aaTlhJPIzQyA.png" /><figcaption>Do not need to add ‘sudo’ because it is already running at root level</figcaption></figure><p>Step 4: Launch the Instance</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*mXvn1oKrC6tdh1wkxmXvUA.png" /></figure><p>Step 5: Very that the instance has the Apache webservice downloaded and installed via the public IP address</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jhr1CvJhKbEisIhm6Q1IIQ.png" /></figure><p><strong>ADVANCED</strong></p><p>Situation: Do all of the steps above through the AWS CLI</p><p>Step 1: Open your PC PowerShell and SSH into EC2 Instance</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*HFXmDGsKgBkdDOWvFJCNDw.png" /></figure><p>Steps 2: Enter the following commands</p><pre>aws -- version<br>aws configure<br>enter your: AWS Access Key ID<br>enter your: Aws Secret Access Key<br>Default region: us-east-1<br>Default output format: json</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*EHrKQMApHTHxvv5V8XUYgQ.png" /></figure><p>To launch an EC2 Instance you’ll need the following information</p><ul><li>Security Groups, AMI ID, VPC ID, Project ID</li></ul><p>Step 3: Describe key Pair</p><pre>aws ec2 describe-key-pairs --key-name &lt;Keyname&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*MtjhwFL9qcdeLdtDhAPhFw.png" /></figure><p>Step 4: Location your VPC ID</p><pre>aws ec2 describe-vpcs --filters &quot;Name=isDefault,Values=true&quot;</pre><p>Step 5 : Create a security group</p><pre>aws ec2 create-security-group --group-name project-sg --description &quot;My security group&quot; --vpc-id vpc-XXXXXXXXXXXXXX</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*JPXHwuEdv-t_tgf_B3X-_g.png" /></figure><p>Step 6: Add rule to security group and allow inbound traffic — TCP Port 22 &amp; 80 for HTTP connection</p><pre>aws ec2 authorize-security-group-ingress --group-id sg-XXXXXXXXXXXXX --protocol tcp --port 22 --cidr 0.0.0.0/0<br>aws ec2 authorize-security-group-ingress --group-id sg-XXXXXXXXXXXXX --protocol tcp --port 80 --cidr 0.0.0.0/0</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QrENr_VikiaXZ6sApFtAoQ.png" /></figure><p>Step 7: Confirm the rules created for security group</p><pre>aws ec2 describe-security-groups --group-ids sg-XXXXXXXXXXXXX</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OnW7vnkih4ViIK7K25AIfQ.png" /></figure><p>Step 8: Create Apache script and create an EC2 Instance to lauch the webserver</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*tYanJUjGf8vTJORfRCfuiw.png" /></figure><p>Step 9: Finally. Launch EC2 Instance</p><pre>aws ec2 run-instances --image-id ami-XXXXXXXXXX --count 1 --instance-type t2.micro --key-name KeyProject --security-group-ids sg-XXXXXXXXXXXXXX --user-data file://Project4EC2_Script.sh</pre><p>Step 10: Now, go back to the AWS Console — EC2 — Instance and open address</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*1LOIpm8Kvk9PVB2MmCbV5g.png" /></figure><pre><a href="http://54.91.199.102/">http://54.91.199.102/</a></pre><p><strong>Successful!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QBYELdoHzFWvxmlbB4EzVg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=155d34593e3f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating an EC2 Instance from AWS Console]]></title>
            <link>https://medium.com/@palmer.jamal/creating-an-ec2-instance-from-aws-console-460c1753f749?source=rss-f503f82da60d------2</link>
            <guid isPermaLink="false">https://medium.com/p/460c1753f749</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[ec2-instance]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[web-server]]></category>
            <category><![CDATA[apache]]></category>
            <dc:creator><![CDATA[Jamal Palmer]]></dc:creator>
            <pubDate>Sun, 12 Feb 2023 08:16:36 GMT</pubDate>
            <atom:updated>2023-02-12T20:32:40.664Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wjEttvsy7nKLs23B.jpg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/105/0*qdK4KYd6WSHMzLSZ.png" /></figure><p><strong>The Situation:</strong></p><p>Your company wants to start shifting from using on premises servers to using servers in the cloud. Rather than purchasing all the infrastructure in a data center they ask you to create an EC2 instance in AWS to host their new website.</p><p><strong>The Actions:</strong></p><ol><li>Log into AWS Console, select EC2, next launch instance</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EzGG_NeusvYQLnYr8dGS_w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*OBul3da4CUloBPv8pouzQA.png" /></figure><p>2. Go through options to launch instance</p><blockquote>-<strong>Name and tags</strong></blockquote><blockquote>-Application and OS Images (Amazon Machine Image) Info</blockquote><blockquote>-Instance type (Amazon Linux t2.micro)<br> — Key pair <br>- Network Setting amd Security Group<br> allow inbound traffic on HTTP for 0.0.0.0/0 and allow inbound traffic on SSH of my IP address</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/1*g88ES-NPpJADbyWZqIsw4w.png" /></figure><p>3. Using Powershell — SSH into Amazon Linux 2 AMI instance using key pair (.pem file)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/1*j0F_jYzCUXFLGRqwrDcdWg.png" /></figure><p><strong>Install Apache w/ a custom webpage using a BASH script</strong></p><p>4. Create new file and give file executive rights from VIM</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*mhb1AZ8i-WlHoyeFhiwgTg.png" /></figure><p>5. Enter BASH script details below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*OYOYb5do0ag3h7RI-VmGcQ.png" /></figure><p>6. Be sure to elevate permission to root or ue the sudo command inside of the BASH script</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*aObytMVYetNUz5v3qEHp-A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5l0-zP0J1ysj6884CV2HMQ.png" /></figure><p>7. Run script</p><pre>./create_apache.sh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*mRFUbCtgAVPYZDeQDNKieQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*L1irLN2b1BW-ExW1YMoJkQ.png" /></figure><p>8. Verify public IP address in web browser</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*e0LGaM3mvIuzHok8uO3LGQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=460c1753f749" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Installing an Apache Web Server on Ubuntu]]></title>
            <link>https://medium.com/@palmer.jamal/installing-an-apache-web-server-on-an-ubuntu-server-469dcd9a5f47?source=rss-f503f82da60d------2</link>
            <guid isPermaLink="false">https://medium.com/p/469dcd9a5f47</guid>
            <category><![CDATA[acloudguru]]></category>
            <category><![CDATA[ubuntu-server]]></category>
            <category><![CDATA[apache]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Jamal Palmer]]></dc:creator>
            <pubDate>Mon, 23 Jan 2023 13:02:30 GMT</pubDate>
            <atom:updated>2023-01-23T16:49:20.634Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*XElpLLqyGb18PGYh.jpg" /></figure><p>In this guide I will take you through the steps I took to install an Apache Web Server using an Ubuntu Server and creating a test website.</p><p><strong>The Situation: </strong>The Linux Admin wants to set up a test website on test Linux server</p><p><strong>Task</strong>: To install test web server to spin up the new website.</p><p><strong>Actions</strong>:</p><blockquote><em>Using the command line in Ubuntu</em></blockquote><ol><li>Update all packages on the Ubuntu server</li></ol><pre>a. sudo apt-get update<br>b. sudo apt-get upgrade</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*kDOh-Pr1_tMlnif1E3kQxw.png" /></figure><p>2. Install an Apache HTTP Web Server and confirm an active status</p><pre>a. Sudo apt install apache2<br>b. systemctl status apache2</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*gzhRXNnE2TtEaLMuTiopSw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*FGsWW9Dz_By5_2oIfR-oEw.png" /><figcaption>Status: Active (running)</figcaption></figure><p>3. Update Firewall Server</p><pre>a. sudo ufw app list<br>b. sudo ufw allow &#39;Apache Full&#39;<br>c. sudo ufw allow OpenSSH</pre><p>4. Enable the Apache Web Server</p><pre>a. sudo ufw enable<br>b. sudo ufw status</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*WNwTQqSSlkcEkybFu6jFyQ.png" /></figure><p>5. Get Public IP address</p><pre>a. curl -4 icanhazip.com</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*1dHtiPZlNBsJB6MLpiEb7A.png" /></figure><p>6. Disable default site page and activate the new configuration page</p><pre>a. Sudo a2dissite 000-default.conf<br>b. systemctl reload apache2</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*OjPa8ZJtWkbp_6Gminhslg.png" /></figure><p>7. Set up directory and test website</p><pre>a. cd /var/wwww/html<br>b. sudo mk Website_Name <br>c. sudo mkdir public_html<br>d. sudo mkdir log<br>e. sudo mkfir backups<br>f. cd Website_Name<br>g. cd public_html<br>h. sudo nano index.html</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*JlYPBxNyqdXs7sLU4tv-oQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*KpUU63LqcqwK0FvACyUXSA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/380/1*1U4oZ6biQvVmK444K7tZXw.png" /></figure><p>8. <strong>Results</strong>: Refresh webpage. All done</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/429/1*fTmaFfdliChGhW9_MkUHww.png" /></figure><h3>Go deeper</h3><p>What is an Apache Server?<em> An Apache Server is a web server that handle request from web browsers and respond with content for visitors. Apache is the standard, most use whether they’re on Linux, Windows or Mac OS.</em></p><p>Why it matters: <em>To start, it’s free. Plus, Apache’s open-source focus attracts a vibrant community of talented developers around the world. Which result in a product that’s always improving and can be highly customized with blocks of code called </em><a href="https://httpd.apache.org/docs/2.4/mod/"><em>modules.</em></a></p><p>What is an Ubuntu Server? <em>An Ubuntu Server is a server operating system and its open source programmers around the world that works with nearly any hardware and virtualization platform. It serve up websites, file shares and containers.</em></p><p>Why it matters: <em>Over the past few years ever since Infrastructure as a Service (IaaS) has taken off, Ubuntu has become one of the biggest players in running these type of services in the cloud.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=469dcd9a5f47" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>