<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Marvelous Osondu</title>
    <description>The latest articles on Forem by Marvelous Osondu (@marviecodes).</description>
    <link>https://forem.com/marviecodes</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2610905%2Ff3b1661a-ec79-4a5b-8ccc-95db4de4e7f7.jpeg</url>
      <title>Forem: Marvelous Osondu</title>
      <link>https://forem.com/marviecodes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/marviecodes"/>
    <language>en</language>
    <item>
      <title>Building an Event-Driven Architecture on AWS Using EventBridge and SNS for EC2 State Notifications</title>
      <dc:creator>Marvelous Osondu</dc:creator>
      <pubDate>Sat, 08 Nov 2025 20:45:16 +0000</pubDate>
      <link>https://forem.com/marviecodes/building-an-event-driven-architecture-on-aws-using-eventbridge-and-sns-for-ec2-state-notifications-4jmn</link>
      <guid>https://forem.com/marviecodes/building-an-event-driven-architecture-on-aws-using-eventbridge-and-sns-for-ec2-state-notifications-4jmn</guid>
      <description>&lt;p&gt;Event-driven architectures are the core of modern cloud systems. They allow applications to react automatically to changes, without needing constant manual intervention or polling mechanisms.&lt;/p&gt;

&lt;p&gt;In this lab, I implemented an event-driven workflow that monitors EC2 instance state changes and sends email notifications whenever an instance transitions between states, using Amazon EventBridge and Amazon Simple Notification Service (SNS).&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture Overview
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh7fl01qwkgqwp0eqs8uu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh7fl01qwkgqwp0eqs8uu.png" alt="lab architecture diagram" width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Goal:
&lt;/h2&gt;

&lt;p&gt;Trigger an email notification whenever an EC2 instance starts, stops, or terminates.&lt;/p&gt;

&lt;h2&gt;
  
  
  Services Involved:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Amazon EC2 – the compute instance whose state we’re monitoring.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Amazon EventBridge – to capture EC2 state change events.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Amazon SNS – to send notifications to subscribers (email).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Flow:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;An EC2 instance changes its state.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;EventBridge detects the state change event.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;EventBridge triggers an SNS topic.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SNS sends an email notification to the subscribed user.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Steps I Followed
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Created an EC2 instance – a simple instance to monitor.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Set up an SNS topic – and subscribed my email address to receive notifications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Created an EventBridge rule – configured it to listen for EC2 instance state change events.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Added SNS as the target for the EventBridge rule.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tested it by starting and stopping the EC2 instance — and watched email notifications come in automatically.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;This lab showed me how AWS services integrate seamlessly to create automated, reactive systems.&lt;br&gt;
Even with a small setup like this, the principle is clear, that in cloud architecture, events drive efficiency.&lt;/p&gt;

&lt;p&gt;I’m excited to explore more event-driven patterns using Lambda, SQS, and Step Functions next.&lt;/p&gt;

</description>
      <category>learningjourney</category>
      <category>aws</category>
      <category>cloudcomputing</category>
      <category>eventdriven</category>
    </item>
    <item>
      <title>Building an Event-Driven Architecture with AWS Config and Automated Remediation</title>
      <dc:creator>Marvelous Osondu</dc:creator>
      <pubDate>Sat, 08 Nov 2025 20:44:22 +0000</pubDate>
      <link>https://forem.com/marviecodes/building-an-event-driven-architecture-with-aws-config-and-automated-remediation-3n6i</link>
      <guid>https://forem.com/marviecodes/building-an-event-driven-architecture-with-aws-config-and-automated-remediation-3n6i</guid>
      <description>&lt;p&gt;In cloud environments, compliance and configuration management are critical. One small misconfiguration; like an instance type that doesn’t meet your company’s standards, can lead to performance issues or unnecessary costs.&lt;/p&gt;

&lt;p&gt;Recently, I set up an event-driven architecture on AWS that automatically evaluates the configuration of EC2 instances and triggers a remediation workflow when something’s off. In my case, the system sends me an email notification whenever an EC2 instance doesn’t meet the ideal configuration setting.&lt;/p&gt;

&lt;p&gt;Here’s how I built it:&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Enabling AWS Config
&lt;/h2&gt;

&lt;p&gt;I started by enabling AWS Config in my account. AWS Config continuously evaluates your resource configurations against defined rules, so it’s perfect for enforcing compliance standards.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Setting Up SNS for Notifications
&lt;/h2&gt;

&lt;p&gt;Next, I created an SNS topic to send alerts whenever a non-compliant resource is detected.&lt;br&gt;
Then, I subscribed to the topic using my email address — so any time remediation is triggered, I’d get an instant notification in my inbox.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Creating an IAM Role for Remediation
&lt;/h2&gt;

&lt;p&gt;I created a dedicated IAM role that allows AWS Config’s automated remediation feature to publish messages to the SNS topic.&lt;br&gt;
This step ensures that Config has the right permissions to trigger notifications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Defining the Config Rule
&lt;/h2&gt;

&lt;p&gt;After that, I set up an AWS Config rule to check the instance type of my EC2 instances.&lt;br&gt;
I specified that only instances of type t3.micro should be considered compliant.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Setting Up Automated Remediation
&lt;/h2&gt;

&lt;p&gt;Here’s where the magic happens — I configured automated remediation in AWS Config so that whenever a non-compliant instance is detected, AWS automatically executes an action (in this case, sending a message to SNS).&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: Testing It Out
&lt;/h2&gt;

&lt;p&gt;To test the setup, I launched an EC2 instance that wasn’t a t3.micro.&lt;br&gt;
Within moments, I received an email notification alerting me that the instance didn’t meet the required configuration.&lt;/p&gt;

&lt;p&gt;That confirmed my event-driven architecture was working exactly as intended.&lt;/p&gt;

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

&lt;p&gt;This project was a simple but powerful demonstration of how AWS services — like Config, SNS, and IAM — can work together to enforce compliance automatically in real-time.&lt;/p&gt;

&lt;p&gt;Event-driven architectures like this save teams from hours of manual checks and ensure that your cloud environment stays secure and optimized.&lt;/p&gt;

&lt;p&gt;If you’re looking to build a similar workflow, start with a small rule (like instance type) — and then scale up to include security groups, IAM policies, or even S3 bucket configurations.&lt;/p&gt;

&lt;p&gt;Below is a simple architecture diagram showing how AWS Config evaluates EC2 instances, triggers remediation, and sends notifications through SNS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh6676y9c2pfqav29uscw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh6676y9c2pfqav29uscw.png" alt="Config architecture" width="721" height="292"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>eventdriven</category>
      <category>aws</category>
    </item>
    <item>
      <title>AWS S3 Location Constraint Error? Here’s What You’re Doing Wrong</title>
      <dc:creator>Marvelous Osondu</dc:creator>
      <pubDate>Sat, 08 Feb 2025 08:59:29 +0000</pubDate>
      <link>https://forem.com/marviecodes/aws-s3-location-constraint-error-heres-what-youre-doing-wrong-4egp</link>
      <guid>https://forem.com/marviecodes/aws-s3-location-constraint-error-heres-what-youre-doing-wrong-4egp</guid>
      <description>&lt;p&gt;If you’re working with AWS S3 and trying to create a new bucket, you might have run into this frustrating error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;An error occurred (IllegalLocationConstraintException) when calling the CreateBucket operation: The unspecified location constraint is incompatible for the region specific endpoint this request was sent to.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I ran into this issue recently, and after a bit of debugging, I figured out exactly what was causing it. If you’re stuck, don’t worry—I’ll walk you through why this happens and how to fix it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Error Happens
&lt;/h2&gt;

&lt;p&gt;This error occurs because AWS requires you to explicitly specify a region when creating an S3 bucket outside of us-east-1. The problem arises when your AWS request is sent to a region-specific endpoint, but you don’t provide the correct location constraint for that region.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here’s the thing:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;If you create an S3 bucket in us-east-1, you don’t need to specify a region.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you create an S3 bucket in any other region (e.g., eu-west-1, ap-south-1, etc.), you must specify the LocationConstraint parameter.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If your AWS CLI or SDK request is configured for a different region than the one you're specifying, it will fail.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Fix: Explicitly Set the Region
&lt;/h2&gt;

&lt;p&gt;To fix this, update your code to ensure the S3 client is using the correct region and explicitly pass the LocationConstraint when needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fix for Python (boto3)
&lt;/h2&gt;

&lt;p&gt;If you’re using Python and boto3, update your code like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
import boto3

s3_client = boto3.client("s3", region_name="eu-west-1")

s3_client.create_bucket(
    Bucket="my-unique-bucket-name",
    CreateBucketConfiguration={"LocationConstraint": "eu-west-1"}
)

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Fix for AWS CLI
&lt;/h2&gt;

&lt;p&gt;If you’re using the AWS CLI, make sure to include the --region flag when creating your bucket:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
aws s3api create-bucket --bucket my-bucket-name --region eu-west-1 --create-bucket-configuration LocationConstraint=eu-west-1

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Double-Check Your AWS Configuration
&lt;/h2&gt;

&lt;p&gt;If you’re still getting errors, run this command to check your AWS default region:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
aws configure get region

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

&lt;/div&gt;



&lt;p&gt;If it’s not set correctly, update it with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
aws configure set region eu-west-1

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;This issue can be frustrating, but once you understand why it happens, it’s an easy fix. Always make sure your AWS S3 client or CLI request is aligned with the correct region, and explicitly specify the LocationConstraint if you're creating a bucket outside us-east-1.&lt;/p&gt;

&lt;p&gt;I hope this helped! &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Building a Simple AWS Resource Monitoring Script with Bash</title>
      <dc:creator>Marvelous Osondu</dc:creator>
      <pubDate>Mon, 27 Jan 2025 20:38:16 +0000</pubDate>
      <link>https://forem.com/marviecodes/building-a-simple-aws-resource-monitoring-script-with-bash-2o80</link>
      <guid>https://forem.com/marviecodes/building-a-simple-aws-resource-monitoring-script-with-bash-2o80</guid>
      <description>&lt;p&gt;As a buzzing Cloud/DevOps guy, I recently worked on creating a Bash script to monitor AWS resources. This project allowed me to understand how to interact with AWS services programmatically and automate routine tasks. In this article, I’ll walk you through how I approached this task and built the script.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Create an AWS Resource Monitoring Script?&lt;/strong&gt;&lt;br&gt;
AWS offers a wide range of services, and while their Management Console is powerful, having a lightweight script to quickly monitor resources like EC2 instances, S3 buckets, and CloudWatch metrics can be very handy. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisite and Setup&lt;/strong&gt;&lt;br&gt;
Before writing the script, I ensured the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AWS CLI:&lt;/strong&gt; That i had the AWS CLI installed and configured with the necessary permissions. If you don’t have it yet, you can install it from AWS CLI installation guide.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Bash Shell:&lt;/strong&gt; That the Bash shell was available on my system. It is available on most Linux and macOS systems by default.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Script Structure&lt;/strong&gt;&lt;br&gt;
The script is divided into three main monitoring functions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;EC2 Instances:&lt;/strong&gt; Fetches instance details like ID, state, type, and availability zone.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;S3 Buckets:&lt;/strong&gt; Lists all S3 buckets with their creation dates.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;CloudWatch Metrics:&lt;/strong&gt; Lists metrics for a specified namespace (default is AWS/EC2).&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Let's dive deep into it!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Checking AWS CLI Installation&lt;/strong&gt;&lt;br&gt;
The first thing the script does is check if the AWS CLI is installed. If not, it prompts the user to install it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fowwq4nilekhxlpsewe42.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fowwq4nilekhxlpsewe42.png" alt=" " width="774" height="140"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With this, we are sure that the script doesn’t proceed without the necessary tools.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Writing the Monitoring Functions&lt;/strong&gt;&lt;br&gt;
Each function queries AWS resources using the AWS CLI and formats the output into a readable table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Monitor EC2 Instances:&lt;/strong&gt; The script uses &lt;code&gt;aws ec2 describe-instances&lt;/code&gt; to fetch details about all EC2 instances.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Monitor S3 Buckets:&lt;/strong&gt; This function lists all S3 buckets using &lt;code&gt;aws s3api list-buckets&lt;/code&gt;.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Monitor CloudWatch Metrics:&lt;/strong&gt; This function fetches CloudWatch metrics for a specific namespace. By default, it’s set to AWS/EC2, but you can modify it.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;Step 3: Creating a Menu Interface&lt;/strong&gt;&lt;br&gt;
To make the script user-friendly, I added a menu interface. The user can choose which resource to monitor by typing a number.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy5i7bemmvoz62aem85ts.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy5i7bemmvoz62aem85ts.png" alt=" " width="452" height="118"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7dgp81tw4ssby5g6yn4f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7dgp81tw4ssby5g6yn4f.png" alt=" " width="650" height="173"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These were the processes i followed to create the script to monitor my resources. I had some real hands-on experience with the AWS CLI and Bash scripting.&lt;/p&gt;

&lt;p&gt;Here is the link to the full script: &lt;a href="https://github.com/marviecodes/Aws-resource-monitoring" rel="noopener noreferrer"&gt;full script&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How To Create and Connect To Your First AWS EC2 Instance: A Beginners Guide</title>
      <dc:creator>Marvelous Osondu</dc:creator>
      <pubDate>Mon, 06 Jan 2025 17:39:46 +0000</pubDate>
      <link>https://forem.com/marviecodes/how-to-create-and-connect-to-your-first-aws-ec2-instance-a-beginners-guide-f78</link>
      <guid>https://forem.com/marviecodes/how-to-create-and-connect-to-your-first-aws-ec2-instance-a-beginners-guide-f78</guid>
      <description>&lt;h2&gt;
  
  
  Introduction:
&lt;/h2&gt;

&lt;p&gt;In today’s time and age, cloud technology has become the backbone of numerous industries. From startups to multinational corporations, nearly everyone has embraced the cloud to improve scalability, reduce costs, and enhance flexibility. This rapid adoption has changed how businesses operate, making it essential for professionals across all domains to understand the basic concepts of cloud computing.&lt;/p&gt;

&lt;p&gt;Among the many services offered by Amazon Web Services (AWS), EC2 (Elastic Compute Cloud) is unarguably one of the most popular and versatile. EC2 provides scalable compute capacity in the cloud, enabling users to deploy virtual servers in minutes. Whether you're hosting a website, running complex apps, or experimenting with machine learning models, EC2 is a go-to solution for developers and organizations alike.&lt;/p&gt;

&lt;p&gt;Learning how to create and manage an EC2 instance is a foundational skill for anyone working in tech today. In this guide, I’ll walk you through the process of launching your very first EC2 instance and connecting to it alike.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;An account on AWS: You need an active AWS account to access the AWS Management Console. If you don’t already have one, sign up at AWS.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Basic understanding of cloud and EC2: Having a foundational understanding of cloud computing and what EC2 offers (virtual servers for scalable compute capacity) will help you make better decisions about configurations and settings.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Familiarity with the CLI and SSH: You should have some idea about interacting with the shell through the CLI and familiarity with Secure Shell (SSH) is also essential to connect to your instance securely.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Internet access: Ensure your system has internet access.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Let's now dive fully into the creation process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Log in to the AWS Management Console
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Go to the &lt;a href="https://aws.amazon.com/console/" rel="noopener noreferrer"&gt;AWS Management Console&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Sign in with your credentials or create an account if you don't have one.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;h2&gt;
  
  
  Step 2: Navigate to the EC2 Dashboard
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Search for EC2 in the search bar at the top and select EC2 under "Services."&lt;/li&gt;
&lt;/ul&gt;

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

&lt;h2&gt;
  
  
  Step 3: Launch an Instance
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Click on the launch instance button&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fijg9f9tgxk4lvsebqhh1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fijg9f9tgxk4lvsebqhh1.png" alt=" " width="432" height="169"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Configure the Instance
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Name and Tags: Enter a name for your instance (e.g., "My First EC2").&lt;/li&gt;
&lt;li&gt;Application and OS Images (AMI): Select an Amazon Machine Image (AMI).&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Instance Type: Choose an instance type based on your needs. For beginners select ( t2.micro ) - it's eligible for free tier&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Key Pair: Create a new key pair (for secure SSH access) or use an existing one - Download the .pem file when creating a key pair (keep it secure).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Network Settings: Set up your security group - Add rules to allow traffic (e.g., SSH on port 22 for Linux or RDP on port 3389 for Windows).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Storage: Configure the instance's storage. Defaults are usually fine for Free Tier users (8 GiB SSD).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 5: Launch your Instance
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Review your configuration.&lt;/li&gt;
&lt;li&gt;Click Launch Instance.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2lerba488554skupmkcg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2lerba488554skupmkcg.png" alt=" " width="468" height="93"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 6: Access Your Instance
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Go to the EC2 Dashboard and click Instances in the sidebar.&lt;/li&gt;
&lt;li&gt;Find your instance and copy its Public IPv4 Address.&lt;/li&gt;
&lt;li&gt;Connect to the instance: Use a terminal to run this command ssh -i "your-key.pem" ec2-user@your-public-ip
Replace with your own details.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once logged in, you can update the OS and Install software or deploy applications.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>devops</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
