<?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 Sarinabalami on Medium]]></title>
        <description><![CDATA[Stories by Sarinabalami on Medium]]></description>
        <link>https://medium.com/@sarinabalami123?source=rss-b7a20c9c24bd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*36Z10CJ46alNP-MmRvDPcw.jpeg</url>
            <title>Stories by Sarinabalami on Medium</title>
            <link>https://medium.com/@sarinabalami123?source=rss-b7a20c9c24bd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 14:56:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sarinabalami123/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 Your First Serverless API with AWS Lambda and API Gateway (Step-by-Step)]]></title>
            <link>https://medium.com/@sarinabalami123/creating-your-first-serverless-api-with-aws-lambda-and-api-gateway-step-by-step-218f5419962b?source=rss-b7a20c9c24bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/218f5419962b</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws-api-gateway]]></category>
            <dc:creator><![CDATA[Sarinabalami]]></dc:creator>
            <pubDate>Wed, 22 Jul 2026 06:15:38 GMT</pubDate>
            <atom:updated>2026-07-22T06:15:38.734Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong><em>Learn how to build and deploy a fully functional serverless REST API on AWS — without provisioning or managing a single server.</em></strong></blockquote><h3>Introduction</h3><p>Imagine deploying a backend API without creating an EC2 instance, configuring an operating system, or worrying about scaling during traffic spikes. That’s exactly what <strong>serverless computing</strong> offers.</p><p>With <strong>AWS Lambda</strong>, you simply write your code, upload it, and let AWS handle the infrastructure. Pair it with <strong>Amazon API Gateway</strong>, and your code instantly becomes accessible over HTTPS through a public endpoint.</p><p>In this tutorial, we’ll build a simple serverless API that returns the message:</p><pre>&quot;Hello from AWS Lambda!&quot;</pre><p>Although the application is intentionally simple, it introduces the same architecture used by many production-grade applications, including REST APIs, microservices, automation tools, and backend services.</p><p>By the end of this guide, you’ll understand how an HTTP request travels from a client to API Gateway, invokes a Lambda function, and returns a response — all without managing any servers.</p><h3>What You’ll Build</h3><p>The architecture we’ll create is straightforward:</p><pre>Browser / Postman<br>        │<br>        ▼<br>Amazon API Gateway<br>        │<br>        ▼<br>   AWS Lambda<br>        │<br>        ▼<br> JSON Response</pre><p>Here’s what happens behind the scenes:</p><ol><li>A client sends an HTTP request.</li><li>API Gateway receives the request.</li><li>API Gateway invokes the Lambda function.</li><li>Lambda executes the Python code.</li><li>The JSON response is returned to the client.</li></ol><p>This request-response flow is the foundation of many modern serverless applications.</p><h3>Prerequisites</h3><p>Before getting started, make sure you have:</p><ol><li>An AWS account</li><li>Access to the AWS Management Console</li><li>An IAM user with permissions for:</li></ol><ul><li>AWS Lambda</li><li>Amazon API Gateway</li><li>Amazon CloudWatch</li></ul><h3>Step 1: Sign in to AWS</h3><p>Log in to the <strong>AWS Management Console</strong> using your credentials.</p><p>Once you’re signed in, you’ll use the AWS search bar to navigate between services.</p><h3>Step 2: Create a Lambda Function</h3><p>Search for <strong>Lambda</strong> and select the service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TSuBCnlhk4Rw5v1s-EpUYg.png" /><figcaption><strong>Figure 1:</strong> Navigating to AWS Lambda from the console search menu.</figcaption></figure><p>Choose <strong>Create Function</strong> and select <strong>Author from Scratch</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zaT2KsE1_YiBaQ7_5jMZ1Q.png" /><figcaption><strong>Figure 2:</strong> Configuring basic information for creating a new AWS Lambda function.</figcaption></figure><p>Configure the function as follows:</p><pre>| Setting       | Value                                           |<br>| ------------- | ----------------------------------------------- |<br>| Function Name | HelloWorldLambda                                |<br>| Runtime       | Python 3.13                                     |<br>| Architecture  | x86_64                                          |<br>| Permissions   | Create a new role with basic Lambda permissions |</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m_IJnH1zobZ978hQLXMKoQ.png" /><figcaption><strong>Figure 3:</strong> Reviewing custom settings and clicking <strong>Create function</strong> in the AWS Lambda console.</figcaption></figure><p>Click <strong>Create Function</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0YkFhCNsvFt_iutLFCyp2Q.png" /><figcaption><strong>Figure 4:</strong> Viewing post-creation development options, including local setup and AI agent integration.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J76iryP3WOdGr7hG4LHyvQ.png" /><figcaption><strong>Figure 5:</strong> Viewing the AWS Lambda function dashboard and architecture diagram after creation.</figcaption></figure><p>AWS automatically creates the execution environment and an IAM role that allows the function to write logs to CloudWatch.</p><h3>Step 3: Write the Function Code</h3><p>Replace the default code with the following Python function.</p><pre>import json<br><br>def lambda_handler(event, context):<br>    return {<br>        &quot;statusCode&quot;: 200,<br>        &quot;body&quot;: json.dumps(&quot;Hello from AWS Lambda!&quot;)<br>    }</pre><p>Deploy the function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eEBeG1CHoxaDYgI_0JtJWQ.png" /><figcaption><strong>Figure 6:</strong> Viewing the default lambda_function.py source code in the AWS Lambda inline code editor.</figcaption></figure><h3>Step 4: Test the Lambda Function</h3><p>Before exposing the function publicly, it’s good practice to verify that it works correctly.</p><p>Create a new test event:</p><ul><li><strong>Event Name:</strong> TestEvent or random</li><li><strong>Template:</strong> Hello World</li></ul><p>Use the following JSON:</p><pre>{}</pre><p>Run the test.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PzN0jyH38uhbF_aXBYjUNw.png" /><figcaption><strong>Figure 7:</strong> Setting up synchronous invocation and event parameters in the <strong>Create new test event</strong> panel.</figcaption></figure><p>You should receive:</p><pre>{<br>  &quot;statusCode&quot;: 200,<br>  &quot;body&quot;: &quot;\&quot;Hello from AWS Lambda!\&quot;&quot;<br>}</pre><p>If you see this response, your Lambda function is working as expected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h2mSITWVjLf3KuR36deUfQ.png" /><figcaption><strong>Figure 8:</strong> Executing the Lambda function with the saved test event and viewing the returned statusCode: 200 response.</figcaption></figure><h3>Step 5: Create an HTTP API</h3><p>Next, we’ll expose the Lambda function through an HTTP endpoint.</p><p>Open <strong>Amazon API Gateway</strong> and choose <strong>Create API</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BdWWaEBL5jNcLHflHt815w.png" /><figcaption><strong><em>Figure 9:</em></strong><em> Navigating to Amazon API Gateway from the console search menu.</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4toYjIKD88MFVMrlvwGkmg.png" /><figcaption><strong>Figure 10:</strong> Navigating to the APIs section in API Gateway and preparing to create a new API using the <strong>Create API</strong> button.</figcaption></figure><p>Select <strong>HTTP API</strong>, then click <strong>Build</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oo83CHXujPWwCMSk3BxChg.png" /><figcaption><strong>Figure 11:</strong> Choosing to build an HTTP API to integrate with AWS Lambda backends.</figcaption></figure><h3>Why API Gateway?</h3><p>Lambda functions cannot be called directly from a web browser.</p><p>API Gateway acts as the public interface for your application and provides features such as:</p><ul><li>HTTPS endpoints</li><li>Authentication and authorization</li><li>Request validation</li><li>Monitoring</li><li>Rate limiting</li><li>Automatic scaling</li></ul><p>This makes it the ideal companion for Lambda-based applications.</p><h3>Step 6: Connect API Gateway to Lambda</h3><p>Choose <strong>Add Integration</strong>.</p><p>Select <strong>Lambda</strong> and pick the function.</p><p>At this point, API Gateway knows which Lambda function should handle incoming requests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FsLPqlbM3ApQtFYXkDTtYg.png" /><figcaption><strong>Figure 12:</strong> Setting the API name to “sarinaAPI” and adding a Lambda function integration.</figcaption></figure><h3>Step 7: Create a Route</h3><p>Create the following endpoint.</p><pre>| Method | Route  |<br>| ------ | ------ |<br>| GET    | /hello or random |</pre><p>Whenever a client sends a GET request to /hello or random path-name, API Gateway invokes the Lambda function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pmyziSOhxfQtEqvZjjoUjw.png" /><figcaption><strong>Figure 13:</strong> Defining the HTTP route method and path to map incoming requests to the Lambda integration.</figcaption></figure><h3>Step 8: Deploy the API</h3><p>Create a deployment stage.</p><pre>| Setting     | Value   |<br>| ----------- | ------- |<br>| Stage       | prod    |<br>| Auto Deploy | Enabled |</pre><p>A stage represents a deployed version of your API.</p><p>Common environments include:</p><ul><li>Development</li><li>Testing</li><li>Staging</li><li>Production</li></ul><p>Using stages allows you to deploy updates without affecting production users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZZ-ji4Tp1NgMYM0sEq2vUQ.png" /><figcaption><strong>Figure 14:</strong> Adding a new prod deployment stage and configuring auto-deploy settings.</figcaption></figure><h3>Step 9: Publish the API</h3><p>Review the configuration and create the API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5kgfG3feubnzPEb1nCyXcw.png" /><figcaption><strong>Figure 15:</strong> Confirming the API name, Lambda integrations, routes, and stages on the <strong>Review and create</strong> page.</figcaption></figure><p>AWS automatically deploys the endpoint.</p><p>One of the biggest advantages of serverless computing becomes apparent here:</p><ul><li>No EC2 instances</li><li>No load balancers</li><li>No web servers</li><li>No infrastructure maintenance</li></ul><p>AWS manages everything behind the scenes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c0yxtz3WaPeLiUKseAN3GA.png" /><figcaption><strong>Figure 16:</strong> Viewing the created /sarina route under the <strong>Routes</strong> section of API Gateway.</figcaption></figure><h3>Step 10: Invoke the API</h3><p>After deployment, API Gateway generates an Invoke URL similar to:</p><pre>https://abc123.execute-api.us-east-1.amazonaws.com</pre><p>Append the route:</p><pre>https://abc123.execute-api.us-east-1.amazonaws.com/hello</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S3Bc536mUZve10L5MsqA1Q.png" /><figcaption><strong>Figure 17:</strong> Accessing the API overview page to view details, ARN, and Invoke URLs for $default and prod stages.</figcaption></figure><p>Visit the URL in your browser or send a request using Postman or cURL.</p><h3>Step 11: Verify the Response</h3><p>You should receive:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YH6qTQ3LqvmlBq50JFGhqA.png" /><figcaption><strong>Figure 18:</strong> Accessing the API Gateway Invoke URL via browser to verify successful execution of the Lambda function.</figcaption></figure><p>Congratulations! 🎉</p><p>You’ve successfully deployed your first serverless API.</p><h3>Step 12: Monitor with CloudWatch</h3><p>Every Lambda invocation automatically generates execution logs in Amazon CloudWatch.</p><p>Navigate to:</p><p><strong>Lambda → Lambdafunctions → Monitor → View CloudWatch Logs</strong></p><p>CloudWatch provides valuable insights, including:</p><ul><li>Execution time</li><li>Memory consumption</li><li>Request IDs</li><li>Error messages</li><li>Debug output</li></ul><p>These logs become invaluable when troubleshooting production applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DQ78YWCzHtXiCw1ty9VjVg.png" /><figcaption><strong>Figure 19:</strong> Accessing the <strong>Monitor</strong> tab in AWS Lambda and clicking <strong>View CloudWatch logs</strong> to inspect function execution metrics.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mHofDflyd0JeWuPorQfN3Q.png" /><figcaption><strong>Figure 20:</strong> Inspecting log group details and streams in Amazon CloudWatch to analyze Lambda execution logs.</figcaption></figure><p>Architecture Overview</p><pre>HTTP Client<br>     │<br>     ▼<br>Amazon API Gateway<br>     │<br>     ▼<br>AWS Lambda<br>     │<br> Executes Python Code<br>     │<br>     ▼<br>JSON Response<br>     │<br>     ▼<br>Browser / Postman</pre><h3>Why Serverless?</h3><p>Traditional applications require developers to manage virtual machines, install software, configure scaling, and apply security patches.</p><p>With AWS Lambda and API Gateway, AWS handles all of that for you.</p><p>Key benefits include:</p><ul><li>No server management</li><li>Automatic scaling</li><li>Pay only when your code executes</li><li>High availability by default</li><li>Built-in monitoring</li><li>Tight integration with the AWS ecosystem</li></ul><p>This architecture is widely adopted for REST APIs, event-driven systems, backend services, automation, and microservices.</p><h3>Final Thoughts</h3><p>Building a serverless API with AWS Lambda and API Gateway is one of the easiest ways to get started with cloud-native development. In just a few steps, you’ve created a Python function, tested it locally, exposed it through a secure HTTP endpoint, and monitored its execution using CloudWatch — all without provisioning or managing a single server.</p><p>While this example returns a simple message, the same architecture can power real-world applications such as e-commerce backends, authentication systems, chatbots, data processing pipelines, and event-driven microservices.</p><p>As you continue your AWS journey, try enhancing this project by connecting it to a database, handling dynamic request parameters, or implementing authentication with Amazon Cognito. Each addition will deepen your understanding of serverless architecture and prepare you for building production-ready cloud applications.</p><p>Happy building, and welcome to the world of serverless computing!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=218f5419962b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Launching My First Static Website on AWS EC2 Using Nginx]]></title>
            <link>https://medium.com/@sarinabalami123/launching-my-first-static-website-on-aws-ec2-using-nginx-9c0a13e74425?source=rss-b7a20c9c24bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c0a13e74425</guid>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[amazon-ec2]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Sarinabalami]]></dc:creator>
            <pubDate>Thu, 16 Jul 2026 18:29:20 GMT</pubDate>
            <atom:updated>2026-07-16T18:29:20.475Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How I deployed a simple static website on an Ubuntu EC2 instance and learned the fundamentals of cloud hosting.</em></p><p>Cloud computing had always sounded complicated to me, but after completing my first AWS EC2 lab, I realized that deploying a website in the cloud is much easier than I expected.</p><p>In this hands-on lab, I learned how to launch an Ubuntu EC2 instance, install and configure Nginx, create a static website, and make it accessible through a public IP address. If you’re just getting started with AWS or Linux, this guide will walk you through the entire process.</p><h3>Why Deploy a Static Website on EC2?</h3><p>Hosting a static website on AWS EC2 is one of the best beginner projects because it introduces several important cloud concepts, including:</p><ul><li>Creating virtual machines in AWS</li><li>Working with Linux servers</li><li>Installing web servers</li><li>Managing website files</li><li>Configuring networking and security</li><li>Making applications accessible over the internet</li></ul><p>By the end of this project, you’ll have your own website running on an AWS virtual server.</p><h3>Step 1: Launch an EC2 Instance</h3><p>First, log in to the AWS Management Console and search for <strong>EC2</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ob2GF1CXcofuBPPW2mMNgQ.png" /><figcaption>Figure 1: Active EC2 instances and resource summary in the AWS Management Console.</figcaption></figure><p>Click <strong>Launch Instance</strong> to create a new virtual machine.</p><p>For this lab, I selected:</p><ul><li><strong>Operating System:</strong> Ubuntu</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*otNQuvCB2Gbb9PH3bG-M_w.png" /><figcaption>Figure 2: Configuring the OS image and instance details in the AWS launch wizard.</figcaption></figure><ul><li><strong>Instance Type:</strong> Free Tier eligible</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DdIlaXa2xHoeh_2TkPuhyg.png" /><figcaption>Figure 3: Selecting the Ubuntu Server 26.04 LTS AMI and configuring the t2.micro instance type.</figcaption></figure><ul><li><strong>Key Pair:</strong> Created a new .pem key for SSH authentication</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8aGLAlDcEu1_QPVLv998rw.png" /><figcaption>Figure 4: Generating a new RSA key pair (.pem format) to enable secure SSH access to the instance.</figcaption></figure><ul><li><strong>Security Group:</strong></li><li>Allow SSH (Port 22)</li><li>Allow HTTP (Port 80)</li><li>Allow HTTPS (Port 443)</li></ul><p>These security rules are important because they allow remote access to the server and enable users to access the website through a browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JFdBltgoeHeJQc1iuyFDxg.png" /><figcaption>Figure 5: Configuring network settings, enabling public IP auto-assignment, and setting up security group rules for SSH, HTTP, and HTTPS traffic.</figcaption></figure><h3>Step 2: Connect to the EC2 Instance</h3><p>After the instance reached the <strong>Running</strong> state, I selected it and clicked <strong>Connect</strong>.</p><p>AWS provides multiple connection methods. Since this was a beginner lab, I connected using the browser-based terminal provided by AWS.</p><p>Once connected, I was greeted with my Ubuntu terminal and could begin configuring the server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6xMD49cZZAeNDHKXg9vmzg.png" /><figcaption>Figure 6: The AWS Management Console initiating the launch sequence for the new EC2 instance.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_c_EGTfZduMXBCXjP2J9kQ.png" /><figcaption>Figure 7: The newly created EC2 instance showing a status of ‘Running’ with all status checks successfully passed.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DVgWryMVHd9W1p2SKnxB2w.png" /><figcaption>Figure 8: Preparing to connect to the server using the web-based EC2 Instance Connect tool with the default ‘ubuntu’ username.</figcaption></figure><h3>Step 3: Update the Server</h3><p>Before installing any software, it’s always a good practice to update the package list.</p><pre>sudo apt update</pre><p>Updating ensures the server downloads information about the latest available packages before installation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NcR4aFHCVA0pY7pjS1CJ7g.png" /><figcaption>Figure 9: Running the sudo apt update command to refresh the package index on the newly launched Ubuntu instance.</figcaption></figure><h3>Step 4: Install Nginx</h3><p>Next, I installed the Nginx web server.</p><pre>sudo apt install nginx -y</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_a4SRYX093XX5uqmY_drgw.png" /><figcaption>Figure 10: Installing the Nginx web server on our Ubuntu instance using the command.</figcaption></figure><p>After installation, I started the service and configured it to launch automatically whenever the server boots.</p><pre>sudo systemctl start nginx<br>sudo systemctl enable nginx</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9th65rLnHKnGUCFLjkOFvQ.png" /><figcaption>Figure 11: Starting the Nginx service and enabling it to launch automatically on system boot.</figcaption></figure><p>Finally, I verified that Nginx was running successfully.</p><pre>systemctl status nginx</pre><p>Seeing the service active confirmed that the web server had been installed correctly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KoZJO2AOzdVu5cUSmuheXw.png" /><figcaption>Figure 12: Running systemctl status nginx to verify that the web server is active, running, and enabled.</figcaption></figure><h3>Step 5: Create a Website Directory</h3><p>Instead of using the default Nginx website, I created a separate directory for my project.</p><pre>sudo mkdir -p /var/www/hello</pre><p>Then I changed the ownership so I could edit the files without permission issues.</p><pre>sudo chown -R $(whoami):$(whoami) /var/www/hello</pre><p>Keeping each website inside its own directory makes server management much cleaner and more organized.</p><h3>Step 6: Create the Homepage</h3><p>Inside the project directory, I created an index.html file.</p><pre>nano /var/www/hello/index.html</pre><p>I added a simple HTML page that displayed a welcome message.</p><p>Although this was only a basic webpage, it demonstrated how static websites are served by a web server without requiring any backend technology.</p><h3>Step 7: Configure Nginx</h3><p>Now it was time to tell Nginx where my website files were located.</p><p>I created a new configuration file.</p><pre>sudo nano /etc/nginx/conf.d/hello.conf</pre><p>Inside this file, I configured:</p><ul><li>Port 80</li><li>Website root directory</li><li>Default index file</li><li>Request handling</li></ul><p>This configuration allows Nginx to serve files from the /var/www/hello-site directory instead of its default location.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sSzF1WgazXtMwoWy391f_A.png" /><figcaption>Figure 13: Creating the web root directory, updating directory ownership permissions, and writing a custom Nginx configuration file.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YwAMUI48RTAWc6dX-ggTjA.png" /><figcaption>Figure 14: Editing the index.html file in /var/www/hello/ using the nano terminal editor to configure the frontend script.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DLo4DAuvGuMxv6lnVb6SZA.png" /><figcaption>Figure 15: Saving the changes in nano by confirming the modified buffer write-out.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tJ3q0GmSHtAXpmeOLnVB3Q.png" /><figcaption>Figure 16: Configuring a custom Nginx virtual host block to serve static files on port 80.</figcaption></figure><h3>Step 8: Test the Configuration</h3><p>Before restarting Nginx, I tested the configuration.</p><pre>sudo nginx -t</pre><p>If everything is correct, Nginx reports that the configuration test is successful.</p><p>Then I reloaded the server.</p><pre>sudo systemctl reload nginx</pre><p>Testing before reloading is a good habit because it prevents invalid configurations from breaking the web server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qu40Z_c8rqopdSVls2d8Ww.png" /><figcaption>Figure 17: Testing the Nginx configuration syntax with nginx -t and reloading the service to apply the changes.</figcaption></figure><h3>Step 9: Fixing the “Conflicting Server Name” Warning</h3><p>During the lab, I encountered the following warning:</p><pre>conflicting server name &quot;_&quot; on 0.0.0.0:80</pre><p>This happened because Ubuntu automatically enables the default Nginx website during installation.</p><p>To solve the issue, I checked the enabled sites:</p><pre>ls /etc/nginx/sites-enabled/</pre><p>The default configuration was still active.</p><p>I removed it:</p><pre>sudo rm /etc/nginx/sites-enabled/default</pre><p>Then I tested and reloaded Nginx again.</p><pre>sudo nginx -t<br>sudo systemctl reload nginx</pre><p>After that, the warning disappeared, and my custom website worked perfectly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mnTHhZutLT4HRPJirrUN3w.png" /><figcaption>Figure 18: Removing the default Nginx virtual host link from sites-enabled to resolve routing conflicts and reloading the service.</figcaption></figure><h3>Step 10: View the Website</h3><p>Finally, I copied the EC2 Public IP address and opened it in my browser.</p><pre>http://YOUR_PUBLIC_IP</pre><p>Seeing my own webpage hosted on an AWS cloud server was the most satisfying part of the lab.</p><p>At this point, my static website was publicly accessible over the internet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cQUQIGULq8Pa2fMHiSnsvA.png" /><figcaption>Figure 19: Opening a web browser and navigating to the instance’s public IP address to verify that the ‘Recommendation Universe’ web application is successfully deployed and running.</figcaption></figure><h3>Useful Linux Commands I Learned</h3><p>While working on this lab, I also became familiar with several Linux commands that helped me navigate the server.</p><p>Some of the most useful commands were:</p><pre>pwd</pre><p>Displays the current directory.</p><pre>ls</pre><p>Lists files and folders.</p><pre>ls -la</pre><p>Shows detailed information, including hidden files.</p><pre>cd /var/www</pre><p>Moves into the website directory.</p><pre>find / -type d -name &quot;hello-site&quot;</pre><p>Displays previously executed commands.</p><p>These commands became essential while managing files on the server.</p><h3>What I Learned</h3><p>This lab helped me understand much more than simply hosting a webpage.</p><p>Some of my key takeaways include:</p><ul><li>How AWS EC2 provides virtual cloud servers</li><li>Why security groups are important</li><li>How Nginx serves static websites</li><li>Basic Linux file management</li><li>Creating and editing configuration files</li><li>Troubleshooting Nginx configuration issues</li><li>Verifying services using systemctl</li><li>Deploying a website without using traditional web hosting</li></ul><h3>Final Thoughts</h3><p>Launching my first static website on AWS EC2 gave me practical experience with cloud infrastructure, Linux administration, and web server configuration. Although the project was simple, it introduced concepts that are widely used in real-world DevOps and cloud engineering environments. It’s one of the easiest ways to build confidence while learning cloud computing through hands-on practice.</p><p><strong>Tags:</strong><br> #AWS #EC2 #Ubuntu #Nginx #CloudComputing #Linux #WebDevelopment</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c0a13e74425" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>