<?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 the_designgirl (Oni Oluwadamilola) on Medium]]></title>
        <description><![CDATA[Stories by the_designgirl (Oni Oluwadamilola) on Medium]]></description>
        <link>https://medium.com/@dharmeeife?source=rss-b33bfde8e092------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*VJ8kOpMm5woOwonDGJYvcQ.jpeg</url>
            <title>Stories by the_designgirl (Oni Oluwadamilola) on Medium</title>
            <link>https://medium.com/@dharmeeife?source=rss-b33bfde8e092------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 04:58:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dharmeeife/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 an Automated Backup and Audit Logging System using AWS — A cloud engineer’s Tale]]></title>
            <link>https://medium.com/@dharmeeife/creating-an-automated-backup-and-audit-logging-system-using-aws-a-cloud-engineers-tale-4194ece1364f?source=rss-b33bfde8e092------2</link>
            <guid isPermaLink="false">https://medium.com/p/4194ece1364f</guid>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[amazon-ec2]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[the_designgirl (Oni Oluwadamilola)]]></dc:creator>
            <pubDate>Sun, 22 Nov 2026 21:57:33 GMT</pubDate>
            <atom:updated>2026-11-22T21:57:33.410Z</atom:updated>
            <content:encoded><![CDATA[<p>When I first saw this project, I knew I’d be using multiple AWS services, but I underestimated the troubleshooting that lay ahead.</p><p>The goal was to create a system that automatically backed up data to Amazon S3 and logged each new backup in DynamoDB, without allowing deletion of existing backups.</p><p>As a cloud engineer in training, this project allowed me to go beyond just knowing AWS services and see how they integrate. I must say, there were some occasions when I asked myself, “Is it me or is AWS just testing my patience?” 😂 I learned that cloud engineering is not just about creating resources, but ensuring they communicate securely and function as expected.</p><h3>Understanding what I am creating</h3><p>Before development, I had to grasp the problem my product would solve.</p><p>Suppose you have a company that owns an online shopping website. Every time there is an order from one of your customers, logs and application data are being created. These logs allow you to monitor the situation on your website, investigate any possible errors, and trace any necessary actions.</p><p>However, let us imagine that the server fails. How do you handle stored information? Suppose your company needs to investigate an issue, which happened the previous day, but finds that the logs have disappeared.</p><p>This is the problem my product addresses.</p><p>I created an automated backup and audit logging solution on AWS. The application server generates data, while the backup and logging solution creates automatic backups and sends them to Amazon S3, logging successful uploads in DynamoDB.</p><p>Managing a business’s important documents in a secure warehouse is similar. Every time there is a new package, the staff records the information about it in a register. And when someone asks, Did we get this package? When did it come? The register answers these questions.</p><p>And this is what my solution does:<br>- The application server creates necessary information.<br>- Amazon S3 serves as the secure warehouse for backup files.<br>- AWS Lambda acts as a staff that reacts to new backups.<br>- Amazon DynamoDB tracks each backup.<br>I wanted more than just file uploads. I needed automation, limited access, and to hide the application server from the internet.</p><p>To achieve this, I combined several AWS products and Linux utilities.</p><h3>Architecture Overview</h3><p>There are two main components in the architecture: Network infrastructure protecting and connecting my servers and the automated backup pipeline transferring application data into S3 and storing its results in DynamoDB.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4azV-BmywvekdBGGjWYbHQ.jpeg" /><figcaption>Architecture Overview</figcaption></figure><p>The application server communicates with S3 through the S3 Gateway VPC Endpoint. This endpoint ensured a private routr to S#, so there is no need for NAT Gateway for this traffic.</p><p>Now that you have the overall architectural view, let me describe how I have implemented it.</p><h3><strong>Understanding the Network: VPC, Subnets and Bastion Host</strong></h3><p>I first created an Amazon VPC (Virtual Private Cloud). I began by creating an Amazon VPC, a private network within Amazon where I could manage cloud resources. It’s like buying land and creating your own estate. You decide how your buildings are arranged, who gets in, and how they move around the estate.</p><p>Within this VPC, I created two subnets: a public subnet and a private subnet.</p><p>A subnet is a smaller network section. I placed the bastion host in the public subnet and the application server in the private subnet.</p><p>Now, what is a bastion host? Think of it as the security guard at the entrance of an estate. It prevents visitors from walking directly into every building; they must pass through the security checkpoint first. In this project, I connected to the bastion host before accessing my private application server.</p><p>The application server had no public IP address, so it couldn’t be directly accessed from the internet. This was intentional to reduce its exposure to external threats.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yekaYEXTBUj5qd4CFhyk9Q.png" /><figcaption><strong>VPC Resource Map showing the public subnet, private subnet, bastion host, application server, Internet Gateway and S3 Gateway Endpoint.]</strong></figcaption></figure><h3><strong>How I Built the Automated Backup Pipeline</strong></h3><p>The first part of the system generated application data.</p><p>I created a systemd service called data-generator.service. Systemd is a Linux system and service manager. Systemd is a Linux system and service manager that helps manage background programs, which start automatically when a server boots and restart when they stop unexpectedly.</p><p>My service generated a timestamp every 30 seconds and appended it to /var/app/data/app.log.</p><p>Next, I created a Bash script called <a href="http://backup.sh/">backup.sh</a>.</p><p>A Bash script is a file containing commands that Linux can execute automatically or when instructed. Rather than typing several commands every time I wanted to create a backup, I put those commands together in one script.</p><p>The script compressed the application data into a .tar.gz archive, uploaded the archive to my S3 bucket, recorded the result in /var/log/backup.log, and deleted the local archive after a successful upload.</p><p>I automated the procedure with cron, so I didn’t have to run the script manually each time.</p><p>Cron is a Linux utility that allows you to plan jobs to execute automatically at certain periods or intervals. Imagine it as setting a recurring alarm on your phone. However, instead of reminding you to do something, cron tells your server to run a command.</p><p>I have cron set to run my backup script every ten minutes. This way, I can define the schedule, and the script will run on the server at certain intervals, without me having to manually create and upload backups.The Audit Logging Process: S3, Lambda and DynamoDB</p><p>And I wanted to know when the files were uploaded.</p><p>To that end, I configured an S3 event notification to invoke an AWS Lambda function upon the arrival of a new file in the backups/ directory.</p><p>Amazon S3 (Simple Storage Service) was used to store the backup archives. You can think of S3 as a secure digital storage warehouse where files are stored as objects inside buckets.</p><p>AWS Lambda is a serverless compute service. AWS manages the servers on which your code runs and you don’t have to worry about it.</p><p>My backup-audit-logger function retrieved the following properties of the backup file: its filename, size, upload timestamp and the bucket name. It put this information in the backup-log DynamoDB table.</p><p>DynamoDB is a NoSQL database storing information in form of objects with key-value pairs. In this case, each uploaded backup becomes an object in the DynamoDB table.</p><p>Simplifying the process:</p><p>S3 stores the backups.</p><p>Lambda acts upon their arrival.</p><p>DynamoDB stores the information about them.</p><p>You may consider S3 to be the warehouse, Lambda — the worker and DynamoDB — the delivery register.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iAxwoavbWSDheJUxgDyamg.png" /><figcaption>Application Server → S3 → Lambda → DynamoDB, showing the workflow from backup to audit record.</figcaption></figure><h3>Why I Chose IAM Roles Over Access Keys</h3><p>I chose IAM roles over access keys to limit my application server’s permissions.</p><p>IAM (Identity and Access Management) is the service that manages which entities are authorized to access AWS resources and perform certain actions on them.</p><p>An IAM role is a temporary set of permissions given to an AWS resource. That’s why I didn’t have to manage permanent access keys stored on the EC2 instance.</p><p>I created an IAM policy granting my server permission to perform s3:PutObject on the backups/ directory. PutObject uploads a file into an S3 bucket.</p><p>I excluded s3:DeleteObject, which would allow deleting files. Indeed, I got AccessDenied error message trying to delete the backup files — that’s one error I didn’t mind seeing at all!</p><p>I created a special IAM role for the AWS Lambda, allowing it to write to DynamoDB using dynamodb:PutItem and report logs to CloudWatch.</p><h3>Why I Used an S3 VPC Endpoint Instead of Maintaining a NAT Gateway</h3><p>A NAT Gateway provides internet access for private resources without a public IP. Think of it as an intermediary between your private server and the internet.</p><p>However, it incurs running and data-processing fees.</p><p>I created a NAT Gateway temporarily to install AWS CLI and packages on my private EC2 instance. Then, I removed it and created an S3 Gateway VPC Endpoint.</p><p>A VPC Endpoint creates a private connection between resources and supported AWS services. I attached the S3 Gateway Endpoint to my private route table.</p><p>My backup routine needed only S3 access, not general internet access. It needed only access to S3.</p><p>I tested it with curl -m 5 <a href="https://example.com/">https://example.com</a>. The request timed out, but uploading backup files to S3 worked perfectly fine.</p><p>My server can no longer access the internet but still delivers backup files to S3. Mission accomplished.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a_xUOSWHQbBb26mjXGE6OA.png" /><figcaption>Failed curl command and successful S3 upload.</figcaption></figure><h3>The Problems That I Encountered And How I Fixed Them</h3><p>I encountered several challenges that highlighted the importance of troubleshooting skills.</p><p>SSH connectivity issues: Connecting to the private server from the bastion host was difficult due to SSH agent forwarding issues. SSH enables remote connection while an SSH agent manages your private keys. I fixed this by starting the SSH agent on my Mac, loading my key, and connecting with the -A option.</p><p>AccessDenied to S3: The aws s3 ls command failed because the EC2 role lacked s3:ListBucket permission. However, I left the permission restricted, as the server only needs to upload backups.</p><p>Lambda and DynamoDB errors: The Lambda function received events from S3, but my DynamoDB table remained empty. The logs in CloudWatch showed the Lambda function lacked dynamodb:PutItem permission. After fixing that, I encountered a partition key mismatch error because my DynamoDB table used backup-id while my Python code used backup_id. I couldn’t rename the partition, so I recreated the table with the correct name. After correcting both issues, I uploaded another test file, and the record successfully appeared in DynamoDB.</p><h3>Improvements to Consider If This Were a Real Company’s System</h3><p>The fact that an application backup was successfully uploaded doesn’t guarantee a company can restore it after a disaster. Here are four improvements I’d make in this case.</p><p>1. Check if Backups Really Restore the Application</p><p>I’d test whether backup restoration works by trying to restore backups in a test environment and verify all files are intact and restorable. In addition, I would set the following parameters for the backups:</p><p>Recovery Point Objective (RPO): The amount of recent information that could be lost.</p><p>Recovery Time Objective (RTO): The time that the company needs to restore its application.</p><p>These parameters would determine how often backups should be done and how fast the recovery process should be completed.</p><p>2. Prevent Backups From Being Deleted or Overwritten</p><p>If an attacker gains control over the application server and can delete backups, the company would lose both application information and backup files.</p><p>I’d ensure permissions for uploading backups are separate from deleting and restoring them. For critical backups, I’d consider S3 Object Lock, which would prevent deletion or overwriting for a specified period.</p><p>3. Check Whether Backups Were Done Automatically</p><p>If backups should be uploaded every ten minutes but there’s no backup for an hour, the team should be alerted without manual checking.</p><p>I’d set up the system to check whether backups were done and send an alarm message using CloudWatch with Amazon SNS to the right team.</p><p>4. Check Backup Integrity and Control Their Storage Costs</p><p>I’d use checksums to verify backup files haven’t changed or become corrupted. I’d also create a retention policy and use S3 Lifecycle Rules to move backups to cheaper storage or delete them.</p><h3>Conclusion</h3><p>Cloud engineering isn’t just about spinning up EC2 instances, S3 buckets, and IAM roles. It’s about making those services work together.</p><p>I learned how to set up a VPC, SSH into a private server via a bastion host, script with bash, and use cron jobs, work with IAM permissions, and set up an event-driven infrastructure with S3, Lambda, and DynamoDB.</p><p>The most important lesson of the project was learning to troubleshoot. From SSH problems to IAM permissions, from DynamoDB issues and back, each problem taught me something new.</p><p>As we say in Nigeria, e go better. Today it’s an SSH error, tomorrow it’s an IAM permission issue, and before you know it, you’re building systems you once thought were beyond your understanding. After all, even AWS didn’t become AWS in one day. Conclusion</p><p>To other beginners: don’t let what you don’t know discourage you from starting. Stay curious, keep experimenting, and be patient with yourself. The things that confuse you today may become the things you confidently explain tomorrow.</p><p>See you at the top ! 🫶☁️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4194ece1364f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My First AWS Bastion Host: How I Reached a Private EC2 Instance]]></title>
            <link>https://medium.com/@dharmeeife/my-first-aws-bastion-host-how-i-reached-a-private-ec2-instance-48be1ab4bb77?source=rss-b33bfde8e092------2</link>
            <guid isPermaLink="false">https://medium.com/p/48be1ab4bb77</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[aws-ec2]]></category>
            <category><![CDATA[bastion-host]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[cloud-security]]></category>
            <dc:creator><![CDATA[the_designgirl (Oni Oluwadamilola)]]></dc:creator>
            <pubDate>Sun, 25 Oct 2026 21:34:15 GMT</pubDate>
            <atom:updated>2026-10-26T13:42:24.836Z</atom:updated>
            <content:encoded><![CDATA[<p>Working on this AWS assignment helped me understand something that I had previously only read about: keeping a server private does not mean you cannot access it when you need to manage it.</p><p>My task was to set up two EC2 instances in AWS. One would be accessible from my computer, while the other would remain private. I then had to connect to the private instance through the public one without exposing the private server directly to the internet.</p><p>Here is how I approached the task, the challenges I encountered, and what I learned along the way.</p><h3>Understanding the Purpose of a Bastion Host</h3><p>A bastion host is a server that acts as a controlled entry point to resources inside a private network. It is also commonly called a jump box because you connect to it first before moving to another server.</p><p>Think of an office building with a security desk at the entrance. Visitors do not get unrestricted access to every room. They pass through a controlled entry point before reaching the areas they are authorised to enter.</p><p>A bastion host serves a similar purpose in cloud networking. Instead of giving every server a public IP address and allowing direct SSH access from the internet, I can keep my private server without a public IP address and use the bastion host to reach it.</p><p>This arrangement helps reduce direct exposure of private resources and makes it easier to control who can connect to them.</p><h3>How I Set Up My AWS Environment</h3><p>I worked in the AWS Management Console in the US East (N. Virginia) region. I used default VPC to organise the network resources.</p><p>I configured a public subnet for the bastion instance and a private subnet for the second EC2 instance. I also checked the route tables to make sure the public subnet had a route to the Internet Gateway, while the private subnet did not have a direct route to the Internet Gateway or a NAT Gateway.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nj1jcMOpdJ5JQAuif3SwQQ.png" /><figcaption><strong><em>VPC resource map showing the VPC, public and private subnets, route tables, and Internet Gateway</em></strong></figcaption></figure><p>The next step was configuring the security groups. For the bastion host, I allowed SSH traffic on port 22 from my own public IP address. For the private instance, I configured the inbound SSH rule to accept connections from the bastion host’s security group.</p><p>This was important because I did not want the private server to accept SSH connections from just any internet address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KtFles7QRzgYA0GEJL6RFg.png" /><figcaption><strong>Bastion security group’s inbound rules, showing SSH on port 22 restricted to public IP address.</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tozXU8OP7CCoH9BOeT2ylw.png" /><figcaption><strong>Private instance’s inbound rules, showing SSH on port 22 with the bastion security group as the source.</strong></figcaption></figure><p>I then launched the two Ubuntu EC2 instances. The bastion host had a public IP address, x.x.x.80, while the private instance was reachable through its private IP address, x.x.x.13.</p><h3>Connecting to the Private Instance</h3><p>After setting up the network and security groups, I moved to my Mac terminal to test the connection.</p><p>I connected to the bastion host using SSH with agent forwarding enabled:</p><p>ssh -A -i ~/Downloads/bas-public-kp.pem ubuntu@x.x.x.80</p><p>Once I logged in successfully, I ran the following command from the bastion host:</p><p>ssh ubuntu@x.x.x.13</p><p>This took me into the private EC2 instance. Seeing the terminal prompt change to ubuntu@ip-x-x-x-13 confirmed that I had reached the private server through the bastion host.</p><h3>Problems I Encountered and How I Solved Them</h3><p>The setup was not completely straightforward, but troubleshooting each problem helped me understand the configuration better.</p><p><strong>1. Getting the security group rule right</strong></p><p>While configuring the private security group, I received an AWS error because I tried to use a referenced security group alongside an existing IPv4 CIDR rule in a way AWS would not accept. I had to remove the conflicting SSH rule and create a new one using the bastion security group as the source.</p><p>That experience helped me understand the difference between allowing connections from an IP range and allowing connections from instances associated with a particular security group.</p><p><strong>2. SSH authentication failures</strong></p><p>I initially encountered Permission denied (publickey). I had to check the username and the key file I was using. Since my instances were running Ubuntu, the correct SSH username was ubuntu. I also checked that I was using the appropriate downloaded private key.</p><p>My key file’s permissions were too open, so I corrected them with:</p><p>chmod 400 ~/Downloads/bas-public-kp.pem</p><p>This restricted access to the key file and allowed SSH to use it securely.</p><p><strong>3. Getting the SSH agent command right</strong></p><p>I also ran into trouble when starting the SSH agent because I entered the command with incorrect quotation marks. Replacing them with standard straight quotation marks fixed the issue.</p><p>These problems reminded me that a successful SSH connection depends on several things working together: the correct username, key, file permissions, security group rules, and network routes.</p><h3>What I Learned</h3><p>Completing this task gave me practical experience with VPC networking, route tables, security groups, EC2 instances, and SSH. More importantly, I learned that security is not just about creating a private subnet. The routes and access rules must also be configured correctly.</p><p>I now understand why a bastion host is useful when administrators need to manage private resources without making those resources directly accessible from the internet.</p><p>This was a valuable hands-on learning experience because I did not just follow the setup steps; I also had to troubleshoot errors and verify that the connection worked.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48be1ab4bb77" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>