<?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 UTAMA DALINGTON on Medium]]></title>
        <description><![CDATA[Stories by UTAMA DALINGTON on Medium]]></description>
        <link>https://medium.com/@utamadalington045?source=rss-3988f6667f56------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*AiuNi46uGRHjbjaPypxvQQ.jpeg</url>
            <title>Stories by UTAMA DALINGTON on Medium</title>
            <link>https://medium.com/@utamadalington045?source=rss-3988f6667f56------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 11:18:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@utamadalington045/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[Design and Implementation of an End-to-End Jenkins CI/CD Pipeline Automation]]></title>
            <link>https://medium.com/@utamadalington045/design-and-implementation-of-an-end-to-end-jenkins-ci-cd-pipeline-automation-630dd9aa4a6f?source=rss-3988f6667f56------2</link>
            <guid isPermaLink="false">https://medium.com/p/630dd9aa4a6f</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[UTAMA DALINGTON]]></dc:creator>
            <pubDate>Fri, 07 Aug 2026 04:13:51 GMT</pubDate>
            <atom:updated>2026-08-07T04:13:51.023Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iMdqHtDyv9bdkf5iMzmz3g.png" /></figure><p><strong>Project ToolBox 🧰</strong></p><ul><li><a href="https://git-scm.com/"><strong>Git</strong></a> Git will be used to manage our application source code.</li><li><a href="https://github.com/"><strong>Github</strong></a> Github is a free and open source distributed VCS designed to handle everything from small to very large projects with speed and efficiency.</li><li><a href="https://www.jenkins.io/"><strong>Jenkins</strong></a> Jenkins is an open source automation CI tool which enables developers around the world to reliably build, test, and deploy their software.</li><li><a href="https://maven.apache.org/"><strong>Maven</strong></a> Maven will be used for the application packaging and building including running unit test cases.</li><li><a href="https://checkstyle.sourceforge.io/"><strong>Checkstyle</strong></a> Checkstyle is a static code analysis tool used in software development for checking if Java source code is compliant with specified coding rules and practices.</li><li><a href="https://docs.sonarqube.org/"><strong>SonarQube</strong></a> SonarQube Catches bugs and vulnerabilities in your app, with thousands of automated Static Code Analysis rules.</li><li><a href="https://www.sonatype.com/"><strong>Nexus</strong></a> Nexus Manage Binaries and build artifacts across your software supply chain.</li><li><a href="https://docs.ansible.com/"><strong>Ansible</strong></a> Ansible will be used for the application deployment to both lower environments and production.</li><li><a href="https://aws.amazon.com/ec2/"><strong>EC2</strong></a> EC2 allows users to rent virtual computers (EC2) to run their own workloads and applications.</li><li><a href="https://slack.com/"><strong>Slack</strong></a> Slack is a communication platform designed for collaboration which can be leveraged to build and develop a very robust DevOps culture. Will be used for Continuous feedback loop.</li><li><a href="https://prometheus.io/"><strong>Prometheus</strong></a> Prometheus is a free software application used for event/metric monitoring and alerting for both application and infrastructure.</li><li><a href="https://grafana.com/"><strong>Grafana</strong></a> Grafana is a multi-platform open source analytics and interactive visualization web application. It provides charts, graphs, and alerts for the web when connected to supported data sources.</li><li><a href="https://www.splunk.com/"><strong>Splunk</strong></a> Splunk is an innovative technology which searches and indexes application/system log files and helps organizations derive insights from the data.</li></ul><h3>View full project on my GitHub: <a href="https://github.com/UtamaDalington/End-to-End-Jenkins-CI-CD-Pipeline-Project">https://github.com/UtamaDalington/End-to-End-Jenkins-CI-CD-Pipeline-Project</a></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=630dd9aa4a6f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CI/CD DevSecOps Automation for Terraform with Jenkins, Snyk, Checkov and Slack]]></title>
            <link>https://medium.com/@utamadalington045/ci-cd-devsecops-automation-for-terraform-with-jenkins-snyk-and-checkov-11fcf1ec96ea?source=rss-3988f6667f56------2</link>
            <guid isPermaLink="false">https://medium.com/p/11fcf1ec96ea</guid>
            <dc:creator><![CDATA[UTAMA DALINGTON]]></dc:creator>
            <pubDate>Sun, 15 Feb 2026 01:42:15 GMT</pubDate>
            <atom:updated>2026-02-16T23:45:29.755Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="CI/CD DevSecOps Automation for Terraform with Jenkins, Snyk, and Checkov" src="https://cdn-images-1.medium.com/max/1024/1*o3B_gxw2nejUnP2INcCz4A.png" /><figcaption>CI/CD DevSecOps Automation for Terraform with Jenkins, Snyk, and Checkov</figcaption></figure><p><strong>Project ToolBox 🧰</strong></p><ul><li><a href="https://git-scm.com/">Git</a> Git will be used to manage our application source code.</li><li><a href="https://github.com/">Github</a> Github is a free and open source distributed VCS designed to handle everything from small to very large projects with speed and efficiency.</li><li><a href="https://www.jenkins.io/">Jenkins</a> Jenkins is an open source automation CI tool which enables developers around the world to reliably build, test, and deploy their software.</li><li><a href="https://snyk.io/">Snyk</a> Snyk gives you the visibility, context, and control you need to work alongside developers on reducing application risk.</li><li><a href="https://www.checkov.io/">Checkov</a> Checkov scans cloud infrastructure configurations to find misconfigurations before they’re deployed.</li><li><a href="https://slack.com/">Slack</a> Slack is a communication platform designed for collaboration which can be leveraged to build and develop a very robust DevOps culture. Will be used for Continuous feedback loop.</li></ul><ol><li>Create a GitHub Repository with the name Terraform-CICD-Pipeline-Project and push the code in this branch(main) to your remote repository (your newly created repository).</li></ol><ul><li>Go to GitHub: <a href="https://github.com/">https://github.com</a></li><li>Login to Your GitHub Account</li><li>Create a Repository called Terraform-CICD-Pipeline-Project</li><li>Clone the Repository in the Repository directory/folder on your local machine</li><li>Download the code in in this repository &quot;Main branch&quot;: <a href="https://github.com/UtamaDalington/Terraform-Jenkins-CICD-Pipeline-Project.git">https://github.com/UtamaDalington/Terraform-Jenkins-CICD-Pipeline-Project.git</a></li><li>Unzip the code/zipped file</li><li>Copy and Paste everything from the zipped file into the repository you cloned in your local</li><li>Open your Terminal</li><li>Add the code to git, commit and push it to your upstream branch “main or master”</li><li>Add the changes: git add -A</li><li>Commit changes: git commit -m &quot;adding project source code&quot;</li><li>Push to GitHub: git push</li><li>Confirm that the code is now available on GitHub as shown below…</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6IY2cNQ92bdzOJ-vZETLeQ.png" /></figure><p>2. Create An IAM Profile/Role For The Jenkins Environment</p><ul><li>Create an EC2 Service Role in IAM with AdministratorAccess Privilege</li><li>Navigate to IAM</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0mAsrY7ykGuVgLKcxCg0dQ.png" /></figure><pre>- Click on `Roles`<br>- Click on `Create Role`<br>- Select `Service Role`<br>- Use Case: Select `EC2`<br>- Click on `Next` <br>- Attach Policy: `AdministratorAccess`<br>- Click `Next` <br>- Role Name: `AWS-AdministratorAccess-Role`<br>- Click `Create`</pre><p>3. Jenkins</p><ul><li>Create a Jenkins VM instance</li><li>Name: Jenkins-CI</li><li>AMI: Ubuntu 24.04</li><li>Instance type: c7i-flex.large (2 vCPU and 4 GiB Memory)</li><li>Key pair: Select or create a new keypair</li><li>Security Group (Edit/Open): 8080 and 22 to 0.0.0.0/0</li><li>IAM instance profile: Select the AWS-AdministratorAccess-Role</li><li>User data (Copy the following user data): <a href="https://github.com/UtamaDalington/Maven-SonarQube-Nexus-Jenkins-installations/blob/main/terraform-jenkins.sh">https://github.com/UtamaDalington/Maven-SonarQube-Nexus-Jenkins-installations/blob/main/terraform-jenkins.sh</a></li><li>Launch Instance</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3ToYp3TS9Q7cDUu-MzYKhg.png" /></figure><p>4. Slack</p><ul><li>Go to Slack, create a Workspace and give it a name (for example: CICD-Pipeline-Peojects)</li><li>Create a Private Channel using the naming convention YOUR_INITIAL-terraform-cicd-alerts</li><li>NOTE: <em>(The Channel Name Must Be Unique, meaning it must be available for use)</em></li><li>Visibility: Select Private</li><li>Click on the Channel Drop Down and select Integrations and Click on Add an App</li><li>Search for Jenkins and Click on View</li><li>Click on Configuration/Install and Click Add to Slack</li><li>On Post to Channel: Click the Drop Down and select your channel above YOUR_INITIAL-terraform-cicd-alerts</li><li>Click Add Jenkins CI Integration</li><li>Scroll Down and Click SAVE SETTINGS/CONFIGURATIONS</li><li>Leave this page open</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O4YiVCOjvvOqPVeVL60wPA.png" /></figure><p>5. Install Plugins</p><ul><li>Snyk</li><li>Slack</li><li>Blue Ocean</li><li>Pipeline: Stage View</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11fcf1ec96ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Continuous Development Environment For An E-Commerce WebApp Project]]></title>
            <link>https://medium.com/@utamadalington045/continuous-development-environment-for-e-commerce-webapp-project-1eda61e729f3?source=rss-3988f6667f56------2</link>
            <guid isPermaLink="false">https://medium.com/p/1eda61e729f3</guid>
            <dc:creator><![CDATA[UTAMA DALINGTON]]></dc:creator>
            <pubDate>Tue, 14 Oct 2025 15:58:51 GMT</pubDate>
            <atom:updated>2025-10-16T04:22:32.761Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nnu56QHQi3l6Lb_8jJcsiA.png" /></figure><h3>Project ToolBox 🧰</h3><p>- <a href="https://git-scm.com/"><strong>Git:</strong></a> Git will be used to manage our application source code.<br>- <a href="https://github.com/"><strong>Github:</strong></a> Github is a free and open source distributed VCS designed to handle everything from small to very large projects with speed and efficiency<br>- <a href="https://maven.apache.org/"><strong>Maven:</strong></a> Maven will be used for the application packaging and building including running unit test cases<br>- <a href="https://docs.sonarqube.org/"><strong>SonarQube:</strong></a> SonarQube Catches bugs and vulnerabilities in your app, with thousands of automated Static Code Analysis rules.<br>- <a href="https://www.sonatype.com/"><strong>Nexus:</strong></a> Nexus Manage Binaries and build artifacts across your software supply chain<br>- <a href="https://aws.amazon.com/ec2/"><strong>EC2:</strong></a> EC2 allows users to rent virtual computers (EC2) to run their own workloads and applications.<br>- <a href="https://www.jenkins.io/"><strong>Jenkins:</strong></a> The leading open source automation server, Jenkins provides hundreds of plugins to support building, deploying and automating the project.</p><h4>Configure Environments</h4><p><strong>1) Create a GitHub Repository</strong><br> — Navigate to <a href="https://github.com/">https://github.com</a><br> — Click on Repositories<br> — Click on `Create` to Create a Repository<br> — Repository Name: `jenkins-maven-sonarqube-nexus-project`<br> — Click on `Create`<br> — Download the Project Zip from <a href="https://github.com/UtamaDalington/Jenkins-Maven-Sonarqube-Nexus-Project">https://github.com/UtamaDalington/Jenkins-Maven-Sonarqube-Nexus-Project</a><br> — Unzip and Push the code to the Repository you just provisioned</p><p><strong>2) SonarQube</strong><br> — Create an Ubuntu 24.04 VM instance and call it “SonarQube”<br> — Instance type: c7i-flex.large (2 vCPU and 4 GiB Memory)<br> — Security Group (Open): 9000 and 22 to 0.0.0.0/0 or Your-IP<br> — Key pair: Select or create a new keypair<br> — User data (Copy the following user data): <a href="https://github.com/UtamaDalington/Maven-SonarQube-Nexus-Jenkins-installations/blob/main/sonarqube-install.sh">https://github.com/UtamaDalington/Maven-SonarQube-Nexus-Jenkins-installations/blob/main/sonarqube-install.sh</a><br> — Launch Instance</p><p><strong>3) Nexus</strong><br> — Create an Ubuntu 24.04 VM instance and call it “Nexus”<br> — Instance type: m7i-flex.large (2 vCPU and 8 GiB Memory)<br> — Security Group (Open): 8081 and 22 to 0.0.0.0/0 or Your-IP<br> — Key pair: Select or create a new keypair<br> — User data (Copy the following user data): <a href="https://github.com/UtamaDalington/Maven-SonarQube-Nexus-Jenkins-installations/blob/main/nexus-install-t2large.sh">https://github.com/UtamaDalington/Maven-SonarQube-Nexus-Jenkins-installations/blob/main/nexus-install-t2large.sh</a><br> — Launch Instance</p><p><strong>4) Jenkins/Maven</strong><br> — Create an Ubuntu 24.04 VM instance and call it “Jenkins-Maven”<br> — Instance type: c7i-flex.large (2 vCPU and 4 GiB Memory)<br> — Security Group (Open): 8080 and 22 to 0.0.0.0/0 or Your-IP<br> — Key pair: Select or create a new keypair<br> — User data (Copy the following user data): <a href="https://github.com/UtamaDalington/Maven-SonarQube-Nexus-Jenkins-installations/blob/main/install-jenkins1.sh">https://github.com/UtamaDalington/Maven-SonarQube-Nexus-Jenkins-installations/blob/main/install-jenkins1.sh</a><br> — Launch Instance</p><h4>Project Preparation (Jenkins/Maven)</h4><ul><li>Verify the Maven installation and version<br>- <strong><em>mvn -v</em></strong></li><li>Verify the Java installation and version<br>- <strong><em>java -version</em></strong></li><li>This Project requires Java 11 installed, so install and switch to Java 11, if otherwise.<br>- <strong><em>sudo apt-get install -y openjdk-11-jdk</em></strong><br>- <strong><em>sudo update-alternatives — config java</em></strong></li><li>Create the <strong><em>`.m2`</em></strong> directory in the home directory of your current user that will orchestrate the build (jenkins)<br>- <strong><em>sudo mkdir .m2/</em></strong></li><li>Create the Settings file inside of the <strong><em>`~/.m2`</em></strong> directory<br>- <strong><em>cd ~/.m2/<br>- sudo wget (copy and paste the [raw file link](</em></strong><a href="https://raw.githubusercontent.com/UtamaDalington/Jenkins-Maven-Sonarqube-Nexus-Project/refs/heads/main/settings.xml"><strong><em>https://raw.githubusercontent.com/UtamaDalington/Jenkins-Maven-Sonarqube-Nexus-Project/refs/heads/main/settings.xml</em></strong></a><strong><em>) of the `settings.xml` file from GitHub Repository to download the file and it’s content into `.m2`)</em></strong></li><li>Ensure to change ownership of both <strong><em>`.m2`</em></strong> and <strong><em>`settings.xml`</em></strong> from root to jenkins<br>- <strong><em>sudo chown jenkins:jenkins .m2/<br>- sudo chown jenkins:jenkins settings.xml</em></strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8nvbQTV6GzVTaVbUr70JtQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vAlitB2lQ3h4nJJjKRv4hg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IzGJvX5rq-sXOGyTsHnmNg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s00v7obf8Bv8CVGtkKSEkQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iATR1AtmlN0_O-D6lE_PrQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1eda61e729f3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Establishing a Production-Ready WordPress Environment with Container Orchestration (Docker)]]></title>
            <link>https://medium.com/@utamadalington045/establishing-a-production-ready-wordpress-environment-with-container-orchestration-docker-22348d35bd50?source=rss-3988f6667f56------2</link>
            <guid isPermaLink="false">https://medium.com/p/22348d35bd50</guid>
            <dc:creator><![CDATA[UTAMA DALINGTON]]></dc:creator>
            <pubDate>Mon, 29 Sep 2025 23:44:52 GMT</pubDate>
            <atom:updated>2025-09-30T06:42:54.110Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Establishing a Production-Ready WordPress Environment with Container Orchestration (Docker) Architecture" src="https://cdn-images-1.medium.com/max/1024/1*Yy7ICwpQSRsP6VE0GeebIg.png" /><figcaption>Establishing a Production-Ready WordPress Environment with Container Orchestration (Docker) Architecture</figcaption></figure><h3>Project Overview</h3><p>A project focused on leveraging containerization best practices to create a reproducible and isolated WordPress stack. The solution uses Docker volumes to ensure data persistence and implements internal networking for secure service communication between the application and database containers, highly portable and scalable environment.</p><ol><li><a href="https://aws.amazon.com/ec2/"><strong>EC2 (Elastic Compute Cloud)</strong></a><strong>:</strong> A cloud service that provides scalable virtual computing resources (instances), allowing users to rent and deploy virtual servers to host applications and workloads.</li><li><a href="https://www.docker.com/"><strong>Docker</strong></a><strong>:</strong> A platform designed to simplify the creation, deployment, and running of applications by using containers. A container is a standardized, isolated package of software that holds everything needed to run an application: code, runtime, libraries, environment variables, and config files.<br>The key idea is that a container runs the same way, regardless of where it is deployed (on a developer’s laptop, a test server, or a production cloud VM).</li><li><a href="https://hub.docker.com/"><strong>Docker Hub</strong></a><strong>: </strong>Docker Hub is the world’s largest cloud-based container registry provided by Docker for storing, managing, and sharing Docker container images.<br>It acts as a central hub for the Docker community and commercial users, enabling developers to easily find, download, and distribute container images for their applications.</li></ol><h4>Why is Docker Essential?</h4><p>Docker solves the classic developer problem: <em>“It works on my machine!”</em></p><ul><li><strong>Portability and Consistency:</strong> It ensures the application’s environment is consistent across all stages (Development, Testing, Production).</li><li><strong>Isolation:</strong> Containers run in isolated environments, meaning an issue in one application won’t affect others running on the same host machine.</li><li><strong>Efficiency:</strong> Containers are lightweight, sharing the host machine’s operating system kernel. This makes them much faster to start and requires far less overhead than traditional Virtual Machines (VMs).</li><li><strong>Speed of Deployment (CI/CD):</strong> Docker integrates seamlessly into CI/CD pipelines, allowing you to build a single artifact (the container image) that can be reliably deployed thousands of times.</li></ul><h3>Step 1: (Launch an EC2 instance)</h3><ul><li>Create an Ubuntu 24.04 VM instance and call it “Docker”</li><li>Instance type: t3.micro (2 vCPU and 1 GiB Memory)</li><li>Security Group (Open port): 8080 and 22 to 0.0.0.0/0 or Your-IP</li><li>Key pair: Select or create a new keypair</li><li>User data (Copy the following user data): <a href="https://github.com/UtamaDalington/Maven-SonarQube-Nexus-Jenkins-installations/blob/main/install-docker.sh">https://github.com/UtamaDalington/Maven-SonarQube-Nexus-Jenkins-installations/blob/main/install-docker.sh</a></li><li>Launch Instance</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EUdb-Nvytl3eoLMDy2H3Ag.png" /><figcaption>Security Groups Configurations</figcaption></figure><h3>Step 2: (Configure the EC2 instance)</h3><p>Follow the commands in the script to install Apache HTTP Server, WordPress, and MySQL Database using Docker.</p><ul><li>User data (Copy the following user data): <a href="https://github.com/UtamaDalington/Maven-SonarQube-Nexus-Jenkins-installations/blob/main/docker-install-wordpress.md">https://github.com/UtamaDalington/Maven-SonarQube-Nexus-Jenkins-installations/blob/main/docker-install-wordpress.md</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TJPuVXMxBypAqdsRnfh9PQ.png" /><figcaption>EC2 Instance Configurations</figcaption></figure><h3>Step 3: (Congratulations)</h3><p>Your WordPress Application is now up and running.</p><ul><li>Access Application with: <a href="http://ec2_public_ip:8080/"><strong>http://EC2_Public_IP:8080</strong></a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6na_PQR3oM_vK5gPLUlu0g.png" /><figcaption>WordPress Application</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j-gjHsp4ekkFD911h7D6aA.png" /><figcaption>WordPress Application</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u6LWJ5JVqiOhhOqfobMuuw.png" /><figcaption>WordPress Application</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22348d35bd50" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[E-Commerce WebApp Development Environment Project]]></title>
            <link>https://medium.com/@utamadalington045/e-commerce-webapp-development-environmnt-project-97d80701f9ef?source=rss-3988f6667f56------2</link>
            <guid isPermaLink="false">https://medium.com/p/97d80701f9ef</guid>
            <dc:creator><![CDATA[UTAMA DALINGTON]]></dc:creator>
            <pubDate>Wed, 24 Sep 2025 23:04:50 GMT</pubDate>
            <atom:updated>2025-09-25T09:39:02.522Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q8493PqlbP4RETmEWiZs0w.png" /></figure><h3>Project ToolBox 🧰</h3><ul><li><a href="https://git-scm.com/"><strong>Git</strong></a><strong>:</strong> A distributed version control system for tracking, managing, and collaborating on application source code with speed and efficiency.</li><li><a href="https://github.com/"><strong>Github</strong></a><strong>:</strong> A web-based platform that hosts Git repositories and provides a collaborative environment for software development, allowing for issue tracking, code reviews, and project management.</li><li><a href="https://maven.apache.org/"><strong>Maven</strong></a><strong>:</strong> A powerful build automation tool used to compile, package, and manage dependencies for Java-based applications, including running automated unit tests.</li><li><a href="https://docs.sonarqube.org/"><strong>SonarQube</strong></a><strong>:</strong> A platform for static code analysis that automatically scans source code to detect bugs, security vulnerabilities, and code smells, ensuring overall code quality.</li><li><a href="https://www.sonatype.com/"><strong>Nexus</strong></a><strong>:</strong> A repository manager that centralizes the storage and management of binary artifacts and build dependencies, streamlining the software supply chain.</li><li><a href="https://aws.amazon.com/ec2/"><strong>EC2 (Elastic Compute Cloud)</strong></a><strong>:</strong> A cloud service that provides scalable virtual computing resources (instances), allowing users to rent and deploy virtual servers to host applications and workloads.</li></ul><h3>Configure Environments</h3><ol><li><strong>Create a GitHub Repository</strong></li></ol><ul><li>Navigate to <a href="https://github.com/">https://github.com</a></li><li>Click on Repositories</li><li>Click on Create to Create a Repository</li><li>Repository Name: maven-sonarqube-nexus-project</li><li>Click on Create</li><li>Download the Project Zip from <a href="https://github.com/UtamaDalington/Maven-SonarQube-Nexus-Java-WebApp-Project">https://github.com/UtamaDalington/Maven-SonarQube-Nexus-Java-WebApp-Project</a></li><li>Unzip and Push the code to the Repository you just provisioned</li></ul><p><strong>2. Maven</strong></p><ul><li>Create an Ubuntu 24.04 VM instance and call it “Apache-Maven”</li><li>Instance type: t3.micro (2 vCPU and 1 GiB Memory)</li><li>Security Group (Open): 22 to 0.0.0.0/0 or Your-IP</li><li>Key pair: Select or create a new keypair</li><li>User data (Copy the following user data): <a href="https://github.com/UtamaDalington/Maven-SonarQube-Nexus-Jenkins-installations/blob/main/maven-ubuntu-install.md">https://github.com/UtamaDalington/Maven-SonarQube-Nexus-Jenkins-installations/blob/main/maven-ubuntu-install.md</a></li><li>Launch Instance</li></ul><p><strong>3. SonarQube</strong></p><ul><li>Create an Ubuntu 24.04 VM instance and call it “SonarQube”</li><li>Instance type: c7i-flex.large (2 vCPU and 4 GiB Memory)</li><li>Security Group (Open): 9000 and 22 to 0.0.0.0/0 or Your-IP</li><li>Key pair: Select or create a new keypair</li><li>User data (Copy the following user data): <a href="https://github.com/UtamaDalington/Maven-SonarQube-Nexus-Jenkins-installations/blob/main/sonarqube-install.sh">https://github.com/UtamaDalington/Maven-SonarQube-Nexus-Jenkins-installations/blob/main/sonarqube-install.sh</a></li><li>Launch Instance</li></ul><p><strong>4. Nexus</strong></p><ul><li>Create an Ubuntu 24.04 VM instance and call it “Nexus”</li><li>Instance type: m7i-flex.large (2 vCPU and 8 GiB Memory)</li><li>Security Group (Open): 8081 and 22 to 0.0.0.0/0 or Your-IP</li><li>Key pair: Select or create a new keypair</li><li>User data (Copy the following user data): <a href="https://github.com/UtamaDalington/Maven-SonarQube-Nexus-Jenkins-installations/blob/main/nexus-install-t2large.sh">https://github.com/UtamaDalington/Maven-SonarQube-Nexus-Jenkins-installations/blob/main/nexus-install-t2large.sh</a></li><li>Launch Instance</li></ul><h3>Configure Nexus Repository</h3><p>Series of tutorial code snippets for use #Maven publish tutorial steps Publishing artifact to Nexus snapshot and release repo using maven.</p><ol><li>Create a snapshot repo using nexus, or use default coming in out of the box. DEFAULT</li><li>Create a release repo using nexus, or use default coming out of the box. DEFAULT</li><li>Create a group repo having both release, snapshot and other third party repos. or use default coming out of the box.</li><li>Download spring initializer project</li><li>Go settings.xml under &lt;MAVEN_INSTALL_LOCATION&gt;\apache-maven-3.6.0\conf or C:\Users&lt;USER_NAME&gt;.m2 or mkdir ~/.m2</li><li>Create/Move profiles named snapshot and release in settings.xml in ~/.m2 (can be done in pom.xml as well)</li><li>Add server user name and pwd in setting.xml (Encrypted recommended).</li><li>Edit pom.xml and add repository and snapshot repository in distribution management tag DEFAULT/DONE</li><li>Mark id should match in step 7 with server id of settings.xml, UPDATE NEXUS IP</li><li>Run the following maven/mvn commands to validate/package/deploy your app artifacts remotely</li></ol><ul><li>mvn validate (validate the project is correct and all necessary information is available.)</li><li>mvn compile (compile the source code of the project)</li><li>mvn test (run tests using a suitable unit testing framework. These tests should not require the code be packaged or deployed.)</li><li>mvn package (take the compiled code and package it in its distributable format, such as a WAR/JAR/EAR.)</li><li>mvn verify (run any checks to verify the package is valid and meets quality criteria.)</li><li>mvn install (install the package into the local repository, for use as a dependency in other projects locally.)</li><li>mvn deploy (done in an integration or release environment, copies the final package to the remote/SNAPSHOT repository for sharing with other developers and projects.)</li></ul><ol><li>Change the version from 1.0-Snapshot to 1.0</li><li>Run mvn deploy to deploy to Snapshot Repo or mvn clean deploy -P release, to deploy it to Release Repo</li></ol><h3>Maven Lifecycle Phases</h3><ul><li><a href="https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#a-build-lifecycle-is-made-up-of-phases">https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html#a-build-lifecycle-is-made-up-of-phases</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S0_pDFdIXhUSUT4ZrqOk2A.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iOLYUu7HPQrVjapQSdSd8g.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AlU4cEG81QcvtL5mh4Hwww.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97d80701f9ef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Designing and Implementing an Amazon VPC for a 3-Tier Web Application]]></title>
            <link>https://medium.com/@utamadalington045/designing-and-implementing-an-amazon-vpc-for-a-3-tier-web-application-2a1a04303d84?source=rss-3988f6667f56------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a1a04303d84</guid>
            <dc:creator><![CDATA[UTAMA DALINGTON]]></dc:creator>
            <pubDate>Mon, 18 Aug 2025 23:03:27 GMT</pubDate>
            <atom:updated>2025-08-30T04:40:02.051Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="3-Tier Web Application Architecture" src="https://cdn-images-1.medium.com/max/1024/1*BO02sqvL_5VcQFHedg8qsg.png" /><figcaption>3-Tier Web Application Architecture</figcaption></figure><p><strong>PROJECT OVERVIEW:</strong></p><p>This project guides you through establishing a robust Virtual Private Cloud (VPC) infrastructure within your AWS Cloud environment, specifically designed to host a foundational 3-tier web application. To ensure maximum uptime and resilience, the VPC will span multiple Availability Zones (AZs). Before diving into the setup, we’ll briefly review VPC fundamentals and the functionality of Elastic Load Balancing.</p><p>This project aims to achieve the following critical outcomes for your web application:</p><ol><li><strong>High Availability:</strong></li></ol><ul><li><strong>Objective:</strong> Guarantee uninterrupted service by designing a system that can withstand the failure of individual components, ensuring the application remains operational.</li><li><strong>Implementation:</strong> Achieve this by distributing resources across multiple AWS Availability Zones (AZs), employing Elastic Load Balancing to distribute traffic, and configuring Auto Scaling for compute resources to adapt to demand and failures.</li></ul><p><strong>2. Fault Tolerance:</strong></p><ul><li><strong>Objective:</strong> Build a system capable of enduring unexpected hardware or software malfunctions without significant disruption to service.</li><li><strong>Implementation:</strong> Leverage AWS’s inherent redundancy features, including services like Amazon RDS Multi-AZ deployments, to automatically replicate data and failover in case of an outage.</li></ul><p><strong>3. Security Compliance:</strong></p><ul><li><strong>Objective:</strong> Establish and maintain stringent security protocols that align with industry best practices and compliance frameworks, such as the AWS Well-Architected Framework.</li><li><strong>Implementation:</strong> Enforce security through comprehensive use of a Bastion Host (Jump Server) deployed in the public subnet, which makes it accessible from the internet. All other instances, like your application servers and databases, are placed in a private subnet and are not directly exposed to the internet. To connect to an instance in the private subnet, you must first connect to the Bastion Host. From the Bastion Host, you can then establish a secure connection to the private instances. Ensure security by using <strong>AWS Identity and Access Management (IAM)</strong>, <strong>Security Groups</strong>, and <strong>encryption mechanisms</strong>.</li></ul><p><strong>4. Performance Efficiency:</strong></p><ul><li><strong>Objective:</strong> Optimize resource utilization and maintain responsiveness to meet user demands effectively and cost-efficiently.</li><li><strong>Implementation:</strong> Scale resources dynamically to handle varying loads.</li></ul><p><strong>5. Reliability:</strong></p><ul><li><strong>Objective:</strong> Ensure the system consistently performs its intended function correctly and predictably over time.</li><li><strong>Implementation:</strong> Implement robust backup and recovery strategies, Multi-AZ deployments, conduct regular testing of disaster recovery plans, and design for graceful degradation.</li></ul><h4>Step 1: Set up your Virtual Private Cloud (VPC)</h4><ul><li>Create VPC with Name <strong>WEBAPPVPC</strong> and CIDR IP Address <strong>10.0.0.0/16</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RRZnp5RL7N6KLV9G2B0x5Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*25NHtbEcfhb-wne25V-zIg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cbo6JLqzqBPW3xg_q-FFSg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vvw8vst8wR30iD_wOKPUsQ.png" /></figure><h4>Step 2: Provision all six (6) required Subnets</h4><ul><li>Place <strong>PublicSubnet1 (CIDR IPv4 Address 10.0.1.0/24)</strong>, <strong>PrivateSubnet1 (CIDR IPv4 Address 10.0.11.0/24)</strong> and <strong>PrivateSubnet3 (CIDR IPv4 Address 10.0.13.0/24)</strong> in the same Availability Zone that&#39;s <strong>Availability Zone 1 (us-east-1a)</strong>.</li><li>Place <strong>PublicSubnet2 (CIDR IPv4 Address 10.0.2.0/24)</strong>, <strong>PrivateSubnet2 (CIDR IPv4 Address 10.0.12.0/24)</strong> and <strong>PrivateSubnet4 (CIDR IPv4 Address 10.0.14.0/24)</strong> in the same Availability Zone that’s <strong>Availability Zone 2 (us-east-1b)</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oCdS97WCFA31hEiojHj5Jw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*08F8dmjkDupsF0Zvf8dmGg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mXbi4fxiBTxALo_6W3G_gQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3Ug2fFsaJix8qooEVDNnmA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yXzBiMeQ9k2YNn1npieHdw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HUSI68Zr5ATfgBW4LxJBQA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P-bStrSIfK2Lj8V60XOGWw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hDdkOAi32PeFwUsm3PS-TQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t6QK-Ii2tKiALDv9x2EvmA.png" /></figure><p>Your VPC is now configured with <strong>six subnets</strong> across two Availability Zones: two public subnets for the Application Load Balancer, two private subnets for EC2 instances, and two private subnets for RDS instances.</p><h4>Step 3: Provision an Internet Gateway (IGW) and attach it with the VPC (<strong>WEBAPPVPC)</strong></h4><p>An <strong>Internet Gateway</strong> is a robust and essential piece of your <strong>Virtual Private Cloud (VPC)</strong>. It enables instances within your VPC to <strong>communicate seamlessly with the public internet</strong>. Think of it as the highly reliable bridge connecting your private cloud resources to the vast web.</p><p>What makes it stand out is its architecture: it’s <strong>horizontally scaled, redundant, and highly available</strong>. This means it won’t become a bottleneck or a single point of failure. You don’t have to worry about it limiting your <strong>network traffic bandwidth</strong> or introducing <strong>availability risks</strong> to your applications.</p><p>An <strong>internet gateway</strong> acts as a crucial bridge for your virtual private cloud (VPC). It primarily serves two functions:</p><ul><li>Providing a <strong>route for internet traffic.</strong></li><li>Performing <strong>network address translation (NAT)</strong> for instances with public IPv4 addresses.</li></ul><p>The purpose of this step is to create an internet gateway, which is essential for routing internet traffic to your public subnets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EAzPbGfS46RAislt1yuiRA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9Xq5REL1dpla7SxxsHhFBw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u5Fc4DIKTIxTvY2YWsPibg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I43ZGtQuaBFvBPHsAiHYMQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CfDqWWbPxnqqCht-uNx2Mw.png" /></figure><p>Now that your <strong>Internet Gateway (IGW)</strong> is attached to your <strong>Lab VPC</strong>, the next step is to configure your public subnets’ route tables to direct traffic through this IGW. You’ll complete this route configuration after setting up your <strong>NAT Gateway</strong>.</p><h4>Step 4: Set up a NAT Gateway</h4><p>A <strong>NAT gateway</strong> allows instances in a <strong>private subnet</strong> to access the internet or other AWS services, while simultaneously preventing unsolicited inbound connections from the internet to those instances. You’ll create a NAT gateway in this task to enable internet connectivity for your private subnets.</p><p>Here, we will create two (2) <strong>NAT gateways, </strong>one (1) for each Availability Zones.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9FTgojUcPCS2qL8BSG4TkQ.png" /></figure><p><strong>Create the first NAT Gateway (WEBAPPVPC-Nat-Gateway-1)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ifmxc59Mx2HkWcwVv3hDEQ.png" /></figure><p><strong>Create the second NAT Gateway (WEBAPPVPC-Nat-Gateway-2)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IyzJ9bjn3IOnoHVDOZR64A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jvf8pCcSQJ4sR56siz1vQA.png" /></figure><p>Alright, the NAT Gateways are set up. Now, let’s configure your public and private subnet <strong>route tables</strong> so they correctly use the <strong>Internet Gateway (IGW)</strong> and the <strong>NAT Gateways</strong>.</p><h4>Step 5: Set up your Route Tables and associate with the respective Subnets</h4><p>In a Virtual Private Cloud (VPC), a <strong>route table</strong> acts like a traffic controller for your network. It holds <strong>routes</strong>, which are rules that tell your network traffic where to go. Every <strong>subnet</strong> in your VPC needs to be linked to a route table; this link determines how traffic flows in and out of that specific subnet. While a subnet can only have one route table at a time, you can use the same route table for multiple subnets.</p><p>For this task, you’ll establish distinct routing configurations by creating one route table for your public subnets and another for your private subnets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SqsO_A58_85h-TN6r_jvQw.png" /></figure><p><strong>Create a Public Route Table (Public-Route-Table), update the Route and associate it with the Public Subnets (PublicSubnet1 and PublicSubnet2)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UJFGiZCIJRN6_YhiEHTxbw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0hewho6HKKdv9rOiyy_tzA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I4Mu7gpNhQfnexbf3HPsKQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jTqlU5ZPKxMq3u8cK-eBlw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ys6VXEILuJqcw8TVRF8SvA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tf6Rm6oQzjEHHgqMUY4wdw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jXOnjrIsW-YQZ4YuNk4C4g.png" /></figure><p>Our public subnets can now reach the internet because their associated route table explicitly sends outbound traffic through the internet gateway we set up.</p><p>To enable internet access for instances in your <strong>private subnets</strong> (primarily for updates and upgrades), you need to configure their associated <strong>route tables</strong> to direct all internet-bound traffic through the <strong>NAT Gateway</strong>.</p><ul><li>Set up dedicated private route tables for each private subnet across both Availability Zones (AZs).</li><li>Configure routes in these tables to direct outbound traffic through the NAT Gateways.</li><li>Link each private subnet to its corresponding route table within its AZ.</li></ul><p><strong>Create the first Private Route Table (Private-Route-Table-1), update the Route and associate it with the Private Subnets (PrivateSubnet1 and PrivateSubnet3)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I_O6Rkk2LMp-e5bIooynIg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*chBMvVnWThjnl495zxUZug.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n-Pl1pNRyYBdLFhwd0cnIg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PlbL8MmmnXyUfzH_MVgzRQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HzwN0uXU7vyUkJLyJZZUMA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TcTq140Ii3tjSPfB45FTUg.png" /></figure><p><strong>Create the second Private Route Table (Private-Route-Table-2), update the Route and associate it with the Private Subnets (PrivateSubnet2 and PrivateSubnet4)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OeBa3k8-s0C0LBrRzLUXwQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k3I4655iwjtyFoHnULdgyw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OlsWZGVgMPcGhbvRM0mg2w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_OKWyKcvlu-_Za4VQoe0Tw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*in61aJIzN_gXD3Nw2DfXUA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XjXqpI3e7FhEefvtpBjGug.png" /></figure><p>You’ve successfully created <strong>route tables</strong> and linked them to the <strong>private subnets</strong>. This setup directs outbound internet traffic from the private subnets to the <strong>NAT gateways</strong> located in the public subnet.</p><p><strong>Important Note on Availability Zones (AZs)</strong></p><p>For a highly available architecture, avoid using a single NAT gateway for resources across multiple Availability Zones. If the Availability Zone with your NAT gateway goes down, all resources in other AZs will lose internet access.</p><p>To prevent this, it’s a best practice to create a NAT gateway in <strong>at least two Availability Zones</strong>. Then, configure your route tables to ensure that resources in a specific AZ use the NAT gateway within that same AZ. You can use Amazon Cloud Watch to monitor the health of your NAT gateways and their Availability Zones.</p><h4>Step 6: Creating all the necessary workload security groups.</h4><p>To set up the environment, we will create four (4) distinct security groups to manage network access:</p><ul><li>An <strong>RDS security group</strong> to control access to the database instances.</li><li>An <strong>EC2 security group</strong> for the application’s compute instances.</li><li>An <strong>Application Load Balancer (ALB) security group</strong> to permit inbound traffic from the internet, making the application publicly accessible.</li><li>A <strong>Bastion Host (Jump Server) security group</strong> that acts as a secure intermediary, allowing you to SSH into the EC2 instances without exposing them directly to the internet.</li></ul><p><strong>Application Load Balancer (ALB) security group</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I0GMOYPtrj_oTrUX9CeKXQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y9wJwPl4ZyRSPgQRvRuO5Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7mijWyJOylU4CsB__Afvkg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lcQF0hlHsCRzms4Jx_lgDg.png" /></figure><p><strong>EC2 security group</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uXrZTG9RnBr9adRorW8MOw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1yV2Dbdh3iYmLaOWW3eN1Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5mLBiVJARMM3H9geXoQ7AQ.png" /></figure><p><strong>RDS security group</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3PttD_GI7tqeSSZa-21BpA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dYCU-8lZlMSuHmRcLigtqQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0mewOLg8zIH7ugToZXEznQ.png" /></figure><p><strong>Bastion Host (Jump Server) security group</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4jRJ-VnXWVTYbfq8mTVoRw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U6_ICfFPlikbHHNr57zPlQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gsJlbm8DG4zCH5aq1CqEdg.png" /></figure><p>Now, you have created your security groups to enable the workloads connect with each other accordingly. Also, for the EC2 instances to connect with the Bastion Host (Jump Server) successfully, you need to edit the inbound rules of the EC2 instances security group to allow SSH access from the Bastion Host (Jump Server).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rAJkLR_Or8y91Fx4vKABSg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kdndZsb7jZT20pDognf8Dw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4LId9DPyHDv1aw7QrVDJQQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SWsdnsTsvq5iYJTz7iKgLA.png" /></figure><h4>Step 7: Launching and Deploying the Web Application.</h4><p>For this task, you will provision the Relational Database Service (RDS) and Elastic Compute Cloud (EC2) instances in the private subnets to enhance security, while the Application Load Balancer will be configured in the public subnets to handle incoming traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XSCpOXhRhiP1NiB4bnGeyw.png" /></figure><p><strong>Create Database (RDS) Subnet Group</strong></p><p>An <strong>RDS Subnet Group</strong> is a collection of subnets you create and specify for your Amazon Relational Database Service (RDS) DB instances within an Amazon Virtual Private Cloud (<strong>VPC</strong>). When you launch a DB instance in a VPC, you must select an RDS Subnet Group. RDS then uses the subnets in that group to assign IP addresses to your DB instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2jdzZc8L6Q1oHphdprrhtw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5N64Y7xbzvhrRrCyQXWidg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NppfFSjWphDzGEDdgdZMqw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*40PZEYsat5xrFggmXfRn-g.png" /></figure><p><strong>Create Database (RDS)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*99SY5q-NTfuXsu0TqW7_qQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*as_1CjjdOwfcQYSuB5fJzg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oNeL-Vj5172rKiwrxeJm0A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NK0ZljIxWadmRc14AOR5Vw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eybbMCAkpriWjbkHeUee6A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h6-9jLEMtc5U5O1dyQ4_3A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ppEmpMQpGT4s91aST9OJ_g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3lgIAbfJGKnmlBZyhlcnrw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bgtO7mq_OB_0uRR-etoFtg.png" /></figure><p>This will create a <strong>writer instance</strong> in one Availability Zone and a <strong>reader instance</strong> in another. This will take a few minutes. Use the <strong>refresh button</strong> to check the status. You can move on once you see the “Successfully created database” message.</p><p>Next, you need to save the <strong>DB Endpoints</strong>. Under “DB identifier,” select <strong>webappvpc-db-cluster</strong>. In the “Connectivity &amp; security” section, find <strong>Endpoints</strong> and copy the Endpoint names for both the <strong>Writer</strong> and <strong>Reader</strong> types. These endpoints are essential for deploying your application on the EC2 instances.</p><h4>Step 8: Create an <strong>S3 bucket</strong> to store your application’s code</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pUlazxc-bzh8u674fPpuMg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qko9r4sdNE9QS1_Wv3W36w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6eR7-1keMz5rNRi8M5lDtg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KqDucmAF4IkzFDDFWeuDpw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XTDWDOvjbAtXTxyVpLA0AA.png" /></figure><h4>Step 9: Download Application Configurations and Apply Updates</h4><p><a href="https://drive.google.com/file/d/15bPtC-15Y1sPJsc90ilSbnT6fGOArOwf/view?usp=sharing">https://drive.google.com/file/d/15bPtC-15Y1sPJsc90ilSbnT6fGOArOwf/view?usp=sharing</a></p><p>OR</p><p><a href="https://github.com/UtamaDalington/Designing-and-Implementing-a-3-Tier-Web-Application">https://github.com/UtamaDalington/Designing-and-Implementing-a-3-Tier-Web-Application</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QEXf3QqdNen4wB2P_IDF-Q.png" /></figure><p>Start by unzipping the file, then use your favorite text editor to make your changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*21V8GVhXSe585qNxxAHzSg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mvDGGLLB3gqAhKAr78ay6Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aWAaVY960o-XAJohQ96fHw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bdRsDKuW6DD09ujbG7ToyA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YWJ0sz9XDTT85EMKaHzGPw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cIWrRLmwLl-aKrz-zm68Dg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dqnOjui6nHfJistJnu5TFg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sCXUNUaTLUnDBF6iOFaiGw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c1a3wxzzBEbMHAWUXktFow.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NPyVVzKOf6zcpPiYuj-Maw.png" /></figure><p>Save your changes. Then, re-upload the files to the bucket, you must not re-upload all the files, but note that you <strong>must</strong> re-upload the <strong><em>app-automation.sh </em></strong>file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u_752e9y1ZksWR2paVdXxg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NThHbA1GicAO-8W7PQhYxQ.png" /></figure><h4>Step 10: Set up an IAM role for your EC2 instances, allowing it to read data from S3</h4><p>This role will be assigned to the application server instances, allowing them to download the necessary application database and Apache configuration files from the S3 bucket we created earlier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k2fxsSCLwdgxRCBOAsuVRg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VlqtazW6HaJxzSyuOGp0Cg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qT8calhL3Fke8OuOhc6nLg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AEdnuFLIt81wCQSYrfXc8g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5cacA9hvsYMRvdDNHKeFuw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6T9bDhPXfHSFQQqoriZmVg.png" /></figure><h4>Step 11: Provision and configure EC2 instances</h4><p>The next step is to <strong>create and deploy the application on EC2 instances</strong>. For high availability across multiple Availability Zones, it’s a best practice to <strong>create and reuse a launch template</strong> rather than configuring each EC2 instance individually. This ensures consistency and simplifies deployment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-gMK_ftz3tebFnUNuqMVFg.png" /></figure><p><strong>To get started, first create the launch template</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cJQTYfN48Vj4Q1e7n0rOdQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WDSkXfbVEX97TeTTdIy2ow.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JAW0g-JJXvOpDURlv-P1Ug.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UESQbfsb_9H7HA8nBM5Z-w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IxN75HzMo7kBGFV_yodWUA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UdGhjTJspvId2wn1zmQGUA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*67l3oWi7nu0iBtmTf9BNDg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OiwQRw0M0Tomz-YMI-GyBw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jUkuB2oN3NmDqbJoUrjbLg.png" /></figure><p><strong>Create instances from launch template</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Th43e0TkbaU-0FYMJaTZgQ.png" /></figure><p><strong>Launch the first instance (ApplicationServer1) from launch template</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z06e2hUrOHGDwjx8I8jOnA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SUFawBf6SChbEIthQm_Znw.png" /></figure><p><strong>Launch the second instance (ApplicationServer2) from launch template</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Th43e0TkbaU-0FYMJaTZgQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W2hwepe2sn3f9F1Aqs0MFQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wu3vez77GqfthrvWfK4ZLQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NVxI7GBnupdG7diz_g7B2w.png" /></figure><h4>Step 12: Create Load Balancer Target Group and Application Load Balancer</h4><p>A <strong>Load Balancer Target Group</strong> is a logical collection of resources, such as servers or virtual machines, that a load balancer directs traffic to. It’s essentially a grouping of “targets” that all perform the same function.</p><p>On the other hand an <strong>Application Load Balancer (ALB)</strong> is a type of load balancer that distributes incoming application traffic across multiple targets, such as EC2 instances, in multiple Availability Zones. This increases the availability and fault tolerance of your application. The ALB operates at the application layer (Layer 7) of the OSI model and uses rules to route traffic based on content, such as the URL path or hostname, to different target groups.</p><p><strong>Load Balancer Target Group</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1FEr1Bva_5C6xf0yXwSr8w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0I_3JU9Zp0PeUEfjtudsrQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_2XPeroeA01IcP1-xZiLTg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mIWYA3RlyFgZdrYOKJ-c9g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4jxfHpruOft-mblmdMMwaQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N7yMKwG1RzuJfdYA8g_Bhw.png" /></figure><p><strong>Application Load Balancer</strong></p><p>Create an <strong>Application Load Balancer</strong> in the public subnets to allow users to access the application through a web browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DG6lnUKBVbigh94IhD0-bQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KL73YxSCpcAD1cPi-MNtrQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GdW3rc4Af0Nya5ukNZqi6g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j8x-7rN3negGp0pknwJaBg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0AifFwamxX9oklj9sDjA8Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eh4PP59HK4GtXi4L3-grpQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uofgnhf2J7mTCE2nhGw93A.png" /></figure><h4>Step 13: Create Bastion Host (Jump Server) to SSH securely into your Private Instances</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cb3uNRiHICAs09Qj_vvu7w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rCuIlkshJt73J-q_LOj5-w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xzRklldtoGJOEqL7BqnS5w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cj2fgZhUTxgF42AevbE32Q.png" /></figure><p><strong>SSH securely into the Private Instances (ApplicationServer1 and ApplicationServer2) and run configurations from <em>app-automation.sh</em></strong></p><p>Connecting to a private EC2 instance from a bastion host involves a two-step SSH process: first to the bastion host, and then from the bastion host to the private instance. This method leverages SSH agent forwarding for secure key management.</p><p><strong>Step-by-Step Connection:</strong></p><p><strong>· Start SSH Agent (Local Machine):</strong></p><p>Open your local terminal (e.g., Git Bash, Linux terminal).</p><p>Run the command to start the SSH agent in the background:</p><p><em>eval $(ssh-agent)</em></p><p><strong>· Add SSH Key to Agent (Local Machine):</strong></p><p>Add your private EC2 instance’s key to the SSH agent:</p><p><em>ssh-add /path/to/your/key.pem</em></p><p>Replace /path/to/your/key.pem with the actual path to your key file.</p><p><strong>· Verify the key is added:</strong></p><p><em>ssh-add -l</em></p><p>· <strong>Connect to Bastion Host (Local Machine):</strong></p><p>SSH into the bastion host, enabling agent forwarding (-A flag):</p><p><em>ssh -A ubuntu@&lt;Bastion_Host_Public_IP&gt;</em></p><p>Replace &lt;Bastion_Host_Public_IP&gt; with the public IP address of your bastion host.</p><p><strong>· Connect to Private EC2 Instance (from Bastion Host):</strong></p><p>Once connected to the bastion host, SSH into your private instance using its private IP address. The SSH agent forwarding will automatically handle the key authentication without needing to copy the <em>.pem</em> file to the bastion host.</p><p><em>ssh ubuntu@&lt;Private_Instance_Private_IP&gt;</em></p><p>Replace &lt;Private_Instance_Private_IP&gt; with the private IP address of your private EC2 instance.</p><p>You are now connected to your private EC2 instance through the bastion host.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*---mP3Lf2HV9vawRei0rpw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qy_A0SqUpVdqZMjkJleSAw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bcn4p298m9-j0oEoLIFyHQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fHavbdVD6pxewdcvLCd-8w.png" /></figure><p><strong>To save changes in the Nano editor in Linux, follow these steps:</strong></p><ul><li><strong>Initiate Save:</strong> Press Ctrl + O (Control key and the letter &#39;O&#39; simultaneously). This command signifies &quot;Write Out&quot; in Nano, which is equivalent to saving.</li><li><strong>Confirm Filename:</strong> At the bottom of the screen, Nano will display the current filename and prompt you to confirm it.</li><li><strong>Execute Save:</strong> Press Enter to confirm the filename and save the changes to the file.</li></ul><p><strong>To save and then exit Nano:</strong></p><ul><li><strong>Initiate Exit:</strong> Press Ctrl + X (Control key and the letter &#39;X&#39; simultaneously).</li><li><strong>Save Prompt:</strong> If there are unsaved changes, Nano will ask if you want to save them.</li><li><strong>Confirm Save:</strong> Press Y (for Yes) to save the changes.</li><li><strong>Confirm Filename (if prompted):</strong> If you are creating a new file or saving as a new name, you might be prompted to confirm the filename. Press Enter to confirm.</li><li><strong>Exit:</strong> Nano will then exit.</li></ul><p>Note: If you wish to save the file with a different name (Save As), you can do so by pressing Ctrl + O, then modifying the filename presented at the bottom of the screen before pressing Enter. You can then exit Nano with Ctrl + X.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y7daIQCLNUCXIVwslqXb7w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dggI6O7wxUY3-f-dvxPrNg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*92gAaq2Nce390jHipAYdBA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NjlVTpJhpjl49xWMIF7-Rw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*84AKAdyXSnyeibh_IB4ovg.png" /></figure><h4>Step 14: Congratulations</h4><p>Access the website using the <strong>DNS name </strong>of the<strong> Application Load Balancer</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r8ZCNCWMFkL5UlAasIVkKg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WcdBA2izDUMoq30rsyGSyw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AGP1PJEgYC01biUugjt0nQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vq9mnI4D0VLbvriOe3xljg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4JTveyghMJbR5DRjC6CGMQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a1a04303d84" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automated Management of AWS IAM API Keys: Rotation, Deactivation, Creation, Deletion, and…]]></title>
            <link>https://medium.com/@utamadalington045/automated-management-of-aws-iam-api-keys-rotation-deactivation-creation-deletion-and-1e4335232114?source=rss-3988f6667f56------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e4335232114</guid>
            <dc:creator><![CDATA[UTAMA DALINGTON]]></dc:creator>
            <pubDate>Tue, 08 Jul 2025 19:48:42 GMT</pubDate>
            <atom:updated>2025-07-09T07:12:27.228Z</atom:updated>
            <content:encoded><![CDATA[<h3>Automated Management of AWS IAM API Keys: Rotation, Deactivation, Creation, Deletion, and Notification.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AbXPSLqUzALGaUYOhjnzzg.png" /><figcaption><strong>Automated Management of AWS IAM API Keys: Rotation, Deactivation, Creation, and Deletion Architecture</strong></figcaption></figure><p><strong>Project Overview:</strong><br> This project focuses on strengthening the security and compliance posture of an AWS environment by deploying an automated, end-to-end solution for managing IAM (Identity and Access Management) access keys. It integrates key AWS services — including Lambda, CloudWatch EventsBridge, Secrets Manager, Amazon SNS (Simple Notification Service) and IAM — to automate key rotation and deactivation, minimizing risk and ensuring alignment with security best practices.</p><p><strong>Key Components and Workflow:</strong></p><p>· <strong>AWS Lambda:</strong> Automates the rotation and lifecycle management of access keys using serverless compute, eliminating manual intervention.</p><p>· <strong>Amazon EventBridge (formerly CloudWatch Events):</strong> Schedules and triggers Lambda functions at defined intervals to ensure timely execution of key rotation tasks.</p><p>· <strong>AWS Secrets Manager:</strong> Securely stores access keys and enables centralized, encrypted secret management, allowing Lambda to retrieve credentials securely.</p><p><strong>· Amazon SNS (Simple Notification Service):</strong> To send messages (notifications) to subscriber’s email after Creation and Deletion of access keys.</p><p>· <strong>IAM:</strong> Configures roles and permissions to enable secure and controlled key rotation, as well as automated deactivation of unused keys.</p><p><strong>Benefits and Outcomes:</strong></p><p>· <strong>Improved Security:</strong> Automated key management reduces human error and ensures prompt rotation and deactivation of inactive keys, reducing the risk of unauthorized access.</p><p>· <strong>Compliance-Ready:</strong> Maintains adherence to industry standards and internal compliance policies through consistent, auditable key management practices.</p><p>· <strong>Operational Efficiency:</strong> Minimizes manual workload, allowing teams to focus on strategic initiatives instead of repetitive IAM tasks.</p><p>This solution delivers a secure, scalable, and automated approach to IAM access key management, covering both rotation and removal. By leveraging native AWS tools and aligning with best practices, it significantly enhances the AWS environment’s security, ensures regulatory compliance, and reduces administrative burden.</p><h4>1: Create Two IAM Users</h4><p>The Two IAM Users will be used as Test Users for this project<br>IAM User One name: <strong>app-user-1</strong><br>IAM User Two name: <strong>app-user-2</strong></p><figure><img alt="Go to IAM and create both Users" src="https://cdn-images-1.medium.com/max/1024/1*Lg_Bxyk-aHOqg4oGEn20nw.png" /><figcaption>Go to <strong>IAM</strong> and create both <strong>Users</strong></figcaption></figure><figure><img alt="create both Users" src="https://cdn-images-1.medium.com/max/1024/1*SI3WH98ITBB8CfWuz-mSkA.png" /><figcaption>Create both <strong>Users</strong></figcaption></figure><h4>Create IAM User One and Assign the following IAM Policies:</h4><p><strong>-</strong>AmazonEC2FullAccess<br>-AmazonS3FullAccess</p><figure><img alt="app-user-1" src="https://cdn-images-1.medium.com/max/1024/1*Dnlv5Sfm2lh0h5_eKyTVCg.png" /><figcaption><strong>app-user-1</strong></figcaption></figure><figure><img alt="Assign IAM Policies to app-user-1" src="https://cdn-images-1.medium.com/max/1024/1*B8Li7-CY6uiNqq-C2uiJsg.png" /><figcaption>Assign <strong>IAM Policies</strong> to <strong>app-user-1</strong></figcaption></figure><figure><img alt="Create app-user-1" src="https://cdn-images-1.medium.com/max/1024/1*PBLPA9wUax6hiTjMmL4E2w.png" /><figcaption>Create <strong>app-user-1</strong></figcaption></figure><h4>Create IAM User two and Assign the following IAM Policies:</h4><p><strong>-</strong>AmazonEC2FullAccess<br>-AmazonS3FullAccess</p><figure><img alt="app-user-2" src="https://cdn-images-1.medium.com/max/1024/1*-j2w0e0vE31Su20O80BUBw.png" /><figcaption><strong>app-user-2</strong></figcaption></figure><figure><img alt="Assign IAM Policies to app-user-2" src="https://cdn-images-1.medium.com/max/800/1*rXYEuHDvbe_K2jbXZHs4EA.png" /><figcaption>Assign <strong>IAM Policies</strong> to <strong>app-user-2</strong></figcaption></figure><figure><img alt="Create app-user-2" src="https://cdn-images-1.medium.com/max/1024/1*Z5blWTblRxFzsDnELPIGQg.png" /><figcaption>Create <strong>app-user-2</strong></figcaption></figure><figure><img alt="app-user-2 and app-user-2 created" src="https://cdn-images-1.medium.com/max/1024/1*UPjZ_GAUBWoUDay6pGBpow.png" /><figcaption><strong>app-user-1 and app-user-2 </strong>created</figcaption></figure><h4>Create and Download Access Keys for the two Users (app-user-1, app-user-2) by clicking separately on each User created.</h4><p>These Access keys will be stored in the Secrets Manager as we progress, so make sure to keep the details securely.</p><figure><img alt="Click on each User to generate Access Keys separately" src="https://cdn-images-1.medium.com/max/800/1*3MRIvlUjJczBl0eVxOj1Ww.png" /><figcaption>Click on each <strong>User</strong> to generate <strong>Access Keys</strong> separately</figcaption></figure><h4>app-user-1 access key creation</h4><figure><img alt="app-user-1 access key creation" src="https://cdn-images-1.medium.com/max/1024/1*snHnBLJ7tVXtotwZ-TYSxw.png" /><figcaption><strong>app-user-1 access key</strong> creation</figcaption></figure><figure><img alt="app-user-1 access key creation" src="https://cdn-images-1.medium.com/max/1024/1*MHquOFVvj8Uw7h-8Y8VzSw.png" /><figcaption><strong>app-user-1 access key</strong> creation</figcaption></figure><figure><img alt="app-user-1 access key creation" src="https://cdn-images-1.medium.com/max/1024/1*G5aY4Z3KT-_QuwSCmaTBHw.png" /><figcaption><strong>app-user-1 access key</strong> creation</figcaption></figure><figure><img alt="app-user-1 access key creation" src="https://cdn-images-1.medium.com/max/1024/1*3_FTo3qHP2-9CurWl0mTWg.png" /><figcaption><strong>app-user-1 access key</strong> creation</figcaption></figure><h4>app-user-2 access key creation</h4><figure><img alt="app-user-2 access key creation" src="https://cdn-images-1.medium.com/max/1024/1*RNLktUEEG8RO4pFgwscGdA.png" /><figcaption><strong>app-user-2 access key</strong> creation</figcaption></figure><figure><img alt="app-user-2 access key creation" src="https://cdn-images-1.medium.com/max/1024/1*HOqjlBwhVvARNCqg4yY-hQ.png" /><figcaption><strong>app-user-2 access key</strong> creation</figcaption></figure><figure><img alt="app-user-2 access key creation" src="https://cdn-images-1.medium.com/max/1024/1*h6nNxcuFqb-c1U_QalafqQ.png" /><figcaption><strong>app-user-2 access key</strong> creation</figcaption></figure><figure><img alt="app-user-2 access key creation" src="https://cdn-images-1.medium.com/max/1024/1*uNAHzDJRYNe2QOLTuGEDdw.png" /><figcaption><strong>app-user-2 access key</strong> creation</figcaption></figure><h4>2: Create Secrets Manager secrets to store the Access Keys of both Users</h4><p>Get the Access Keys credentials of each User (<strong>app-user-1 </strong>and<strong> app-user-2</strong>) from the <strong>.csv file </strong>you downloaded and store in Secrets Manager separately.<br><strong>-</strong>UserName<br>-AccessKeyId<br><strong>-</strong>SecretAccessKey</p><figure><img alt="Go to Secrets Manager and store Secrets of both Users" src="https://cdn-images-1.medium.com/max/1024/1*Iw07Y7ro70FaCe6jycIzXw.png" /><figcaption>Go to <strong>Secrets Manager </strong>and store <strong>Secrets</strong> of both <strong>Users</strong></figcaption></figure><figure><img alt="Click on Store a new secret" src="https://cdn-images-1.medium.com/max/1024/1*ashO5_7xqVXED1JX78AZKQ.png" /><figcaption>Click on <strong>Store a new secret</strong></figcaption></figure><h4>app-user-1 secret storing in Secrets Manager</h4><figure><img alt="Store secret of app-user-1" src="https://cdn-images-1.medium.com/max/1024/1*til_Kbf60Av8CnuqqWfO1Q.png" /><figcaption>Store secret of <strong>app-user-1</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bjE3y3WlfDwmMuEfH08ZwA.png" /><figcaption>Store secret of <strong>app-user-1</strong></figcaption></figure><figure><img alt="Store secret of app-user-1" src="https://cdn-images-1.medium.com/max/1024/1*m83yMUfWG-twOF8-Ep-mZg.png" /><figcaption>Store secret of <strong>app-user-1</strong></figcaption></figure><figure><img alt="Store secret of app-user-1" src="https://cdn-images-1.medium.com/max/1024/1*jOQz85T3T14W5f7Yt-E1pw.png" /><figcaption>Store secret of <strong>app-user-1</strong></figcaption></figure><h4>app-user-2 secret storing in Secrets Manager</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x1qnCO12VUAdJVS6YhT2pQ.png" /><figcaption>Store secret of <strong>app-user-2</strong></figcaption></figure><figure><img alt="Store secret of app-user-2" src="https://cdn-images-1.medium.com/max/1024/1*51MxQMvujwtA9ZPMC1bSgg.png" /><figcaption>Store secret of <strong>app-user-2</strong></figcaption></figure><figure><img alt="Store secret of app-user-2" src="https://cdn-images-1.medium.com/max/1024/1*SUojpeukLODk6u7_ZaWcuw.png" /><figcaption>Store secret of <strong>app-user-2</strong></figcaption></figure><figure><img alt="Store secret of app-user-2" src="https://cdn-images-1.medium.com/max/1024/1*z_3QrGpCU1Tff6f3_dBsdw.png" /><figcaption>Store secret of <strong>app-user-2</strong></figcaption></figure><figure><img alt="app-user-1 and app-user-2 secrets created" src="https://cdn-images-1.medium.com/max/1024/1*Ccp8h1fmQ8SsgA5ZsDZ2RA.png" /><figcaption><strong>app-user-1 </strong>and<strong> app-user-2 </strong>secrets<strong> </strong>created</figcaption></figure><h4>3: Create <strong>Amazon SNS (Simple Notification Service)</strong></h4><p>Go to SNS:<strong> </strong><br>-Create a Topic<br>-Create a Subscription</p><figure><img alt="Got to SNS" src="https://cdn-images-1.medium.com/max/1024/1*LYW0NcDEw4ITxp6ltfYrXQ.png" /><figcaption>Got to <strong>SNS</strong></figcaption></figure><figure><img alt="Create SNS Topic" src="https://cdn-images-1.medium.com/max/1024/1*f35phhqA9DQ0vEfkcmDEzQ.png" /><figcaption>Create <strong>SNS Topic</strong></figcaption></figure><figure><img alt="Create SNS Topic" src="https://cdn-images-1.medium.com/max/1024/1*xeNxb9sVBc5KXdNNnStl4g.png" /><figcaption>Create <strong>SNS Topic</strong></figcaption></figure><figure><img alt="Create SNS Topic" src="https://cdn-images-1.medium.com/max/1024/1*H2z_UXaFQoT4fZS9FzpkCw.png" /><figcaption>Create <strong>SNS Topic</strong></figcaption></figure><figure><img alt="Create SNS Subscription" src="https://cdn-images-1.medium.com/max/1024/1*xinYprCp6lJzKe01cJmcNA.png" /><figcaption>Create <strong>SNS Subscription</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7vyq0UxXL11vg6R55IPAcA.png" /><figcaption>Create <strong>SNS Subscription</strong></figcaption></figure><figure><img alt="Confirm subscription in your email" src="https://cdn-images-1.medium.com/max/1024/1*2yJV5uwyErnWHb2HloUY2Q.png" /><figcaption><strong>Confirm subscription</strong> in your email</figcaption></figure><h4>5: Create a Lambda Function</h4><p>Before creating the Lambda Function, go to IAM and create a Lambda Service Role, which the Lambda Function will Assume giving Access to IAM, Secrets Manager and SNS.<br><strong>-</strong>IAMFullAccess<br>-SecretsManagerReadWrite<br>-AmazonSNSFullAccess</p><p><strong>Create a Lambda Function IAM Role (AssumeRole)</strong></p><figure><img alt="Go to IAM and create a role for the Lambda Function" src="https://cdn-images-1.medium.com/max/800/1*paHT9jGOCuaqHRroZxAFCg.png" /><figcaption>Go to <strong>IAM</strong> and create a role for the <strong>Lambda Function</strong></figcaption></figure><figure><img alt="Create a Lambda Function IAM Role" src="https://cdn-images-1.medium.com/max/1024/1*bXYVOV6WqHFlASfzuUP5_w.png" /><figcaption>Create a <strong>Lambda Function IAM Role</strong></figcaption></figure><figure><img alt="Create a Lambda Function IAM Role" src="https://cdn-images-1.medium.com/max/1024/1*g6OVUm5oC1iXcm9dsupeEA.png" /><figcaption>Create a <strong>Lambda Function IAM Role</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dl2QTfNyV54JDeVssRpQOA.png" /><figcaption>Create a <strong>Lambda Function IAM Role</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*baPV6BzzD5xOtefR7DC66w.png" /><figcaption>Create a <strong>Lambda Function IAM Role</strong></figcaption></figure><figure><img alt="Lambda Function IAM Role created" src="https://cdn-images-1.medium.com/max/1024/1*mPFXgaayNwSKJzaAOTYrUA.png" /><figcaption><strong>Lambda Function IAM Role </strong>created</figcaption></figure><p><strong>Create the Lambda Function</strong></p><figure><img alt="Go to Lambda" src="https://cdn-images-1.medium.com/max/1024/1*kTSjsDdRk-Uv8CeVEiBQYQ.png" /><figcaption>Go to <strong>Lambda</strong></figcaption></figure><figure><img alt="Create a Function" src="https://cdn-images-1.medium.com/max/1024/1*zjsBbJRxJr0nMku7uPeMxQ.png" /><figcaption>Create <strong>Lambda</strong> <strong>Function</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2-3dhwFEDssseU39p5bRZw.png" /><figcaption>Create <strong>Lambda</strong> <strong>Function</strong></figcaption></figure><figure><img alt="Set Timeout to 1minute" src="https://cdn-images-1.medium.com/max/1024/1*WQtNJ058QI7YvXm5k6ZBPg.png" /><figcaption>Set <strong>Timeout</strong> to <strong>1minute</strong></figcaption></figure><figure><img alt="Set Timeout to 1minute" src="https://cdn-images-1.medium.com/max/1024/1*0BSKwLA-PSrN2x2e1FDQsQ.png" /><figcaption>Set <strong>Timeout</strong> to <strong>1minute</strong></figcaption></figure><figure><img alt="Set Environment variables" src="https://cdn-images-1.medium.com/max/1024/1*K9gj-1aDjvCiwuThFY3xCw.png" /><figcaption>Set <strong>Environment variables</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XLpecYooPVccKQkCRgttqw.png" /><figcaption>Set <strong>Environment variables</strong></figcaption></figure><pre>import json<br>import boto3<br>import os<br>from datetime import datetime<br>from botocore.exceptions import ClientError<br><br># Initialize AWS clients<br>iam = boto3.client(&#39;iam&#39;)<br>secretsmanager = boto3.client(&#39;secretsmanager&#39;)<br>sns = boto3.client(&#39;sns&#39;)<br><br>def lambda_handler(event, context):<br>    &quot;&quot;&quot;<br>    Enhanced AWS Access Key Rotation Lambda with instant deletion and notifications<br>    &quot;&quot;&quot;<br>    <br>    # Configuration<br>    vsecret = os.getenv(&#39;secrets&#39;)<br>    sns_topic_arn = os.getenv(&#39;SNS_TOPIC_ARN&#39;)  # SNS topic for notifications<br>    delete_inactive_keys = os.getenv(&#39;DELETE_INACTIVE_KEYS&#39;, &#39;true&#39;).lower() == &#39;true&#39;<br>    <br>    if not vsecret:<br>        error_msg = &quot;Environment variable &#39;secrets&#39; is not set&quot;<br>        send_notification(sns_topic_arn, &quot;Key Rotation Error&quot;, error_msg, &quot;ERROR&quot;)<br>        return {&quot;statusCode&quot;: 400, &quot;body&quot;: error_msg}<br>    <br>    secret_list = vsecret.split(&#39;;&#39;)<br>    results = []<br>    <br>    for secret in secret_list:<br>        try:<br>            result = process_user_key_rotation(secret, delete_inactive_keys)<br>            results.append(result)<br>            <br>            # Send success notification for each user<br>            send_notification(<br>                sns_topic_arn,<br>                f&quot;Key Rotation Success - {result[&#39;username&#39;]}&quot;,<br>                format_success_message(result),<br>                &quot;SUCCESS&quot;<br>            )<br>            <br>        except Exception as e:<br>            error_result = {<br>                &quot;secret&quot;: secret,<br>                &quot;username&quot;: &quot;unknown&quot;,<br>                &quot;status&quot;: &quot;error&quot;,<br>                &quot;error&quot;: str(e),<br>                &quot;timestamp&quot;: datetime.utcnow().isoformat()<br>            }<br>            results.append(error_result)<br>            <br>            # Send error notification<br>            send_notification(<br>                sns_topic_arn,<br>                f&quot;Key Rotation Failed - {secret}&quot;,<br>                f&quot;Error processing secret {secret}: {str(e)}&quot;,<br>                &quot;ERROR&quot;<br>            )<br>            <br>            print(f&quot;ERROR: Failed to process secret {secret}: {str(e)}&quot;)<br>    <br>    # Send summary notification<br>    send_summary_notification(sns_topic_arn, results)<br>    <br>    return {<br>        &quot;statusCode&quot;: 200,<br>        &quot;body&quot;: json.dumps({<br>            &quot;message&quot;: &quot;Key rotation process completed&quot;,<br>            &quot;results&quot;: results,<br>            &quot;total_processed&quot;: len(results),<br>            &quot;successful&quot;: len([r for r in results if r[&quot;status&quot;] == &quot;success&quot;]),<br>            &quot;failed&quot;: len([r for r in results if r[&quot;status&quot;] == &quot;error&quot;])<br>        })<br>    }<br><br>def process_user_key_rotation(secret, delete_inactive_keys=True):<br>    &quot;&quot;&quot;<br>    Process key rotation for a single user<br>    &quot;&quot;&quot;<br>    timestamp = datetime.utcnow().isoformat()<br>    <br>    # Get secret details<br>    get_secret = secretsmanager.get_secret_value(SecretId=secret)<br>    secret_details = json.loads(get_secret[&#39;SecretString&#39;])<br>    username = secret_details[&#39;UserName&#39;]<br>    <br>    print(f&quot;Processing key rotation for user: {username}&quot;)<br>    <br>    # Get existing keys<br>    key_response = iam.list_access_keys(UserName=username)<br>    existing_keys = key_response[&#39;AccessKeyMetadata&#39;]<br>    <br>    inactive_keys = []<br>    active_keys = []<br>    <br>    # Categorize existing keys<br>    for key in existing_keys:<br>        if key[&#39;Status&#39;] == &#39;Active&#39;:<br>            active_keys.append(key)<br>        else:<br>            inactive_keys.append(key)<br>    <br>    print(f&quot;Found {len(active_keys)} active keys and {len(inactive_keys)} inactive keys for {username}&quot;)<br>    <br>    # Inactivate existing active keys<br>    inactivated_keys = []<br>    for key in active_keys:<br>        try:<br>            iam.update_access_key(<br>                AccessKeyId=key[&#39;AccessKeyId&#39;], <br>                Status=&#39;Inactive&#39;,<br>                UserName=username<br>            )<br>            inactivated_keys.append(key[&#39;AccessKeyId&#39;])<br>            print(f&quot;Inactivated key {key[&#39;AccessKeyId&#39;]} for user {username}&quot;)<br>        except ClientError as e:<br>            print(f&quot;Warning: Failed to inactivate key {key[&#39;AccessKeyId&#39;]}: {str(e)}&quot;)<br>    <br>    # Delete inactive keys if enabled<br>    deleted_keys = []<br>    if delete_inactive_keys:<br>        # Include previously inactive keys and newly inactivated keys<br>        all_inactive_keys = inactive_keys + [{&quot;AccessKeyId&quot;: kid, &quot;UserName&quot;: username} for kid in inactivated_keys]<br>        <br>        for key in all_inactive_keys:<br>            try:<br>                iam.delete_access_key(<br>                    AccessKeyId=key[&#39;AccessKeyId&#39;],<br>                    UserName=username<br>                )<br>                deleted_keys.append(key[&#39;AccessKeyId&#39;])<br>                print(f&quot;Deleted inactive key {key[&#39;AccessKeyId&#39;]} for user {username}&quot;)<br>            except ClientError as e:<br>                print(f&quot;Warning: Failed to delete key {key[&#39;AccessKeyId&#39;]}: {str(e)}&quot;)<br>    <br>    # Create new access key<br>    create_response = iam.create_access_key(UserName=username)<br>    new_key_id = create_response[&#39;AccessKey&#39;][&#39;AccessKeyId&#39;]<br>    print(f&quot;Created new access key {new_key_id} for user {username}&quot;)<br>    <br>    # Update secret with new credentials<br>    new_secret = {<br>        &quot;UserName&quot;: create_response[&#39;AccessKey&#39;][&#39;UserName&#39;],<br>        &quot;AccessKeyId&quot;: create_response[&#39;AccessKey&#39;][&#39;AccessKeyId&#39;],<br>        &quot;SecretAccessKey&quot;: create_response[&#39;AccessKey&#39;][&#39;SecretAccessKey&#39;]<br>    }<br>    <br>    secretsmanager.update_secret(<br>        SecretId=secret,<br>        SecretString=json.dumps(new_secret)<br>    )<br>    print(f&quot;Updated secret {secret} with new credentials for user {username}&quot;)<br>    <br>    return {<br>        &quot;secret&quot;: secret,<br>        &quot;username&quot;: username,<br>        &quot;status&quot;: &quot;success&quot;,<br>        &quot;new_key_id&quot;: new_key_id,<br>        &quot;inactivated_keys&quot;: inactivated_keys,<br>        &quot;deleted_keys&quot;: deleted_keys,<br>        &quot;timestamp&quot;: timestamp<br>    }<br><br>def send_notification(sns_topic_arn, subject, message, notification_type):<br>    &quot;&quot;&quot;<br>    Send notification via SNS<br>    &quot;&quot;&quot;<br>    if not sns_topic_arn:<br>        print(&quot;SNS_TOPIC_ARN not configured, skipping notification&quot;)<br>        return<br>    <br>    try:<br>        # Add timestamp and type to message<br>        formatted_message = f&quot;[{notification_type}] {datetime.utcnow().strftime(&#39;%Y-%m-%d %H:%M:%S&#39;)} UTC\n\n{message}&quot;<br>        <br>        sns.publish(<br>            TopicArn=sns_topic_arn,<br>            Subject=subject,<br>            Message=formatted_message<br>        )<br>        print(f&quot;Sent {notification_type} notification: {subject}&quot;)<br>    except ClientError as e:<br>        print(f&quot;Failed to send notification: {str(e)}&quot;)<br><br>def format_success_message(result):<br>    &quot;&quot;&quot;<br>    Format success message for notifications<br>    &quot;&quot;&quot;<br>    message = f&quot;Key rotation completed successfully for user: {result[&#39;username&#39;]}\n\n&quot;<br>    message += f&quot;Secret: {result[&#39;secret&#39;]}\n&quot;<br>    message += f&quot;New Access Key ID: {result[&#39;new_key_id&#39;]}\n&quot;<br>    <br>    if result[&#39;inactivated_keys&#39;]:<br>        message += f&quot;Inactivated Keys: {&#39;, &#39;.join(result[&#39;inactivated_keys&#39;])}\n&quot;<br>    <br>    if result[&#39;deleted_keys&#39;]:<br>        message += f&quot;Deleted Keys: {&#39;, &#39;.join(result[&#39;deleted_keys&#39;])}\n&quot;<br>    <br>    message += f&quot;Timestamp: {result[&#39;timestamp&#39;]}&quot;<br>    <br>    return message<br><br>def send_summary_notification(sns_topic_arn, results):<br>    &quot;&quot;&quot;<br>    Send summary notification with overall results<br>    &quot;&quot;&quot;<br>    if not sns_topic_arn:<br>        return<br>    <br>    successful = [r for r in results if r[&quot;status&quot;] == &quot;success&quot;]<br>    failed = [r for r in results if r[&quot;status&quot;] == &quot;error&quot;]<br>    <br>    summary = f&quot;AWS Access Key Rotation Summary\n\n&quot;<br>    summary += f&quot;Total Processed: {len(results)}\n&quot;<br>    summary += f&quot;Successful: {len(successful)}\n&quot;<br>    summary += f&quot;Failed: {len(failed)}\n\n&quot;<br>    <br>    if successful:<br>        summary += &quot;Successfully processed users:\n&quot;<br>        for result in successful:<br>            summary += f&quot;  • {result[&#39;username&#39;]} (Secret: {result[&#39;secret&#39;]})\n&quot;<br>        summary += &quot;\n&quot;<br>    <br>    if failed:<br>        summary += &quot;Failed processing:\n&quot;<br>        for result in failed:<br>            summary += f&quot;  • {result[&#39;secret&#39;]}: {result[&#39;error&#39;]}\n&quot;<br>    <br>    send_notification(<br>        sns_topic_arn,<br>        f&quot;Key Rotation Summary - {len(successful)} Success, {len(failed)} Failed&quot;,<br>        summary,<br>        &quot;SUMMARY&quot;<br>    )</pre><figure><img alt="Copy, Paste and Deploy the code above" src="https://cdn-images-1.medium.com/max/1024/1*LhqQgPyqpRe0Iu4K98-PIA.png" /><figcaption><strong>Copy</strong>, <strong>Paste </strong>and <strong>Deploy </strong>the code above</figcaption></figure><h4>5: Create a CloudWatch EventBridge Rule</h4><p>This EventBridge (formerly CloudWatch Events) schedule is configured to invoke an AWS Lambda function that handles the rotation of IAM (Identity and Access Management) access keys. The schedule automates this essential security task, ensuring it runs consistently every weekday (Monday through Friday) at 9:00 AM local time.</p><p><strong>Schedule Configuration:</strong></p><p><strong>Event Source:</strong> Amazon EventBridge serves as the trigger source.<br><strong>Trigger Frequency:</strong> Scheduled to execute every weekday (Monday through Friday).<br><strong>Execution Time:</strong> Set to run precisely at 9:00 AM local time.</p><figure><img alt="Create a CloudWatch EventBridge Rule" src="https://cdn-images-1.medium.com/max/1024/1*KDxn4M82FzvGeVY9lrk4lg.png" /><figcaption>Create a <strong>CloudWatch EventBridge Rule</strong></figcaption></figure><figure><img alt="Create a CloudWatch EventBridge Rule" src="https://cdn-images-1.medium.com/max/1024/1*oGFi5lWnBrc7tb64_sxK_A.png" /><figcaption>Create a <strong>CloudWatch EventBridge Rule</strong></figcaption></figure><figure><img alt="Create a CloudWatch EventBridge Rule" src="https://cdn-images-1.medium.com/max/1024/1*Gq6phhJpHa9VeVyPg-RCog.png" /><figcaption>Create a <strong>CloudWatch EventBridge Rule</strong></figcaption></figure><figure><img alt="Create a CloudWatch EventBridge Rule" src="https://cdn-images-1.medium.com/max/1024/1*QLnepTaWPXxwg3PbdPr1hg.png" /><figcaption>Create a <strong>CloudWatch EventBridge Rule</strong></figcaption></figure><figure><img alt="Create a CloudWatch EventBridge Rule" src="https://cdn-images-1.medium.com/max/1024/1*ZL9DPa1dmcfNmjXIft7rcQ.png" /><figcaption>Create a <strong>CloudWatch EventBridge Rule</strong></figcaption></figure><figure><img alt="Create a CloudWatch EventBridge Rule" src="https://cdn-images-1.medium.com/max/1024/1*xyb9eFcLF9iJgp6ziNDWEw.png" /><figcaption>Create a <strong>CloudWatch EventBridge Rule</strong></figcaption></figure><figure><img alt="Create a CloudWatch EventBridge Rule" src="https://cdn-images-1.medium.com/max/1024/1*ozUUQtBawcdMdO82ofcAVA.png" /><figcaption>Create a <strong>CloudWatch EventBridge Rule</strong></figcaption></figure><figure><img alt="Create a CloudWatch EventBridge Rule" src="https://cdn-images-1.medium.com/max/1024/1*Wy_oLWg1ymZfcsUcENTj2w.png" /><figcaption>Create a <strong>CloudWatch EventBridge Rule</strong></figcaption></figure><h4>6: <strong>Test the Project for Rotation Lambda Function</strong></h4><p>Since our cron expression is configured to trigger the Auto Rotation Function only on weekdays (Monday to Friday) at 9:00 AM local time, we won’t be able to observe its execution in real-time unless we wait until the next scheduled run. Therefore, to validate and test the solution in the meantime, we’ll manually invoke the functions.</p><figure><img alt="Go to the Lambda Function created" src="https://cdn-images-1.medium.com/max/1024/1*5b89M1Pg_jwDsdOg3i9h-w.png" /><figcaption>Go to the <strong>Lambda Function</strong> created</figcaption></figure><figure><img alt="Create a Test Event" src="https://cdn-images-1.medium.com/max/1024/1*YRCoKwjdBp2rUybgZG5WAg.png" /><figcaption>Create a <strong>Test Event</strong></figcaption></figure><figure><img alt="Test the Lambda Function" src="https://cdn-images-1.medium.com/max/1024/1*pkjXVsH9XLOZ1e87dXwMbw.png" /><figcaption>Test the<strong> Lambda Function</strong></figcaption></figure><figure><img alt="Successful Rotation of Access Keys" src="https://cdn-images-1.medium.com/max/1024/1*VB6BQnhKurJiQG9LS6XCsg.png" /><figcaption>Successful <strong>Rotation </strong>of<strong> Access Keys</strong></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e4335232114" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>