<?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 Chukwuebuka Ayogu on Medium]]></title>
        <description><![CDATA[Stories by Chukwuebuka Ayogu on Medium]]></description>
        <link>https://medium.com/@ayogutimothy999?source=rss-e61673bc03eb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Chukwuebuka Ayogu on Medium</title>
            <link>https://medium.com/@ayogutimothy999?source=rss-e61673bc03eb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 01:22:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ayogutimothy999/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[Building a Secure Automated AWS Backup Pipeline with S3, IAM, Lambda and DynamoDB]]></title>
            <link>https://medium.com/@ayogutimothy999/building-a-secure-automated-aws-backup-pipeline-with-s3-iam-lambda-and-dynamodb-3a7a14797a3e?source=rss-e61673bc03eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a7a14797a3e</guid>
            <category><![CDATA[bastion-host]]></category>
            <category><![CDATA[aws-iam]]></category>
            <category><![CDATA[aws-ec2]]></category>
            <category><![CDATA[aws-dynamodb]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <dc:creator><![CDATA[Chukwuebuka Ayogu]]></dc:creator>
            <pubDate>Sun, 22 Nov 2026 21:48:22 GMT</pubDate>
            <atom:updated>2026-11-22T21:48:22.691Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Building a Secure Automated AWS Backup Pipeline with S3, IAM, Lambda and DynamoDB</strong></p><p><strong>Introduction</strong></p><p>For my AWS Cloud Engineering project, I built a secure and automated backup solution using Amazon Web Services. The objective was to host an application server in a private network, automatically back up its application data to Amazon S3, and maintain an audit record of every backup.</p><p>An important requirement was that the application server should not have a public IP address and should still be able to upload backups after removing its general internet access.</p><p>This project helped me understand how AWS networking, identity and access management, storage, automation and serverless services work together.</p><p><strong>Network architecture and secure access</strong></p><p>I started by creating a Virtual Private Cloud (VPC) with the CIDR block “10.0.0.0/16”. Within the VPC, I created a public subnet and a private subnet in the same Availability Zone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*L-vYAYCb6qSQqH5kHQZ9HA.png" /></figure><p>I attached an Internet Gateway to the VPC and configured the public route table to provide internet connectivity to the public subnet. I deployed a bastion host in the public subnet and an application server in the private subnet.</p><p>The bastion host provided a controlled entry point for administrative access. Its security group allowed SSH connections only from my own public IP address. The application server’s security group allowed SSH access only from the bastion host’s security group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*dkRyTN99kHPK1zRoBukzFw.png" /></figure><p>I connected to the private server through the bastion host using SSH agent forwarding. This allowed me to authenticate with my private key without copying the key onto the bastion host.</p><p><strong>IAM and secure S3 storage</strong></p><p>I created a private S3 bucket called “backup-pipeline-timoflex” and enabled S3 Block Public Access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bcf0xxpplIe9mbIwm8LfRw.png" /></figure><p>Rather than storing AWS access keys on the application server, I created an IAM role called “Backup-EC2-Role” and attached it to the EC2 instance.</p><p>The role had permission to perform only “s3:PutObject” on objects inside the bucket’s “backups/” prefix. It did not have permission to list or delete objects.</p><p>This was an important security lesson: an application should receive only the permissions it needs. During testing, an attempt to list the backup objects from the server returned AccessDenied. This was expected because the role did not have “s3:ListBucket” permission. An attempted deletion was also denied, confirming that the role could not delete backups.</p><p><strong>Automated application data and backups</strong></p><p>I configured a systemd service called “data-generator.service”. It continuously appended timestamped entries to “/var/app/data/app.log” at 30-second intervals. I enabled the service so that it would start automatically when the server booted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*gBdsBVZyKwbhg-U1vDBPPg.png" /></figure><p>Next, I created a Bash backup script. The script compressed the application data into a timestamped “.tar.gz” archive, uploaded it to the S3 “backups/” prefix using the AWS CLI, recorded the result in “/var/log/backup.log”, and removed the local archive after a successful upload.</p><p>I scheduled the script to run every ten minutes using cron. This ensured that backups were generated automatically without requiring manual intervention.</p><p>One issue I encountered was that the “crontab” command was initially unavailable. I resolved this by installing the “cronie” package on Amazon Linux 2023 and enabling the “crond” service.</p><p><strong>S3 Gateway Endpoint and serverless audit logging</strong></p><p>I created an S3 Gateway VPC Endpoint and associated it with the private route table. This allowed the private application server to access S3 without requiring a NAT Gateway for S3 traffic.</p><p>I also created a DynamoDB table named “backup-log”, using “backup_id” as its string partition key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*XE2wYoap2Aup_1GBjj9Wvg.png" /></figure><p>To automate audit logging, I created a Python Lambda function named “Backup-Audit-Logger”. I assigned it an execution role with permission to write items to the specific DynamoDB table and to send execution logs to CloudWatch.</p><p>I configured an S3 event notification for object creation under the “backups/” prefix. Whenever a new backup was uploaded, S3 invoked the Lambda function. The function extracted the object key, file size, event timestamp and bucket name, then stored these details in DynamoDB.</p><p>This created an automated audit trail without requiring the application server to communicate directly with DynamoDB.</p><p><strong>Testing and results</strong></p><p>I tested the complete pipeline by generating multiple backups and confirming that the S3 bucket contained at least three backup objects. I also verified that DynamoDB contained the corresponding audit records.</p><p>The most important test was performed after deleting the temporary NAT Gateway. A request to “<a href="https://example.com/">https://example.com</a>&quot; from the private application server failed, demonstrating that general internet access was unavailable. However, the backup script continued to upload data successfully to S3 through the Gateway Endpoint, and Lambda continued creating DynamoDB audit records.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*-FkAl3T_lvj9UNMBjTB5uQ.png" /></figure><p>This confirmed that the backup architecture did not depend on general internet connectivity for its S3 uploads.</p><p><strong>Challenges and lessons learned</strong></p><p>Some of the challenges included establishing SSH connectivity through the bastion host, understanding why certain S3 commands returned AccessDenied, and installing and configuring cron on Amazon Linux 2023.</p><p>Working through these issues helped me understand security group relationships, SSH agent forwarding, IAM least privilege, service management and automated scheduling.</p><p>I also learned the difference between a NAT Gateway and an S3 Gateway Endpoint. A NAT Gateway provides outbound internet access to private resources, while the S3 Gateway Endpoint provides private routing to S3 without requiring general internet access.</p><p><strong>Possible improvements</strong></p><p>In a production environment, I would improve the solution by enabling S3 versioning, configuring lifecycle policies to manage older backups, and using stronger retention controls. I would also consider encryption with AWS KMS, CloudWatch alarms for failed backup operations, and regular recovery tests to confirm that archived data can actually be restored.</p><p><strong>Conclusion</strong></p><p>This project gave me practical experience building a secure AWS backup pipeline. It demonstrated how VPC networking, EC2, IAM, S3, VPC Endpoints, systemd, cron, Lambda and DynamoDB can work together to provide automated backups and an audit trail.</p><p>Beyond completing the technical requirements, the project strengthened my understanding of least-privilege access, private networking, serverless automation and cloud resource management.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a7a14797a3e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Secure Two-Tier Network on AWS Using a Bastion Host]]></title>
            <link>https://medium.com/@ayogutimothy999/building-a-secure-two-tier-network-on-aws-using-a-bastion-host-a7d31dea1be3?source=rss-e61673bc03eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7d31dea1be3</guid>
            <category><![CDATA[aws-ec2]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-bastion]]></category>
            <dc:creator><![CDATA[Chukwuebuka Ayogu]]></dc:creator>
            <pubDate>Sat, 21 Nov 2026 19:26:54 GMT</pubDate>
            <atom:updated>2026-11-21T19:26:54.932Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Building a Secure Two-Tier Network on AWS Using a Bastion Host</strong></p><p><strong>Introduction</strong></p><p>As part of my cloud engineering learning journey, I built a secure two-tier network on Amazon Web Services (AWS). The goal was to create a public entry point through which I could securely access a server in a private subnet without exposing the private server directly to the internet.</p><p>A key concept in this project is the bastion host, also known as a jump box.</p><p>What Is a Bastion Host?</p><p>A bastion host is a server positioned at the boundary of a network to provide controlled administrative access to resources inside a private network. Instead of assigning public IP addresses to every server, administrators connect to the bastion host first and then use it to access internal servers.</p><p>This approach reduces the number of servers directly exposed to the internet. It also allows access to be controlled through security groups, SSH authentication, and restricted source IP addresses.</p><p>A bastion host does not automatically make a network secure. Its security depends on proper configuration, strong authentication, updates, and access restrictions.</p><p><strong>How I Built the Network</strong></p><p>I started by creating a Virtual Private Cloud (VPC) with the IPv4 CIDR block 10.0.0.0/16. Within the VPC, I created two subnets in the same Availability Zone: a public subnet with the range 10.0.1.0/24 and a private subnet with the range 10.0.2.0/24.</p><figure><img alt="An aws vpc image" src="https://cdn-images-1.medium.com/max/311/1*K_BfGkaXdzkfXBWETcNrQg.png" /></figure><p>Next, I created an Internet Gateway, attached it to the VPC, and configured a public route table with a default route to the Internet Gateway. I associated this route table with the public subnet. The private subnet used a route table containing only the local VPC route. I did not create a NAT Gateway.</p><p>I then launched an Amazon Linux EC2 instance in the public subnet to serve as the bastion host. I assigned it a public IP address and configured its security group to allow SSH connections on port 22 only from my own public IP address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZvJn7pjR2A_TIxjf8Hxw6g.png" /></figure><p>After that, I launched a second EC2 instance in the private subnet without a public IP address. Its security group allowed SSH access only from the bastion host’s security group, rather than from a public IP address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/263/1*mdEEJgYkav2ACsy4T7j4sg.png" /></figure><p>Finally, I connected from my computer to the bastion and used SSH ProxyJump to connect to the private instance. This allowed me to use my private key locally without copying it onto the bastion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*NDNHKy0wBxxucHbIZHNoEA.png" /></figure><p><strong>Challenges and Lessons Learned</strong></p><p>One important part of this exercise was understanding that creating a public subnet is not enough to provide internet connectivity. The Internet Gateway, route table, public IP address, and security group rules must work together.</p><p>Another important lesson was the difference between an IP-based security group rule and a security-group reference. Restricting SSH access to the bastion security group means the private instance accepts SSH traffic from the intended security group instead of relying on a manually specified private IP address.</p><p>During testing, I was having issues connecting to the private servers from my virtualbox ubuntu machine, apparently, my local ssh client was identifying itself to the ec2 instances wrongly, it was checking the wrong file for ssh keys, that caused authentication issues. I solved the issue by creating a config file under the .ssh folder, explicitly telling the ssh file how to locate the correct ssh key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*PPtm8PKt_C-NypVtlogBQw.jpeg" /></figure><p><strong>Conclusion</strong></p><p>This project helped me understand subnet isolation, routing, security groups, SSH access, and the role of a bastion host in cloud infrastructure. It also reinforced the importance of applying the principle of least privilege by exposing only the necessary entry point and keeping the internal server private.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7d31dea1be3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>