<?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"><channel><title><![CDATA[Seun's Blog]]></title><description><![CDATA[I’m Seun, a Cloud Security Engineer. I share DevSecOps tips, cloud security insights, and career advice. I am passionate about mentoring, teaching, and making t]]></description><link>https://blog.oluwaseunmusa.com</link><generator>RSS for Node</generator><lastBuildDate>Fri, 24 Apr 2026 20:30:05 GMT</lastBuildDate><atom:link href="https://blog.oluwaseunmusa.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Reflections on AWS re:Invent 2025: Challenges, Highlights, and Personal Achievements]]></title><description><![CDATA[It’s been a few weeks since the completion of Amazon Web Services (AWS) re:Invent. I wanted to share some thoughts. Unfortunately, Amazon Web Services (AWS) re: Invent 2025 didn’t go as planned. Before the event, I had planned all my sessions, the ke...]]></description><link>https://blog.oluwaseunmusa.com/reflections-on-aws-reinvent-2025-challenges-highlights-and-personal-achievements</link><guid isPermaLink="true">https://blog.oluwaseunmusa.com/reflections-on-aws-reinvent-2025-challenges-highlights-and-personal-achievements</guid><dc:creator><![CDATA[Seun Musa]]></dc:creator><pubDate>Fri, 16 Jan 2026 18:12:54 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1768587533656/570fed4f-b9c1-48a9-b3a4-ae76efc01c1a.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>It’s been a few weeks since the completion of <a target="_blank" href="https://www.linkedin.com/feed/#"><strong>Amazon Web Services (AWS)</strong></a> <strong>re:Invent</strong>. I wanted to share some thoughts. Unfortunately, <a target="_blank" href="https://www.linkedin.com/company/amazon-web-services/"><strong>Amazon Web Services (AWS)</strong></a> <strong>re: Invent</strong> 2025 didn’t go as planned. Before the event, I had planned all my sessions, the keynote, the vendor parties, and the sightseeing that I wanted to accomplish.</p>
<p>To make things easier, I rented a car to move flexibly between sessions at Venetian, MGM, and Mandalay. However, I couldn't do everything because I caught the flu 🤒 and had to spend half of the first two days in the hotel. Despite this, I managed to finish the <code>re:Invent 5K</code> run with <a target="_blank" href="https://www.linkedin.com/in/chibuikenwachukwu/"><strong>Chibuike Nwachukwu</strong></a> and set a personal record of 30:20, which is below my usual PRs on <a target="_blank" href="https://www.linkedin.com/company/strava-inc./"><strong>Strava</strong></a> .</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1768586854994/d6d643e5-2512-4b23-86e5-c503e283f3da.jpeg" alt class="image--center mx-auto" /></p>
<p>Now, enough about me. We all know <a target="_blank" href="https://www.linkedin.com/company/amazon-web-services/"><strong>Amazon Web Services (AWS)</strong></a> re:Invent is the largest tech conference in the world, drawing over 60,000 attendees from all around the globe. It's my favorite tech conference ever.</p>
<p>Even though I spent half of the first two days recovering from the flu, it was amazing reconnecting with familiar faces who have become like family, as well as meeting new professionals.</p>
<p><strong>Here are some of my top security highlights from the event that I thought you might find interesting:</strong></p>
<p><strong>Security Hub:</strong></p>
<p>The new <a target="_blank" href="https://www.linkedin.com/feed/#"><strong>Amazon Web Services (AWS)</strong></a> Security Hub features were announced in June 2025 during the AWS re:Inforce conference, which is a standalone security conference hosted by AWS. They introduced a refined UI, provided near real-time risk analytics and trends, unified enablement, and automated correlation that transforms security signals into actionable insights. Additionally, they added a combination of findings in Security Hub with third-party integrations like Jira, ServiceNow, and many more. Although it was in preview since June, it is now generally available with near real-time analytics and risk prioritization. I was genuinely happy with how Security Hub has improved. <a target="_blank" href="https://aws.amazon.com/blogs/aws/aws-security-hub-now-generally-available-with-near-real-time-analytics-and-risk-prioritization/"><strong>FAQs</strong></a></p>
<p><strong>AWS login</strong></p>
<p>The new <code>aws login</code> command lets you obtain credentials for a CLI (or other applications) by using your browser session. Previously, this feature was available for AWS Identity Center users through "aws sso login" or various open-source tools, but it wasn't available for all types of account access scenarios.</p>
<p>Make sure you upgrade AWS CLI to AWS CLI v2 before you can enjoy the feature. Here is a <a target="_blank" href="https://aws.amazon.com/blogs/security/simplified-developer-access-to-aws-with-aws-login/"><strong>link</strong></a> to more information on <code>aws login</code></p>
<p><strong>AWS Organizations: Direct Account Transfer between organizations:</strong></p>
<p><a target="_blank" href="https://www.linkedin.com/feed/#"><strong>Amazon Web Services (AWS)</strong></a> Organizations now allows direct account transfers between organizations, eliminating the need for accounts to operate as standalone accounts during the transfer process. This streamlines account transfers and ensures continued access to governance features and consolidated billing benefits. Get more information <a target="_blank" href="https://aws.amazon.com/about-aws/whats-new/2025/11/aws-organizations-direct-account-transfers/"><strong>here</strong></a>.</p>
<p><strong>Amazon GuardDuty now includes Extended Threat Detection for EC2 and ECS.</strong></p>
<p>Amazon GuardDuty Extended Threat Detection now includes new attack sequence findings for Amazon EC2 instances and ECS tasks, enhancing visibility and detection of multistage attacks across virtual machine and container environments using AI and ML. For more information on how it works, check <a target="_blank" href="https://aws.amazon.com/blogs/aws/amazon-guardduty-adds-extended-threat-detection-for-amazon-ec2-and-amazon-ecs/"><strong>here</strong></a>.</p>
<p><strong>Amazon S3 Block Public Access now supports organization-level enforcement.</strong></p>
<p>All cloud security experts know the criticality of Data Perimeters and how insecure, overpermissive S3 buckets can lead to security incidents and many other issues. Amazon S3 Block Public Access (BPA) now offers organization-level control through AWS Organizations, allowing centralized enforcement of S3 public access settings across all accounts. This feature is available in the AWS Organizations console and AWS CLI/SDK, with no additional charges.</p>
<p>As an AB alumni advisor, it was such a pleasure to see my mentees and help them navigate the conference <a target="_blank" href="https://www.linkedin.com/in/banshaj?miniProfileUrn=urn%3Ali%3Afs_miniProfile%3AACoAACdZvZsBuKduMZovNfeL7QTVhmfZHYtngfk"><strong>Banshaj Paudel</strong></a> , <a target="_blank" href="https://www.linkedin.com/in/omshree-butani?miniProfileUrn=urn%3Ali%3Afs_miniProfile%3AACoAADUZ2hwBreWcqZqCi983fnuksq1R51ezTz8"><strong>Omshree Butani</strong></a> , <a target="_blank" href="https://www.linkedin.com/in/ACoAAFBsDWsBe2FlkMnUNaPTJwXlAqyVhDhNLAY?miniProfileUrn=urn%3Ali%3Afs_miniProfile%3AACoAAFBsDWsBe2FlkMnUNaPTJwXlAqyVhDhNLAY"><strong>Taihei Mizuno</strong></a> , <a target="_blank" href="https://www.linkedin.com/in/yeonghun-185815337?miniProfileUrn=urn%3Ali%3Afs_miniProfile%3AACoAAFSpA7UBDZHXtUQn-Mpbc0L77kdl4cJ2PIc"><strong>최영훈</strong></a> , <a target="_blank" href="https://www.linkedin.com/in/kashishdatta?miniProfileUrn=urn%3Ali%3Afs_miniProfile%3AACoAADCCVnYBo18JTcw2gvedqexJ1YV0oKyDtKg"><strong>Kashish Datta, CSPO®</strong></a> , <a target="_blank" href="https://www.linkedin.com/in/ryankert01?miniProfileUrn=urn%3Ali%3Afs_miniProfile%3AACoAADTuX5sBf0p5ytkk15j8IySkp6uGYZ8evlk"><strong>Hsien-Cheng Huang</strong></a> thank you for being such an awesome group.</p>
<p>It was wonderful spending quality time with these kind-hearted individuals: <a target="_blank" href="https://www.linkedin.com/in/damienjburks/"><strong>Damien Burks</strong></a> <a target="_blank" href="https://www.linkedin.com/in/kosisochukwu-akaeze-a4853a1a7/"><strong>Kosisochukwu Akaeze</strong></a> , <a target="_blank" href="https://www.linkedin.com/in/mariana-arce-aguilar-5b8051192/"><strong>Mariana Arce Aguilar</strong></a> , <a target="_blank" href="https://www.linkedin.com/in/aminat-usman-5169b6173/"><strong>Aminat Usman</strong></a> , <a target="_blank" href="https://www.linkedin.com/in/chukwudiuzoma/"><strong>Chukwudi Uzoma</strong></a> , <a target="_blank" href="https://www.linkedin.com/in/oloruntobiawoderu/"><strong>Oloruntobi Awoderu</strong></a> , <a target="_blank" href="https://www.linkedin.com/in/victory-eze-20925a56/"><strong>Victory Eze</strong></a> , <a target="_blank" href="https://www.linkedin.com/in/rkmj-181334162/"><strong>Rhea Katherine Minta-Jacobs</strong></a> , <a target="_blank" href="https://www.linkedin.com/in/oyebisijemil/"><strong>Jemil Oyebisi</strong></a> , <a target="_blank" href="https://www.linkedin.com/in/semaan/"><strong>Viktoria Semaan</strong></a> , <a target="_blank" href="https://www.linkedin.com/in/olushola-oladipupo/"><strong>Olushola Oladipupo</strong></a> , <a target="_blank" href="https://www.linkedin.com/in/melodyegwuchukwu/"><strong>Melody Egwuchukwu</strong></a> , <a target="_blank" href="https://www.linkedin.com/in/charity-kemei/"><strong>Charity Kemei</strong></a> , <a target="_blank" href="https://www.linkedin.com/in/sharanyasisodia/"><strong>Sharanya Sisodia</strong></a> , <a target="_blank" href="https://www.linkedin.com/in/yinka-aluko/"><strong>Yinka Aluko</strong></a> , <a target="_blank" href="https://www.linkedin.com/in/nawarkarpranjal/"><strong>Pranjal Nawarkar</strong></a> , <a target="_blank" href="https://www.linkedin.com/in/natashakoli/"><strong>Natasha Moses</strong></a> , <a target="_blank" href="https://www.linkedin.com/in/elyas-syed-i/"><strong>Elyas Syed</strong></a> , <a target="_blank" href="https://www.linkedin.com/in/manasse-n-b51504210/"><strong>Manasse Ngendahimana</strong></a> , <a target="_blank" href="https://www.linkedin.com/in/endah-bongo-awah/"><strong>Endah Bongo-Awah</strong></a> , <a target="_blank" href="https://www.linkedin.com/in/elijahibidayo/"><strong>Elijah Ibidayo</strong></a> , <a target="_blank" href="https://www.linkedin.com/in/davin-latiker-mba-8017251a6/"><strong>Davin Latiker, MBA</strong></a></p>
<p>A big thank you to <a target="_blank" href="https://www.linkedin.com/in/andoniaf?miniProfileUrn=urn%3Ali%3Afs_miniProfile%3AACoAABwXlLYBgDIyRoRnbxBxhI0QvJbOMMm9SW0"><strong>🖖 Andoni Alonso Fernández</strong></a> for the <a target="_blank" href="https://www.linkedin.com/company/prowler-security/"><strong>Prowler</strong></a> t-shirt and the unicorn sticker. Also, thank you to <a target="_blank" href="https://www.linkedin.com/in/ACoAAA2M11IBkIw2cx3PyArx3YWrO3EbigC2IgA?miniProfileUrn=urn%3Ali%3Afs_miniProfile%3AACoAAA2M11IBkIw2cx3PyArx3YWrO3EbigC2IgA"><strong>Norma Stevens</strong></a> and <a target="_blank" href="https://www.linkedin.com/in/marisoljenkins?miniProfileUrn=urn%3Ali%3Afs_miniProfile%3AACoAAApL4i8BG8EwfuTaiBZFNJeU7QYEzcmHsY4"><strong>Marisol Jenkins</strong></a> for all your wonderful work for the AB Community. I’m feeling much better now.</p>
]]></content:encoded></item><item><title><![CDATA[Sha1-Hulud 2.0: The Second Coming]]></title><description><![CDATA[It’s 4:27 AM. Your phone is buzzing. Again. Then it’s an email from your CNAPP tooling vendor titled Ongoing Supply Chain Campaign, referencing Shai-Hulud, Oh no! Shai-Hulud is back, and additional dependencies, such as Zapier, ENS Domains, PostHog, ...]]></description><link>https://blog.oluwaseunmusa.com/sha1-hulud-20-the-second-coming</link><guid isPermaLink="true">https://blog.oluwaseunmusa.com/sha1-hulud-20-the-second-coming</guid><category><![CDATA[cloud security]]></category><category><![CDATA[threat intelligence]]></category><category><![CDATA[threat detection]]></category><category><![CDATA[DevSecOps]]></category><dc:creator><![CDATA[Seun Musa]]></dc:creator><pubDate>Tue, 25 Nov 2025 07:41:53 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1764056348901/c55d5ef1-8fc3-4523-aea2-9be9aff4cce8.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>It’s <strong>4:27 AM</strong>. Your phone is buzzing. Again. Then it’s an email from your CNAPP tooling vendor titled <strong><em>Ongoing Supply Chain Campaign, referencing Shai-Hulud</em>,</strong> Oh no! Shai-Hulud is back, and additional dependencies, such as <strong><em>Zapier</em></strong>, <strong><em>ENS Domains</em></strong>, <strong><em>PostHog</em></strong>, and <strong><em>Postman,</em></strong> have been trojanized. This is the first self-replicating worm that compromised <strong><em>npm</em></strong> packages with cloud token-stealing malware.</p>
<p><strong><em>Back story:</em> Shai-Hulud</strong> was first discovered in <strong>September 2025</strong>, following a software supply chain attack in the open-source community. This created Panic for everyone, but it was eventually contained and mitigated. You can read more on it from the <strong><em>Wiz research team</em></strong> articles <a target="_blank" href="https://www.wiz.io/blog/shai-hulud-npm-supply-chain-attack">here</a>.</p>
<p>Indeed, the resurgence of <strong><em>Sha1-Hulud 2.0: The Second Coming</em></strong> has caused widespread concern within the technology industry today, <strong><em>November 24th, 2025</em></strong>. This worm has triggered a wave of fear and worry across the tech space. This is to the point that Snyk, Wiz, and many other vendors were proactive in quickly addressing the malware to prevent widespread impact for their affected customers.</p>
<p>This outbreak has already surpassed the initial <strong><em>Shai-Hulud situation</em></strong>, with over 800 npm packages having been trojanized and numerous GitHub repositories impacted. At the time of writing this technical wiki, the blast radius has crossed over 25k, and more. The malware has rapidly spread among various maintainers, including those mentioned above ( <strong><em>Zapier</em></strong>, <strong><em>ENS Domains</em></strong>, <strong><em>PostHog</em></strong>, and <strong><em>Postman)</em></strong></p>
<p>While doing more research, I found a research article by the KOI team explaining that the resurgent is so aggressive that it has a fallback mechanism, meaning when the malware fails to authenticate or establish persistence, then it attempts to destroy the victim’s entire home directly. The malware deletes every writable file owned by the current user under the home directory. Also, these fallback mechanisms are triggered if it cannot authenticate to GitHub, it cannot create a GitHub repository, it cannot fetch a GitHub token, or it cannot find an NPM token.</p>
<p>While researching, I found a KOI team article explaining the aggressive resurgent’s fallback mechanism. If the malware fails to authenticate or persist, it attempts to destroy the victim’s home directory by deleting all writable files under the user’s home directory. These mechanisms are triggered if authentication to GitHub, repository creation, token fetching, or NPM token finding fails.</p>
<h4 id="heading-recommendation-action">Recommendation Action</h4>
<ul>
<li><p>Snyk has updated its reporting filter, so you can search for the new campaign, such as Shai-Hulud.</p>
</li>
<li><p>Wiz shared actionable recommendations even for non-affected organizations:</p>
<ul>
<li><p><strong>Monitor</strong> - Track any new package installations from affected namespaces like AsyncAPI, PostHog, Browserbase, and Postman.</p>
</li>
<li><p><strong>Review CI/CD</strong> - Verify build pipelines have restricted outbound network access.</p>
</li>
<li><p><strong>Rotate credentials</strong> - Implement regular rotation for npm and GitHub tokens</p>
</li>
<li><p><strong>Restrict lifecycle scripts</strong> - Consider blocking preinstall/postinstall execution in production.</p>
</li>
</ul>
</li>
</ul>
<p>Check out this comprehensive research paper from Wiz on S<strong><em>hai-Hulud 2.0: The second coming</em></strong>. It has detailed research <a target="_blank" href="https://www.wiz.io/blog/shai-hulud-2-0-ongoing-supply-chain-attack">information</a>.</p>
]]></content:encoded></item><item><title><![CDATA[Understanding cloud security flaws, their importance, and prevention methods.]]></title><description><![CDATA[We all know that since the advent of the COVID-19 pandemic, businesses are embracing cloud computing for its scalability, flexibility, and cost savings. However, these advantages come with a growing attack surface, and cloud security flaws have becom...]]></description><link>https://blog.oluwaseunmusa.com/understanding-cloud-security-flaws-their-importance-and-prevention-methods</link><guid isPermaLink="true">https://blog.oluwaseunmusa.com/understanding-cloud-security-flaws-their-importance-and-prevention-methods</guid><category><![CDATA[cloud security]]></category><category><![CDATA[threat intelligence]]></category><category><![CDATA[containers]]></category><category><![CDATA[AWS]]></category><category><![CDATA[Azure]]></category><category><![CDATA[GCP]]></category><dc:creator><![CDATA[Seun Musa]]></dc:creator><pubDate>Thu, 07 Aug 2025 07:14:51 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1754550754536/17c89b8d-557e-455c-8cf5-0507862043d8.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>We all know that since the advent of the COVID-19 pandemic, businesses are embracing cloud computing for its scalability, flexibility, and cost savings. However, these advantages come with a growing attack surface, and <strong>cloud security flaws</strong> have become one of the leading causes of modern data breaches.</p>
<p>In this blog, I just want to break down what cloud security flaws are, the most common examples with real-world impact, and then share practical tips for how to address cloud security flaws in your environment.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1754072921440/ef29b402-d633-4f81-8b6b-0f0818bcf034.webp" alt class="image--center mx-auto" /></p>
<h3 id="heading-what-are-cloud-security-flaws">What are Cloud Security Flaws?</h3>
<p><strong>Cloud security flaws</strong> are vulnerabilities, misconfigurations, anomalies, or weaknesses in how your cloud resources are configured, deployed, accessed, or managed. These flaws can allow attackers to:</p>
<ul>
<li><p>Steal data (due to improper or over-permissive configuration )</p>
</li>
<li><p>Hijack cloud resources</p>
</li>
<li><p>Move laterally across environments</p>
</li>
<li><p>Disrupt services or plant malware</p>
</li>
</ul>
<blockquote>
<p>Cloud flaws often result from poor governance, lack of awareness, or overly complex cloud architectures.</p>
</blockquote>
<h3 id="heading-top-5-common-cloud-security-flaws">Top 5 Common Cloud Security Flaws</h3>
<p>The most common cloud security flaws include:</p>
<ol>
<li><p>Misconfigurations</p>
</li>
<li><p>Weak Identity and Access Management (IAM)</p>
</li>
<li><p>Insecure APIs</p>
</li>
<li><p>Unpatched Vulnerabilities</p>
</li>
<li><p>Lack of Data Protection</p>
</li>
</ol>
<h3 id="heading-1-misconfigurations">1. <strong>Misconfigurations</strong></h3>
<p>Cloud misconfigurations create vulnerabilities that attackers can exploit to gain unauthorized access to sensitive data and critical application services. Most misconfigured cloud services are</p>
<ul>
<li><p>Publicly accessible S3 buckets or Azure Blob Storage</p>
</li>
<li><p>Open security groups (e.g., port 22 open to 0.0.0.0/0)</p>
</li>
<li><p>Disabled logging or monitoring tools</p>
</li>
</ul>
<h4 id="heading-example"><strong>Example</strong></h4>
<p>In May 2022, Pegasus Airlines experienced a <strong>data breach</strong> due to a misconfigured AWS S3 bucket. The breach exposed 6.5 terabytes of sensitive data, including personal information and operational details of flight crew members. Because the bucket was publicly accessible, attackers could download confidential files. This incident highlights S3 configurations needed: server-side encryption for S3 buckets, strict bucket policies to prevent public access, and AWS Config or a third-party tool like <a target="_blank" href="http://wiz.io">Wiz</a> implementation to detect and fix misconfigurations in real time.</p>
<h3 id="heading-2-weak-identity-and-access-management-iam">2. Weak Identity and Access Management (IAM)</h3>
<p>IAM defines and controls who can access what in your cloud environment. However, when improperly configured, it can lead to unauthorized access to your cloud resources, posing a significant risk.k The following are flaws in IAM:</p>
<ul>
<li><p>Overly permissive roles (e.g., <code>AdministratorAccess</code> for every user)</p>
</li>
<li><p>Lack of MFA (Multi-Factor Authentication)</p>
</li>
<li><p>Use of long-lived access keys</p>
</li>
<li><p>Lack of principles of least privilege and Role-Based Access Control (RBAC)</p>
</li>
<li><p>Unused IAM users/service accounts</p>
</li>
<li><p>Non-centralized IAM configuration</p>
</li>
</ul>
<h4 id="heading-example-1"><strong>Example</strong></h4>
<p>In 2017, Equifax experienced one of the largest data breaches in history. Hackers found and exploited a known vulnerability in an open-source software module used in Equifax's web applications. They gained unauthorized access to important customer records, affecting about 147 million people.</p>
<p>Weaknesses and inconsistencies in IAM controls contributed to the breach, enabling hackers to impersonate legitimate users and move undetected through Equifax's systems for months. This resulted in substantial financial and regulatory consequences for Equifax.</p>
<h3 id="heading-3-insecure-apis">3. Insecure APIs</h3>
<p>Application programming interfaces (APIs) are essential for accessing cloud resources, but insecure APIs can be attacked by hackers, leading to data leaks, account takeovers, and service disruptions. The following are flaws in APIs:</p>
<ul>
<li><p>Lack of authentication or rate limiting</p>
</li>
<li><p>Insecure input handling (e.g., no validation or sanitization)</p>
</li>
<li><p>Overexposed API endpoints</p>
</li>
<li><p>Externalized API that is not behind a firewall</p>
</li>
</ul>
<p><strong>Example</strong></p>
<p><strong>April 2021: Experian API Flaw</strong><br />Security researcher Bill Demirkapi discovered a vulnerability in an Experian API used by third-party lending sites to assess creditworthiness. The API required minimal personal information (e.g., name, address, birthdate) to authenticate requests and returned detailed personal data, making it a classic case of a leaky API with weak authentication controls.</p>
<h3 id="heading-4-unpatched-vulnerabilities">4. Unpatched Vulnerabilities</h3>
<p>Cloud workloads (VMs, containers, apps) may run outdated software:</p>
<ul>
<li><p><strong>Operating system vulnerabilities</strong>, such as using outdated AMI images</p>
</li>
<li><p><strong>Container misconfigurations</strong>, like running containers with root privileges</p>
</li>
<li><p><strong>Unpatched third-party dependencies</strong> that introduce known security flaws</p>
</li>
<li><p><strong>Container escape vulnerabilities</strong> which allow attackers to break out of the container and access the host system.</p>
</li>
</ul>
<h3 id="heading-5-lack-of-data-protection">5. Lack of Data Protection</h3>
<p>Lastly, Cloud environments have large volumes of data from customer data and application data; additionally, some of this data is sensitive data such as PII(Personally Identifiable Information. If all of these are not properly configured, then this flaw becomes a prime target for threat actors.</p>
<p>Common flaws that could cause data breaches :</p>
<ul>
<li><p>Unencrypted data at rest or in transit</p>
</li>
<li><p>No access controls on backups</p>
</li>
<li><p>Weak key management</p>
</li>
</ul>
<h3 id="heading-how-to-protect-your-cloud-environment">How to Protect Your Cloud Environment</h3>
<p>Below are some best practices and practical ways to prevent cloud security flaws. Most environments have a Cloud Security Program with robust capabilities, including governance, processes, and best practices for cloud security. Be sure to check with all cloud vendors for their Well-Architected Frameworks, which guide the creation of secure resources to prevent security flaws.</p>
<ul>
<li><p>Implement the Principle of Least Privilege.</p>
</li>
<li><p>Provide users and services only with the access they require. </p>
</li>
</ul>
<ul>
<li><p>Use CSPM (Cloud Security Posture Management) tools like:</p>
<ul>
<li><p>AWS Security Hub</p>
</li>
<li><p>Wiz</p>
</li>
<li><p>Upwind</p>
</li>
</ul>
</li>
<li><p>Ensure data encryption in transit and at rest.</p>
</li>
<li><p>Use cloud-native KMS (Key Management Services) to manage keys.</p>
</li>
<li><p>Use hardened base images.</p>
</li>
<li><p>Keep OS, containers, and dependencies up to date.</p>
</li>
<li><p>Regularly train devs and engineers on secure cloud practices.</p>
</li>
<li><p>Build security into your CI/CD pipelines (DevSecOps).</p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[How to Implement CloudWatch Log Retention: A Best Practice for Security and Cost Management]]></title><description><![CDATA[Imagine you're in a security assessment with your Compliance Team or an External Assessor, and they point out that your AWS environment CloudWatch Log doesn't have a retention period set.
CloudWatch Logs retention is an important part of AWS security...]]></description><link>https://blog.oluwaseunmusa.com/how-to-implement-cloudwatch-log-retention-a-best-practice-for-security-and-cost-management</link><guid isPermaLink="true">https://blog.oluwaseunmusa.com/how-to-implement-cloudwatch-log-retention-a-best-practice-for-security-and-cost-management</guid><category><![CDATA[security-and-compliance]]></category><category><![CDATA[cloud security]]></category><category><![CDATA[#CloudWatch]]></category><category><![CDATA[AWS CloudWatch]]></category><category><![CDATA[aws lambda]]></category><dc:creator><![CDATA[Seun Musa]]></dc:creator><pubDate>Sat, 19 Jul 2025 05:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1752953865345/355c5cb4-7fdb-45cc-8b97-a09f92e38b0a.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Imagine you're in a security assessment with your Compliance Team or an External Assessor, and they point out that your AWS environment CloudWatch Log doesn't have a retention period set.</p>
<p>CloudWatch Logs retention is an important part of AWS security compliance that is often missed. When log groups are set to "Never Expire," organizations face several major risks:</p>
<h3 id="heading-the-risks-of-unlimited-log-retention"><strong>The Risks of Unlimited Log Retention</strong></h3>
<ol>
<li><p><strong>Uncontrolled Cost Growth</strong>: With no expiration policy, logs accumulate indefinitely, leading to steadily increasing storage costs that can spiral out of control over time.</p>
</li>
<li><p><strong>Audit Non-Compliance</strong>: Many compliance frameworks require specific data retention periods, neither too short nor too long. Indefinite retention may violate regulatory requirements for data deletion.</p>
</li>
<li><p><strong>SIEM Data Volume Overload</strong>: Security Information and Event Management systems can become overwhelmed with excessive historical data, potentially degrading performance and increasing processing costs.</p>
</li>
</ol>
<p>Now that we understand the risks of logs that never expire and how they violate compliance, there is usually a recommendation after the assessment on how to fix this according to best practices.</p>
<p>It's important to know that different environments have different framework controls and security best practices. Some environments might have a <strong>Record Retention Policy set to (Calendar Year +1), while others might be more than 90 days. In this lab, we will set it to 365 days of retention.</strong></p>
<h3 id="heading-implementing-automated-log-retention"><strong>Implementing Automated Log Retention</strong></h3>
<p>Let's explore how to implement proper CloudWatch Log retention on existing logs using both AWS CLI and a Python boto3 Lambda function.</p>
<p><strong>Option 1: AWS CLI Remediation</strong></p>
<p>You can use the AWS CLI to identify log groups without retention policies and set appropriate retention periods:</p>
<pre><code class="lang-bash">aws logs describe-log-groups \
  --query <span class="hljs-string">"logGroups[?retentionInDays==null].logGroupName"</span> \
  --output text
</code></pre>
<p>If you have <code>JQ</code> installed on your local machine, you can use the AWS CLI query below instead of the one above.</p>
<pre><code class="lang-bash">aws logs describe-log-groups --query <span class="hljs-string">"logGroups[?retentionInDays==null].logGroupName"</span> | jq
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752950487885/cdb11797-1b78-4536-a7a4-c260a69356bb.png" alt class="image--center mx-auto" /></p>
<p>The screenshots above show a list of CloudWatch Logs without a 365-day retention period. Now, we will select one of the logs and run the next CLI command to change it to 365 days.</p>
<pre><code class="lang-bash">aws logs put-retention-policy   --log-group-name <span class="hljs-string">"/aws-athena/Spark_primary"</span>   --retention-in-days 365
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752950835630/d31a6fdf-667a-49b5-82ec-614354e14117.png" alt class="image--center mx-auto" /></p>
<p><strong>Option 2: Lambda Function with Boto3</strong></p>
<p>For a more automated approach, we can create a Lambda function that runs on a schedule. In this lab, we'll use a simple execution Lambda, but I will provide a GitHub repository with the automated method.</p>
<p>Go to your AWS console, navigate to Lambda functions, and create a function using the Python runtime. Set your IAM role with permissions for CloudWatch. Paste the code below into your Lambda function and execute it.</p>
<pre><code class="lang-python"><span class="hljs-keyword">import</span> boto3

<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">lambda_handler</span>(<span class="hljs-params">event, context</span>):</span>
    client = boto3.client(<span class="hljs-string">'logs'</span>)
    paginator = client.get_paginator(<span class="hljs-string">'describe_log_groups'</span>)

    <span class="hljs-keyword">for</span> page <span class="hljs-keyword">in</span> paginator.paginate():
        <span class="hljs-keyword">for</span> lg <span class="hljs-keyword">in</span> page[<span class="hljs-string">'logGroups'</span>]:
            <span class="hljs-keyword">if</span> lg.get(<span class="hljs-string">'retentionInDays'</span>) <span class="hljs-keyword">is</span> <span class="hljs-literal">None</span>:
                client.put_retention_policy(
                    logGroupName=lg[<span class="hljs-string">'logGroupName'</span>],
                    retentionInDays=<span class="hljs-number">365</span>
                )
                print(<span class="hljs-string">f" Set 365-day retention for <span class="hljs-subst">{lg[<span class="hljs-string">'logGroupName'</span>]}</span>"</span>)
</code></pre>
<p>Below is the output from the executed Lambda function:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752951898181/6e2b62ef-fdc9-466a-ab2b-ef65555033c5.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752951824709/a0bf93e0-4dd3-4974-a8ef-4f49139cd5cf.png" alt class="image--center mx-auto" /></p>
<p><strong>Conclusion</strong></p>
<p>Implementing proper CloudWatch Log retention is a crucial security and cost management practice. By setting appropriate retention periods:</p>
<ul>
<li><p>You gain predictable and controlled costs</p>
</li>
<li><p>You maintain compliance with audit requirements</p>
</li>
<li><p>You prevent SIEM systems from being overwhelmed with excessive data</p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[AWS re:Inforce 2025 – Everything starts with security]]></title><description><![CDATA[Another incredible year at AWS re:Inforce, and the 2025 edition in Philadelphia did not disappoint.
Over the three days, I gained a deeper understanding of AWS security, reconnected with familiar faces who have become like family, and welcomed new pr...]]></description><link>https://blog.oluwaseunmusa.com/aws-reinforce-2025-everything-starts-with-security</link><guid isPermaLink="true">https://blog.oluwaseunmusa.com/aws-reinforce-2025-everything-starts-with-security</guid><category><![CDATA[AWS]]></category><category><![CDATA[#awsreinforce]]></category><category><![CDATA[Security]]></category><dc:creator><![CDATA[Seun Musa]]></dc:creator><pubDate>Mon, 30 Jun 2025 05:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1752293625708/e2217429-ee9a-492e-b97f-3ea4bbf30af6.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Another incredible year at AWS re:Inforce, and the 2025 edition in Philadelphia did not disappoint.</p>
<p>Over the three days, I gained a deeper understanding of AWS security, reconnected with familiar faces who have become like family, and welcomed new professionals into the alumni circle.</p>
<p>Grateful for the hallway conversations, fireside sessions, and insights from AWS security leaders <a target="_blank" href="https://www.linkedin.com/in/ACoAAACOmkcBiw7UY6x4A9yLR8d07Uxcq30MVH0"><strong>Mark Young</strong></a> &amp; <a target="_blank" href="https://www.linkedin.com/in/ACoAAAESPYYBkfogSzkJMcOGg-BSIevEgm4AJHA"><strong>Chris Haggard</strong></a> — your guidance continues to shape the way we build securely</p>
<p>Highlights worth mentioning:<br />ACM for external servers — AWS Certificate Manager now supports exportable public SSL/TLS certificates for secure TLS traffic termination across AWS, hybrid, and multi-cloud workloads.</p>
<p>Security Hub — AWS Security Hub has been enhanced to transform security signals into actionable insights. The new enhancement provides comprehensive visibility across your cloud environment, including the ability to create Jira/ServiceNow tickets for identified findings while reducing the complexity of managing resource misconfiguration.</p>
<p>Beyond the sessions, it was great spending quality time with old friends <a target="_blank" href="https://www.linkedin.com/in/ACoAABLpG0IB7bDtRRt_QWJO4ngi1OXhPXMH6q4"><strong>Shammah Una</strong></a>, <a target="_blank" href="https://www.linkedin.com/in/ACoAABa5ypcB4Y1Or8J1O1Kj-w3cgG7_7PBav6Y"><strong>Adebayo BALOGUN, CISSP, FIP</strong></a>, <a target="_blank" href="https://www.linkedin.com/in/ACoAAClCwmIBMoeRecmS2SABxTKZ22GG59FPEtY"><strong>Aminat Usman</strong></a>, <a target="_blank" href="https://www.linkedin.com/in/ACoAACeJ7cMBvQoClEZwiIvcsyAZOYyojqvTypA"><strong>Kudakwashe Manhondo</strong></a>, <a target="_blank" href="https://www.linkedin.com/in/ACoAACsL5MUBnAdeIm7qKfniqilZ9OFDqvr7UPs"><strong>Blessing Idio</strong></a>, <a target="_blank" href="https://www.linkedin.com/in/ACoAACxkLKkBQJe6QRj2-qdjiuiEzBr3Qn3udyU"><strong>Charity Kemei</strong></a>, <a target="_blank" href="https://www.linkedin.com/in/ACoAACQ49ecBVh5md2c1aBEmM5z4mivNquy0O50"><strong>Sharanya Sisodia</strong></a>, and meeting brilliant new minds <a target="_blank" href="https://www.linkedin.com/in/ACoAACvZ_0AB6sPR9WkAI294yI2exvwE0b9etuo"><strong>Shakirah Odedina</strong></a>, <a target="_blank" href="https://www.linkedin.com/in/ACoAABaNhvEBGXQb9EjirwXWyMah_3xUWqpo1u8"><strong>Kamorudeen Amuda</strong></a>,</p>
<p><a target="_blank" href="https://www.linkedin.com/in/ACoAAAAtyzkBYOVTywiMYpAQWSB4MCpsEmc9lEA"><strong>Cole O'Shaughnessy</strong></a> from <a target="_blank" href="https://www.linkedin.com/company/chainguard-dev/"><strong>Chainguard</strong></a>, thank you so much for taking the time to connect - it was great meeting you</p>
<p>Lastly, we explored a bit of Philadelphia’s charm together. This wasn't the first time, and it certainly won't be the last. I'm always proud to be part of a community that's passionate about building securely and supporting each other.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752293886198/1047b71d-7476-430e-badd-6563b1c2b9bb.jpeg" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752293949643/12a4b653-5243-4c6d-90fe-d432753e0108.jpeg" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752294027542/563a12ed-8451-497a-874a-ffa36b1a6ff9.jpeg" alt class="image--center mx-auto" /></p>
<p><a target="_blank" href="https://www.linkedin.com/search/results/all/?keywords=%23aws&amp;origin=HASH_TAG_FROM_FEED"><strong>hashtag#AWS</strong></a> <a target="_blank" href="https://www.linkedin.com/search/results/all/?keywords=%23reinforce2025&amp;origin=HASH_TAG_FROM_FEED"><strong>hashtag#reInforce2025</strong></a> <a target="_blank" href="https://www.linkedin.com/search/results/all/?keywords=%23cloudsecurity&amp;origin=HASH_TAG_FROM_FEED"><strong>hashtag#CloudSecurity</strong></a> <a target="_blank" href="https://www.linkedin.com/search/results/all/?keywords=%23cybersecurity&amp;origin=HASH_TAG_FROM_FEED"><strong>hashtag#CyberSecurity</strong></a> <a target="_blank" href="https://www.linkedin.com/search/results/all/?keywords=%23awscommunitybuilder&amp;origin=HASH_TAG_FROM_FEED"><strong>hashtag#AWSCommunityBuilder</strong></a></p>
]]></content:encoded></item><item><title><![CDATA[Behind the Click: How SSO Works]]></title><description><![CDATA[Have you ever wondered how Single Sign-On (SSO) works behind the scenes?

We all use Single Sign-On (SSO) daily, logging into tools like Slack, Microsoft EntraID, Wiz, AWS, or Google Workspace without thinking twice.
It's smooth, fast, and saves us f...]]></description><link>https://blog.oluwaseunmusa.com/behind-the-click-how-sso-works</link><guid isPermaLink="true">https://blog.oluwaseunmusa.com/behind-the-click-how-sso-works</guid><category><![CDATA[IAM]]></category><category><![CDATA[Security]]></category><category><![CDATA[SSO - Single Sign-On]]></category><dc:creator><![CDATA[Seun Musa]]></dc:creator><pubDate>Mon, 21 Apr 2025 05:00:00 GMT</pubDate><content:encoded><![CDATA[<h3 id="heading-have-you-ever-wondered-how-single-sign-on-sso-works-behind-the-scenes"><strong>Have you ever wondered how Single Sign-On (SSO) works behind the scenes?</strong></h3>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1754584249337/f3c3f5be-c84c-4701-8484-7043254a22b2.png" alt class="image--center mx-auto" /></p>
<p>We all use <a target="_blank" href="https://www.gartner.com/peer-community/oneminuteinsights/omi-single-sign-advantages-disadvantages-2ru"><strong>Single Sign-On (SSO)</strong></a> daily, logging into tools like <a target="_blank" href="https://slack.com/"><strong>Slack</strong></a>, <a target="_blank" href="https://www.microsoft.com/en-us/security/business/identity-access/microsoft-entra-id"><strong>Microsoft EntraID</strong></a>, <a target="_blank" href="https://www.wiz.io/"><strong>Wiz</strong></a>, <a target="_blank" href="https://aws.amazon.com/"><strong>AWS</strong></a>, or Google Workspace without thinking twice.</p>
<p>It's smooth, fast, and saves us from juggling passwords. But have you ever paused to wonder <em>what’s happening behind the scenes</em> when you click <strong>Login with SSO</strong>?</p>
<hr />
<p>Here’s an image and the breakdown of how it works under the hood:</p>
<p><img src="https://media.licdn.com/dms/image/v2/D4E12AQH0_YLySYYG8g/article-inline_image-shrink_1500_2232/B4EZZY3vMjHUCE-/0/1745247730453?e=1759968000&amp;v=beta&amp;t=dqkvu3jVa0qgTa9sZ23haL0RBOI52xr0ltnm4ER-wLM" alt /></p>
<ol>
<li><p><strong>User Access</strong> – You try to access an SSO-enabled app.</p>
</li>
<li><p><strong>Redirect</strong> – The app says, “I don’t handle logins—go check with the Identity Provider (IdP).”</p>
</li>
<li><p><strong>Authentication</strong> – You’re sent to the IdP (like Okta, Azure AD, or Google), where you log in with your credentials.</p>
</li>
<li><p><strong>Token Issuance</strong> – The IdP verifies your identity and issues a secure token.</p>
</li>
<li><p><strong>Token Validation</strong> – The app checks the token to make sure it’s legit.</p>
</li>
<li><p><strong>Seamless Access</strong> – You’re in! And now, you can access other apps without logging in again.</p>
</li>
</ol>
<p>This token-based handshake behind the scenes is what makes SSO feel so seamless. It’s a simple flow, but it packs a lot of security and user experience value.</p>
<p>Many engineers and professionals interact with SSO all the time, but forget the mechanics powering it. Understanding it helps when troubleshooting access issues, evaluating identity providers, or securing enterprise applications.</p>
<hr />
<p>Security doesn’t have to be complex. Sometimes, it’s just a clean flow done right.</p>
]]></content:encoded></item><item><title><![CDATA[Choosing the Right AWS Region for Your Application]]></title><description><![CDATA[When launching a new application, one of the most critical decisions is selecting the right AWS region. Should it be in North America, South America, Europe, or Asia? The answer? It depends!
Here are some key factors to consider when making this deci...]]></description><link>https://blog.oluwaseunmusa.com/choosing-the-right-aws-region-for-your-application</link><guid isPermaLink="true">https://blog.oluwaseunmusa.com/choosing-the-right-aws-region-for-your-application</guid><category><![CDATA[AWS]]></category><category><![CDATA[Devops]]></category><category><![CDATA[Applications]]></category><dc:creator><![CDATA[Seun Musa]]></dc:creator><pubDate>Thu, 30 Jan 2025 05:37:28 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1752465657680/ab906c1e-5972-4148-8a8c-73b92233e305.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1738215346436/10ecf77b-f7fc-4aa8-9356-397ba5745985.png" alt class="image--center mx-auto" /></p>
<p>When launching a new application, one of the most critical decisions is selecting the right AWS region. Should it be in North America, South America, Europe, or Asia? The answer? It depends!</p>
<p><strong>Here are some key factors to consider when making this decision:</strong></p>
<p><strong>🔒 Compliance and Governance</strong></p>
<p>Governments often require data to stay within the country or region where the application is deployed. Ensuring compliance with local regulations is a must when choosing a region.</p>
<p><strong>⏱️ Latency</strong></p>
<p>If your users are primarily located in a specific geographic area, deploying your application in a region close to them can significantly reduce latency and improve user experience. For example, if your customers are in North America, hosting your app there makes the most sense.</p>
<p><strong>🛠️ Resource Availability</strong></p>
<p>Not all AWS services are available in every region. If your application relies on a specific service that’s only available in certain regions, then that will heavily influence your decision 💁</p>
<p><strong>💰 Pricing</strong></p>
<p>Costs can vary significantly between regions. Pricing for some services may differ, so it’s worth evaluating which region offers the best balance of cost and performance for your needs.</p>
<p>Choosing the right region is a decision that can impact your application’s performance, compliance, and cost. So, what factors have influenced your region selection in the past?</p>
<p>Let’s discuss it! 👇</p>
<p><strong>#AWS</strong> <strong>#TechStrategy</strong> <strong>#ApplicationDevelopment</strong> <strong>#CloudInfrastructure</strong> 🌍 🚀</p>
]]></content:encoded></item><item><title><![CDATA[Achieving Cloud Success: A Guide to AWS CAF and Well-Architected Framework]]></title><description><![CDATA[As cloud technologies continue to evolve, the role of cloud security engineers becomes increasingly pivotal. One of the most effective ways to ensure scalable, secure, and efficient cloud adoption is by grounding your work efforts in the principles o...]]></description><link>https://blog.oluwaseunmusa.com/securing-the-cloud-mastering-aws-caf-and-well-architected-framework-for-success</link><guid isPermaLink="true">https://blog.oluwaseunmusa.com/securing-the-cloud-mastering-aws-caf-and-well-architected-framework-for-success</guid><category><![CDATA[AWS]]></category><category><![CDATA[architecture]]></category><category><![CDATA[AWS Well-Architected]]></category><dc:creator><![CDATA[Seun Musa]]></dc:creator><pubDate>Sat, 25 Jan 2025 06:00:00 GMT</pubDate><content:encoded><![CDATA[<p>As cloud technologies continue to evolve, the role of cloud security engineers becomes increasingly pivotal. One of the most effective ways to ensure scalable, secure, and efficient cloud adoption is by grounding your work efforts in the principles of the <strong>AWS Cloud Adoption Framework (CAF)</strong> and the <strong>AWS Well-Architected Framework (WAF)</strong>. These frameworks provide a structured approach to planning, deploying, and operating cloud workloads.</p>
<p>The AWS CAF is designed to guide organizations in their cloud journey. It consists of six perspectives: <strong>Business, People, Governance, Platform, Security, and Operations.</strong></p>
<p>While AWS WAF provides five key pillars: <strong>Operational Excellence, Security, Reliability, Performance Efficiency</strong>, and <strong>Cost Optimization</strong>, cloud security engineers should focus on the Security pillar as the foundation for designing and reviewing workloads.</p>
<h2 id="heading-practical-key-steps-for-engineers-to-leverage-caf-amp-waf">Practical Key Steps For Engineers to Leverage CAF &amp; WAF:</h2>
<ol>
<li><p><strong>Start with AWS CAF</strong>: Use the Security and Governance perspectives to define organizational policies, guardrails, and compliance strategies. This ensures alignment with business objectives from the outset.</p>
</li>
<li><p><strong>Apply AWS WAF Principles</strong>: Focus on the Security pillar to implement IAM best practices, automate detection with GuardDuty and CloudTrail, encrypt data using KMS, and prepare incident response playbooks.</p>
</li>
<li><p><strong>Collaborate and Review</strong>: Conduct regular <strong>Well-Architected Reviews</strong> to identify gaps and iteratively improve workloads. Work with cross-functional teams to ensure alignment across governance and operations.</p>
</li>
</ol>
<hr />
<p>By building efforts on these frameworks, you can create secure, scalable, and cost-efficient cloud environments while aligning with organizational goals. Start small, iterate, and keep security at the core of your cloud journey.</p>
<ul>
<li><p>CAF- FAQs <a target="_blank" href="https://aws.amazon.com/cloud-adoption-framework/">https://aws.amazon.com/cloud-adoption-framework/</a></p>
</li>
<li><p>Well-Architected Framework FAQs</p>
</li>
<li><p>AWS Well-Architected Labs <a target="_blank" href="https://wellarchitectedlabs.com/">https://wellarchitectedlabs.com/</a></p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Deploying to AWS using GitHub Actions via OpenID Connect [OIDC]]]></title><description><![CDATA[In today's fast-paced development landscape, implementing secure, automated CI/CD pipelines is crucial for efficient software delivery. Traditionally, deploying to AWS using GitHub Actions required creating an IAM user (service account) with key cred...]]></description><link>https://blog.oluwaseunmusa.com/deploying-to-aws-using-github-actions-via-openid-connect-oidc</link><guid isPermaLink="true">https://blog.oluwaseunmusa.com/deploying-to-aws-using-github-actions-via-openid-connect-oidc</guid><category><![CDATA[AWS]]></category><category><![CDATA[GitHub]]></category><category><![CDATA[OIDC]]></category><dc:creator><![CDATA[Seun Musa]]></dc:creator><pubDate>Thu, 02 Jan 2025 08:50:23 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1734465809709/02abc891-0a57-4c34-8e60-068806b36ac5.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In today's fast-paced development landscape, implementing secure, automated CI/CD pipelines is crucial for efficient software delivery. Traditionally, deploying to AWS using <a target="_blank" href="https://github.com/features/actions">GitHub Actions</a> required creating an IAM user (service account) with key credentials (Access Key and Secret Key).</p>
<p>These credentials would then be stored in GitHub as secrets to enable the Actions workflow. However, this approach posed significant security risks. The stored secrets could remain valid indefinitely, often exceeding the recommended <code>90-day</code> rotation period for credentials.</p>
<p>If compromised, especially if the credentials have elevated permissions, then malicious actors could exploit them to deploy unauthorized resources like crypto miners or access sensitive data, leading to severe security breaches.</p>
<p>With the integration of <code>GitHub Actions and OpenID Connect (OIDC)</code>, Deploying resources to AWS will become more secure. This publication walks you through deploying an S3 bucket to AWS using GitHub Actions and OIDC.</p>
<h3 id="heading-what-is-openid-connect-oidc">What Is OpenID Connect (OIDC)?</h3>
<p>OIDC allows GitHub Actions to securely authenticate with AWS without relying on long-lived access keys. Instead, it leverages temporary credentials granted via an identity provider (IdP) trust relationship between AWS and GitHub.</p>
<p>This approach:</p>
<ul>
<li><p>Reduces the risk of credential exposure.</p>
</li>
<li><p>Simplifies authentication management.</p>
</li>
<li><p>Facilitates least-privilege access with short-lived tokens.</p>
</li>
</ul>
<h3 id="heading-prerequisites">Prerequisites:</h3>
<ol>
<li><p>An AWS account with IAM permission to create an S3 Bucket.</p>
</li>
<li><p>Basic understanding of creating an AWS IAM role and its functionality.</p>
</li>
<li><p>Basic understanding of GitHub Actions.</p>
</li>
<li><p>Basic Understanding of OIDC OpenID Connector</p>
</li>
<li><p>GitHub repository for your project. Here is my <a target="_blank" href="https://github.com/superissy/github-actions-aws-oidc-deploy.git">Repository</a> for this project</p>
</li>
</ol>
<p><strong>NOTE:</strong></p>
<p><em>I’ve outlined two methods for configuring the OIDC Identity provider and connecting it to an IAM role in AWS. The first involves using the Management console, while the second involves utilizing a CloudFormation template provided in the subsequent steps below.</em></p>
<h3 id="heading-step-1-configure-aws-oidc-identity-provider">Step 1: Configure AWS OIDC Identity Provider</h3>
<h3 id="heading-create-an-identity-provider-in-aws"><strong>Create an Identity Provider in AWS:</strong></h3>
<ul>
<li><p>Log in to <strong>AWS Management Console</strong>:</p>
</li>
<li><p>Go to the <strong>IAM Service</strong>:</p>
</li>
<li><p>Select <strong>Identity Providers</strong>:</p>
</li>
<li><p>Click on <strong>Add Provider</strong></p>
</li>
<li><p>Choose <strong>OpenID Connect,</strong> then add <strong>Provider Url</strong> and <strong>Audience.</strong> By default, this information is the same for everyone, as GitHub/AWS provides it.</p>
</li>
</ul>
<p>For the <strong>provider</strong> <strong>URL</strong>: Use <code>https://token.actions.githubusercontent.com</code></p>
<p>For the <strong>Audience</strong> Use <code>sts.amazonaws.com</code></p>
<ul>
<li>FAQs - To add the GitHub OIDC provider to IAM, see the <a target="_blank" href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_oidc.html">AWS documentation</a> &amp; <a target="_blank" href="https://github.com/aws-actions/configure-aws-credentials">official</a> <a target="_blank" href="https://github.com/aws-actions/configure-aws-credentials">GitHub page action</a></li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735807401518/3c858cbb-5e24-409c-abf0-9bb2ebd71a60.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735807451393/44a5bf75-3d7a-44e1-af5c-b4531c81448a.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-create-an-iam-role-for-github-actions">Create an IAM Role for GitHub Actions:</h3>
<p>Now that we've set up the Identity provider, we’ll create an IAM role with the specific permissions we want our GitHub action to have. We’ll also specify the name of the GitHub repository to which the role will grant permission. Finally, we’ll link the Identity provider to the IAM role we created.</p>
<ul>
<li><p>Click to open the created identity provider</p>
</li>
<li><p>Click on the <strong>Assign Role</strong> button at the right corner of the screen</p>
</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735807521193/44befed4-23e7-4abe-9e49-9e497fc7bd44.png" alt class="image--center mx-auto" /></p>
<p>Choose <strong>Create a new role</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735807560088/39de3f7a-35c0-43d9-a622-17d2bb128bd5.png" alt class="image--center mx-auto" /></p>
<p>Select <strong>“Web identity”</strong> as the trusted entity type. Then, fill out the form fields:</p>
<p>- <strong>GitHub organization</strong></p>
<p><strong>- GitHub repository</strong></p>
<p>Click on <strong>NEXT</strong>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735807612864/e9f1bc17-709e-4da9-9e83-0b4ddbf4292a.png" alt class="image--center mx-auto" /></p>
<ul>
<li><p><strong>Attached the required permission. In our use case, we will attach S3 full access permission.</strong></p>
</li>
<li><p>Click on <strong>NEXT</strong>.</p>
</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735807642790/b9568ceb-421f-4395-b242-c9c297ad3690.png" alt class="image--center mx-auto" /></p>
<p><strong>Provide the role name and description, and then click on Create role.</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735807661492/7d8e510a-c5de-477f-ab67-5bbc3e64c6c7.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-using-cloudformation-for-configuring-oidc-identity-provider-in-aws">Using CloudFormation for Configuring OIDC Identity Provider in AWS</h2>
<ul>
<li><p><strong>Open the CloudFormation Template File in this</strong> <a target="_blank" href="https://github.com/superissy/github-actions-aws-oidc-deploy/blob/main/cfn/github-oidc-cloudformation.yaml"><strong>Repository</strong></a></p>
</li>
<li><p>Access the CloudFormation YAML file</p>
</li>
</ul>
<p><strong>Update Role Name</strong></p>
<ul>
<li><p>Look for the section defining the IAM role in the template</p>
</li>
<li><p>Modify the <code>RoleName</code> property to match the desired role name.</p>
</li>
</ul>
<pre><code class="lang-plaintext">Parameters:
  RoleName:
    Type: String
    Default: "YourUpdatedRoleName"
    Description: Name of the IAM role to be created
</code></pre>
<p><strong>Update Repository Name</strong></p>
<ul>
<li><p>Locate the parameter, resource, or property specifying the repository name.</p>
</li>
<li><p>Replace it with the appropriate repository name.</p>
</li>
</ul>
<pre><code class="lang-plaintext"># GitHub repository name in format owner/repo
  RepoName:
    Type: String
    Default: "YourUpdatedRepoName"
    Description: GitHub repository name in format owner/repo
</code></pre>
<p><strong>Save the Changes</strong></p>
<ul>
<li>Save the modified CloudFormation file locally.</li>
</ul>
<p><strong>Deploy the CloudFormation Template</strong></p>
<ul>
<li>Use the AWS Management Console, AWS CLI, or AWS SDKs to deploy the template.</li>
</ul>
<p><em>You have successfully deployed your CloudFormation stack! Everything is now set up, and your resources should be ready to use.</em></p>
<h3 id="heading-step-2-write-your-github-actions-workflow">Step 2: Write Your GitHub Actions Workflow</h3>
<p>In the repository below, you’ll find the GitHub action workflow and a README file that explains how the GitHub action works and how to create your own.</p>
<ul>
<li><p><a target="_blank" href="https://github.com/superissy/github-actions-aws-oidc-deploy/blob/main/.github/workflows/s3_bucket_oidc.yaml">Workflow</a></p>
</li>
<li><p><a target="_blank" href="https://github.com/superissy/github-actions-aws-oidc-deploy/blob/main/README.md">ReadMe</a></p>
</li>
</ul>
<h3 id="heading-workflow-code">Workflow Code</h3>
<p>Create a new file <code>.github/workflows/s3-deploy.yml</code> in your repository with the following content:</p>
<pre><code class="lang-plaintext">name: Deploy AWS S3 Bucket with OIDC authentication

on:
  push

env:
  AWS_REGION : "us-east-1"
  AWS_ROLE_TO_ASSUME: "arn:aws:iam::{YOUR-AWS-ACCOUNT-ID}:role/github-actions-s3-oidc-role-dev"
  REPOSITORY_NAME: "${{ github.actor }}"
  BUCKET_NAME: "${{ github.actor }}-oidc-test-bucket"

permissions:
      id-token: write   # This is required for requesting the JWT
      contents: read    # This is required for actions/checkout

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Configure AWS credentials
        uses: aws-actions/configure-aws-credentials@v4
        with:
          role-to-assume: ${{ env.AWS_ROLE_TO_ASSUME }}
          role-session-name: s3-deploy-action-session
          aws-region: ${{ env.AWS_REGION }}

      - name: Check if bucket exists
        id: check_bucket
        run: |
          if aws s3api head-bucket --bucket ${{ env.BUCKET_NAME }} 2&gt;/dev/null; then
            echo "Bucket ${{ env.BUCKET_NAME }} already exists"
            echo "bucket_exists=true" &gt;&gt; $GITHUB_OUTPUT
          else
            echo "Bucket ${{ env.BUCKET_NAME }} does not exist"
            echo "bucket_exists=false" &gt;&gt; $GITHUB_OUTPUT
          fi

      - name: Create S3 bucket
        if: steps.check_bucket.outputs.bucket_exists == 'false'
        run: |
          aws s3api create-bucket \
            --bucket ${{ env.BUCKET_NAME }} \
            --region ${{ env.AWS_REGION }} \
            $(if [ "${{ env.AWS_REGION }}" != "us-east-1" ]; then echo "--create-bucket-configuration LocationConstraint=${{ env.AWS_REGION }}"; fi)

          echo "Configuring bucket settings..."

          aws s3api put-bucket-versioning \
            --bucket ${{ env.BUCKET_NAME }} \
            --versioning-configuration Status=Enabled

          aws s3api put-bucket-encryption \
            --bucket ${{ env.BUCKET_NAME }} \
            --server-side-encryption-configuration '{
              "Rules": [
                {
                  "ApplyServerSideEncryptionByDefault": {
                    "SSEAlgorithm": "AES256"
                  }
                }
              ]
            }'

      - name: Configure bucket public access
        if: steps.check_bucket.outputs.bucket_exists == 'false'
        run: |
          aws s3api put-public-access-block \
            --bucket ${{ env.BUCKET_NAME }} \
            --public-access-block-configuration \
              "BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true"
</code></pre>
<h3 id="heading-workflow-overview">Workflow Overview</h3>
<p>The workflow triggers on every push and performs the following operations:</p>
<ol>
<li><p>Authenticates with AWS using OIDC</p>
</li>
<li><p>Check if the specified S3 bucket exists</p>
</li>
<li><p>Creates a new bucket if it doesn't exist</p>
</li>
<li><p>Configures bucket security settings and encryption</p>
</li>
</ol>
<h3 id="heading-configuration-requirements">Configuration Requirements</h3>
<h3 id="heading-aws-iam-role-setup">AWS IAM Role Setup</h3>
<p>You need to replace the <code>AWS_ROLE_TO_ASSUME</code> environment variable with your IAM role ARN. Your role ARN should look similar to:</p>
<pre><code class="lang-plaintext">arn:aws:iam::{YOUR-AWS-ACCOUNT-ID}:role/github-actions-s3-oidc-role-dev
</code></pre>
<h3 id="heading-step-3-test-the-workflow">Step 3: Test the Workflow</h3>
<ol>
<li><p>Commit and push the changes to your main branch.</p>
</li>
<li><p>Go to the <strong>Actions</strong> tab in your GitHub repository to monitor the workflow execution.</p>
</li>
<li><p>Verify the S3 bucket creation in the AWS Management Console.</p>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735807765454/e3012d50-62d5-4545-b9c2-ee828f874bfd.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-key-benefits-of-using-oidc-with-github-actions">Key Benefits of Using OIDC with GitHub Actions</h3>
<ul>
<li><p><strong>Enhanced Security:</strong> Eliminates the need for long-term AWS credentials in GitHub Secrets.</p>
</li>
<li><p><strong>Scalability:</strong> Easily manage permissions for multiple repositories.</p>
</li>
<li><p><strong>Cost-Effective:</strong> Automates deployment without additional infrastructure.</p>
</li>
</ul>
<h3 id="heading-conclusion">Conclusion</h3>
<p>By leveraging GitHub Actions with OIDC, you can build secure, streamlined CI/CD pipelines to deploy resources like S3 buckets to AWS. This setup not only reduces complexity but also ensures your workflows adhere to modern security best practices.</p>
<h3 id="heading-next-steps">Next Steps</h3>
<p>Try extending this workflow to deploy additional AWS resources, such as Lambda functions or DynamoDB tables, and explore the power of GitHub Actions in simplifying cloud deployments.</p>
<p><strong>Congratulations !!!!</strong> Feel free to share your thoughts or ask questions about this guide!</p>
]]></content:encoded></item><item><title><![CDATA[Complete one hands-on AWS project before December 31st]]></title><description><![CDATA[Are you ready to conclude 2024 with genuine AWS experience? Stop watching tutorials and start building! Before December 31st, complete one hands-on AWS project.
Choose Your Project:
• Static website using S3 and CloudFront
• Deploy a serverless appli...]]></description><link>https://blog.oluwaseunmusa.com/complete-one-hands-on-aws-project-before-december-31st</link><guid isPermaLink="true">https://blog.oluwaseunmusa.com/complete-one-hands-on-aws-project-before-december-31st</guid><category><![CDATA[AWS]]></category><category><![CDATA[ec2]]></category><category><![CDATA[S3]]></category><category><![CDATA[GitHub]]></category><category><![CDATA[serverless]]></category><dc:creator><![CDATA[Seun Musa]]></dc:creator><pubDate>Tue, 17 Dec 2024 19:45:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1734464927222/47fcd9e8-9098-4317-9cd3-71d99e6f8e6d.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Are you ready to conclude 2024 with genuine AWS experience? Stop watching tutorials and start building! Before December 31st, complete one hands-on AWS project.</p>
<p>Choose Your Project:</p>
<p><a target="_blank" href="https://www.youtube.com/watch?v=H83xYoC3z4A&amp;list=PLwyXYwu8kL0wMalR9iXJIPfiMYWNFWQzx&amp;index=3">• Static website using S3 and CloudFront</a></p>
<p><a target="_blank" href="https://www.youtube.com/watch?v=GPme1i1VyQQ">• Deploy a serverless application</a></p>
<p>• <a target="_blank" href="https://www.youtube.com/watch?v=PgeQufaQy7I">Set up a multi-region architecture</a></p>
<p><a target="_blank" href="https://www.youtube.com/watch?v=mFFXuXjVgkU">• Build a CI/CD pipeline(Github Action)</a></p>
<p><a target="_blank" href="https://www.youtube.com/watch?v=qNIniDftAcU">• Deploy an Nginx Docker container in the EC2 instance</a></p>
<p><a target="_blank" href="https://wellarchitectedlabs.com/">• Learn AWS Well-Architected Framework</a></p>
<p>• Create a cost optimization dashboard</p>
<p>• Design a disaster recovery solution</p>
<p>• Or use your imagination and design your own!</p>
<p>Lastly 🚨 Watch your costs 💰 👀👀👀</p>
]]></content:encoded></item><item><title><![CDATA[AWS re:Invent 2024 recap]]></title><description><![CDATA[I'm thrilled to share my recent experiences at two incredible Amazon Web Services (AWS) events this year! First, I had the opportunity to attend the AWS re: Inforce security conference in Philadelphia back in June 2024, which was a deep dive into the...]]></description><link>https://blog.oluwaseunmusa.com/aws-reinforce-2024-recap</link><guid isPermaLink="true">https://blog.oluwaseunmusa.com/aws-reinforce-2024-recap</guid><category><![CDATA[AWS]]></category><category><![CDATA[reinvent2024]]></category><category><![CDATA[Security]]></category><category><![CDATA[Cloud]]></category><dc:creator><![CDATA[Seun Musa]]></dc:creator><pubDate>Tue, 17 Dec 2024 19:24:03 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1734463354113/e32282af-dbc9-49dd-a944-1e7938fee448.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I'm thrilled to share my recent experiences at two incredible <a target="_blank" href="https://www.linkedin.com/company/amazon-web-services/">Amazon Web Services (AWS)</a> events this year! First, I had the opportunity to attend the AWS re: Inforce security conference in Philadelphia back in June 2024, which was a deep dive into the latest in cloud security. I didn't get a chance to post it here then, but it was a fantastic experience filled with insightful sessions and networking with fellow security professionals.</p>
<p>Fast forward to now, I just wrapped up an amazing five days at AWS re: Invent in Las Vegas. This event was a whirlwind of innovation and networking, from keynote sessions and fireside talks to learning and mentoring sessions. I even had the chance to chat with top AWS executives during mentoring sessions.</p>
<p>Beyond the conference, some friends and I at the event explored some iconic Las Vegas spots, like the Las Vegas <a target="_blank" href="https://www.linkedin.com/company/sphere-vegas/">Sphere</a>, Fountain of Bellagio, and AREA15, making this trip unforgettable.</p>
<p>These experiences have enriched my journey as a security engineer, and I’m thrilled to apply my knowledge. Below, I’ve curated a list of top security announcements that I believe are worth sharing.</p>
<p><strong><mark>Top security, identity, and compliance announcement at AWS re:invent Las Vegas.</mark></strong></p>
<p><strong>AWS Security Incident Response</strong></p>
<p>Security Incident Response integrates with detection services and third-party tools to streamline incident response, saving time and enabling faster coordination. The service offers centralized incident management, preconfigured response teams, and real-time monitoring.</p>
<p><strong>Amazon GuardDuty Extended Threat Detection</strong></p>
<p>Amazon GuardDuty Extended Threat Detection uses AI and machine learning to identify sophisticated attacks targeting AWS accounts, workloads, and data. This new capability automatically correlates security signals to detect attack sequences and provides detailed findings for faster response.</p>
<p><strong>Amazon OpenSearch Service zero-ETL integration with Amazon Security Lake</strong></p>
<p>This integration enables efficient exploration of voluminous data sources, streamlining security investigations and providing comprehensive security landscape visibility. It offers flexible data ingestion, pre-built queries and dashboards, and performance-enhancing features, accelerating investigations and optimizing analytics efficiency and costs.</p>
<p><strong>Simplify governance with declarative policies.</strong></p>
<p>Declarative policies help enforce desired configurations for AWS services across organizations, ensuring compliance and reducing complexity.  They can be applied at the organization, OU, or account level and prevent non-compliant actions, even those invoked by service-linked roles.</p>
<p><a target="_blank" href="https://www.linkedin.com/feed/hashtag/?keywords=aws&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7270977086805143552">#AWS</a> <a target="_blank" href="https://www.linkedin.com/feed/hashtag/?keywords=reinvent&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7270977086805143552">hashtag#reInvent</a> <a target="_blank" href="https://www.linkedin.com/feed/hashtag/?keywords=cloudsecurity&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7270977086805143552">hashtag#CloudSecurity</a> <a target="_blank" href="https://www.linkedin.com/feed/hashtag/?keywords=continuouslearning&amp;highlightedUpdateUrns=urn%3Ali%3Aactivity%3A7270977086805143552">hashtag#ContinuousLearning</a></p>
]]></content:encoded></item><item><title><![CDATA[Top Security, Identity, and Compliance announcement at AWS re:invent 2024, Las Vegas.]]></title><description><![CDATA[AWS re:Invent 2024 took place in Las Vegas from December 2 to 6, attracting over 54,000 attendees who participated in more than 2,300 sessions and hands-on labs. The conference served as a hub of innovation and learning, hosted by AWS for the global ...]]></description><link>https://blog.oluwaseunmusa.com/top-security-identity-and-compliance-announcement-at-aws-reinvent-2024-las-vegas</link><guid isPermaLink="true">https://blog.oluwaseunmusa.com/top-security-identity-and-compliance-announcement-at-aws-reinvent-2024-las-vegas</guid><dc:creator><![CDATA[Seun Musa]]></dc:creator><pubDate>Tue, 17 Dec 2024 06:00:00 GMT</pubDate><content:encoded><![CDATA[<p>AWS re:Invent 2024 took place in Las Vegas from December 2 to 6, attracting over 54,000 attendees who participated in more than 2,300 sessions and hands-on labs. The conference served as a hub of innovation and learning, hosted by AWS for the global cloud computing community.</p>
<p>In this blog post, I will be covering some of the major security, identity, and compliance announcements from the conference. Though this year’s event focused on best practices for zero trust, generative AI-driven security, identity, and access management, DevSecOps, network and infrastructure security, data protection, and threat detection and incident response. Apologies in advance if this post didn’t cover all of the announcement</p>
<h3 id="heading-key-announcements"><strong>Key announcements</strong></h3>
<p><strong>Amazon GuardDuty Extended Threat Detection</strong></p>
<p>Amazon GuardDuty Extended Threat Detection uses AI and machine learning to identify sophisticated attacks targeting AWS accounts, workloads, and data. This new capability automatically correlates security signals to detect attack sequences and provides detailed findings for faster response.</p>
<p><strong>Amazon OpenSearch Service zero-ETL integration with Amazon Security Lake</strong></p>
<p>This integration enables efficient exploration of voluminous data sources, streamlining security investigations and providing comprehensive security landscape visibility. It offers flexible data ingestion, pre-built queries and dashboards, and performance-enhancing features, accelerating investigations and optimizing analytics efficiency and costs.</p>
<p><strong>Simplify governance with declarative policies</strong></p>
<p>Declarative policies help enforce desired configurations for AWS services across organizations, ensuring compliance and reducing complexity. They can be applied at the organization, OU, or account level and prevent non-compliant actions, even those invoked by service-linked roles.</p>
<p><strong>Resource control policies</strong></p>
<p>RCPs, or Resource Control Policies, are a new organizational policy framework that allows for the centralized creation and enforcement of preventive controls on AWS resources. They enable organizations to set and manage maximum permissions for AWS resources, ensuring consistent governance and security as workloads scale.</p>
<p><strong>AWS Security Incident Response</strong> </p>
<p>AWS Security Incident Response is a powerful new service designed to empower organizations in effectively addressing security issues within their environments. This cutting-edge service seamlessly integrates automated monitoring and investigation with enhanced communication and coordination. With direct, 24/7 access to the AWS Customer Incident Response Team, organizations can confidently prepare for, respond to, and recover from security events with speed and efficiency.</p>
]]></content:encoded></item><item><title><![CDATA[Deploy NGINX Application on AWS ECS]]></title><description><![CDATA[AWS ECS on Fargate offers a seamless platform for deploying containerized applications with ease and efficiency. In this article, we will guide you through the process of deploying an NGINX application on AWS ECS using Fargate.
What is AWS ECS and Fa...]]></description><link>https://blog.oluwaseunmusa.com/deploy-nginx-application-on-aws-ecs</link><guid isPermaLink="true">https://blog.oluwaseunmusa.com/deploy-nginx-application-on-aws-ecs</guid><category><![CDATA[AWS]]></category><category><![CDATA[ECS]]></category><category><![CDATA[aws-fargate]]></category><category><![CDATA[cluster]]></category><category><![CDATA[containers]]></category><dc:creator><![CDATA[Seun Musa]]></dc:creator><pubDate>Sun, 04 Aug 2024 21:30:19 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1752465330344/e3e5c85a-855e-4da4-82d3-b087f4c01aca.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>AWS ECS on Fargate offers a seamless platform for deploying containerized applications with ease and efficiency. In this article, we will guide you through the process of deploying an NGINX application on AWS ECS using Fargate.</p>
<h2 id="heading-what-is-aws-ecs-and-fargate">What is AWS ECS and Fargate?</h2>
<p>AWS ECS (Elastic Container Service) is a highly scalable, high-performance container management service that supports Docker containers and allows you to run applications on a managed cluster of servers. Fargate, on the other hand, is a serverless compute engine for containers that work with ECS, removing the need to manage servers or clusters. Additionally, you can deploy ECS on an EC2 instance, however you would need to manually manage the servers or cluster.</p>
<p><strong>Why are we deploying NGINX?</strong> NGINX is a popular open-source web server known for its high performance, stability, and rich feature set. It's often used for load balancing, reverse proxying, and as a web server.</p>
<p><strong>Prerequisites</strong></p>
<ul>
<li><p>An AWS account with permission to use ECS</p>
</li>
<li><p>AWS CLI installed</p>
</li>
<li><p>Basic understanding of Docker, NGINX, and AWS AWS ECS</p>
</li>
</ul>
<p><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5c81v6gdomkoulewt5q2.png" alt="Image description" /></p>
<h2 id="heading-step-1-create-an-ecs-cluster">Step 1: Create an ECS Cluster:</h2>
<p><em>A cluster is a logical grouping of your ECS resources, you would need a cluster to deploy a container. in this post, we will be using the default vpc for the cluster</em></p>
<p>To create a cluster Through AWS CLI <code>aws ecs create-cluster --cluster-name nginx-application</code></p>
<p><strong>To Create a cluster via AWS Console</strong></p>
<blockquote>
<p>Log in to your AWS Management Console, Navigate to the ECS service, and select “Clusters”. Create a new cluster</p>
</blockquote>
<p><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/po814hke02t8hhwz2951.png" alt="Image description" /></p>
<h2 id="heading-step-2-register-task-definition">Step 2: Register task definition:</h2>
<p><em>A Task Definition in AWS ECS is a blueprint for running containers, specifying details like container images, CPU and memory allocation, environment variables, and networking settings.</em></p>
<blockquote>
<p><strong>To Create a task definition via AWS Console</strong></p>
<ul>
<li><p><strong>Go to the Task Definitions page</strong> on the ECS console.</p>
</li>
<li><p><strong>Create a new task definition</strong> and select “Fargate” as the launch type.</p>
</li>
<li><p><strong>Configure the task</strong> with the required settings like task size (CPU and memory).</p>
</li>
<li><p><strong>Add a container definition</strong> for your NGINX server. Here, you'll specify the image for NGINX (you can use the official NGINX image from Docker Hub).</p>
</li>
</ul>
</blockquote>
<p><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dc95sm6u2wwiuvrnimzw.png" alt="Image description" /></p>
<p><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cuf5u066ni8jtpd2ty4v.png" alt="Image description" /></p>
<h2 id="heading-step-3-configure-and-launch-the-service">Step 3: Configure and Launch the Service</h2>
<p><em>A service in AWS ECS creates a task by instantiating a task definition, where a task represents a running container. The service is responsible for managing and maintaining the container's desired state and scalability.</em></p>
<blockquote>
<p><strong>To Create a Service via AWS Console</strong></p>
<ul>
<li><p><strong>Return to your ECS cluster</strong> and select “Services”.</p>
</li>
<li><p><strong>Create a new service</strong> and select the task definition you created.</p>
</li>
<li><p><strong>Configure the service</strong> - set the number of desired tasks, and network and security settings.</p>
</li>
<li><p><strong>Launch the service</strong>. AWS Fargate will start and manage the containers for you.</p>
</li>
</ul>
</blockquote>
<p><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xiaxnz6ea2pr1gbh27t1.png" alt="Image description" /></p>
<p><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3r4f6mma1et0ijcjewzr.png" alt="Image description" /></p>
<p><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2e0b021h748rcafkm54p.png" alt="Image description" /></p>
<p><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tt42bbbrbgniq01xoyys.png" alt="Image description" /></p>
<p><img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3da6jkszlantpsxqem50.png" alt="Image description" /></p>
<h2 id="heading-step-4-access-the-nginx-application">Step 4: Access the NGINX Application</h2>
<ul>
<li><p>Find the public IP of your running task (available in the task details in the ECS console).</p>
</li>
<li><p>Access NGINX by entering the public IP in your web browser. You should see the NGINX welcome page.</p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[How to deploy a Docker container on an Amazon EC2 Instance]]></title><description><![CDATA[Imagine you've just started learning how to create Docker containers on your local machine. Now, what if you could do the same on your EC2 instance without worrying about whether your PC will crash? Don’t get me wrong about having a personal lab for ...]]></description><link>https://blog.oluwaseunmusa.com/how-to-deploy-a-docker-container-on-an-amazon-ec2-instance</link><guid isPermaLink="true">https://blog.oluwaseunmusa.com/how-to-deploy-a-docker-container-on-an-amazon-ec2-instance</guid><category><![CDATA[Docker]]></category><category><![CDATA[AWS]]></category><category><![CDATA[containers]]></category><category><![CDATA[ec2]]></category><dc:creator><![CDATA[Seun Musa]]></dc:creator><pubDate>Thu, 01 Aug 2024 05:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1752388870902/82a537e3-7e96-44a2-81d9-0d80673e3df3.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Imagine you've just started learning how to create Docker containers on your local machine. Now, what if you could do the same on your EC2 instance without worrying about whether your PC will crash? Don’t get me wrong about having a personal lab for practice and all. It’s just that cloud infrastructure has made many things super flexible, especially if you’re learning new technologies or want to master existing ones.</p>
<p>Docker containers, Images, and everything about Microservices have gained so much popularity in different industry domains, due to their persistent nature.</p>
<p>This article shows you how to do the following:</p>
<ul>
<li><p><strong>How to create an EC2 instance</strong></p>
</li>
<li><p><strong>SSH into an EC2 instance</strong></p>
</li>
<li><p><strong>Install Docker Desktop on an EC2 instance</strong></p>
</li>
<li><p><strong>Run a container application on an EC2 instance</strong></p>
</li>
</ul>
<h2 id="heading-step-1-createprovision-an-ec2-instance">Step 1: Create/Provision an EC2 Instance</h2>
<p>AWS offers several ways to create EC2 instances, such as using the console, CLI, CDK, Python boto3, CloudFormation, and Terraform. For simplicity in this lab, we will use the console.</p>
<p><strong>Access EC2 in the AWS Console</strong><br />In the AWS Management Console, search for <strong>EC2</strong> and select the service. Click <strong>"Launch Instance"</strong> to begin creating a new virtual server.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752279345477/168a3da8-b5f4-4862-9b60-376a5db86ba4.png" alt class="image--center mx-auto" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752279358541/dcbf692a-799c-47b5-b217-e74ae4b772a7.png" alt class="image--center mx-auto" /></p>
<p><strong>Choose an Amazon Machine Image (AMI)</strong><br />Select an <strong>Amazon Linux AMI</strong>, which comes with pre-configured settings for your OS and application environment. For this lab, we will choose the <strong>Amazon Linux</strong> OS.</p>
<p><strong>Select an Instance Type</strong><br />For small-scale applications or testing, a <strong>t2.micro</strong> instance is a cost-effective option.</p>
<p><strong>Configure Security Group</strong><br />Set up a security group to manage traffic to your instance. Add rules to allow:</p>
<ul>
<li><p>HTTP (port 80) &amp; Port 8080 (We will use this for the container host port )</p>
</li>
<li><p>HTTPS (port 443)</p>
</li>
</ul>
<p><strong>Create a Key Pair</strong><br />Generate and download a secure <strong>SSH key pair</strong>. You'll use this to remotely access your EC2 instance. Store the private key file in a secure location.</p>
<p><strong>Launch the Instance</strong><br />Once the above steps are complete, launch your instance. After deployment, go to the <strong>EC2 Instances</strong> page to find your instance’s <strong>public IP address</strong>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752279744843/ff7a8dbe-2cbd-49b0-93fd-8fc20d4e51a9.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-step-2-install-docker-on-your-ec2-instance">Step 2: Install Docker on your EC2 Instance</h2>
<p><strong>NOTE</strong>: This section of the lab assumes that you are now familiar with Provisioning EC2 Instances and can manage EC2 Instances.</p>
<p><strong>Connect to Your EC2 Instance via SSH</strong></p>
<p>Use your terminal (Mac/Linux) or an SSH client (like PuTTY for Windows) to connect:</p>
<p>From your terminal, go to the directory where your EC2 key pair was downloaded. In this lab, my key pair is named. <code>docker-container.pem</code> After that, run the following command:</p>
<p><strong>NOTE: Replace the below IP Address with your EC2 instance's Public IPv4 address</strong></p>
<pre><code class="lang-powershell">chmod <span class="hljs-number">400</span> docker<span class="hljs-literal">-container</span>.pem
ssh <span class="hljs-literal">-i</span> docker<span class="hljs-literal">-container</span>.pem ec2<span class="hljs-literal">-user</span>@<span class="hljs-number">13.222</span>.<span class="hljs-number">94.175</span>
</code></pre>
<p><strong>Install Docker on EC2</strong></p>
<ul>
<li>When you SSH into your EC2 Instance and establish a connection, then update the package manager index by running the following commands in white color:</li>
</ul>
<pre><code class="lang-powershell">sudo yum update <span class="hljs-literal">-y</span>
</code></pre>
<ul>
<li>Install the Docker package by running the following command:</li>
</ul>
<pre><code class="lang-powershell">sudo yum install docker
</code></pre>
<ul>
<li>Start and enable the Docker service by running the following command:</li>
</ul>
<pre><code class="lang-powershell">sudo systemctl <span class="hljs-built_in">start</span> docker
sudo systemctl enable docker
</code></pre>
<ul>
<li>Add your EC2 instance user to the Docker group. This will let you run Docker commands without getting access denied errors.</li>
</ul>
<blockquote>
<p>You'll need to log out and back in for group changes to take effect.</p>
</blockquote>
<pre><code class="lang-powershell">sudo usermod <span class="hljs-literal">-aG</span> docker ec2<span class="hljs-literal">-user</span>
</code></pre>
<ul>
<li>Verify that Docker is running by running the following command:</li>
</ul>
<pre><code class="lang-powershell">sudo service docker status
</code></pre>
<p>You should see something like the below output</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752281671337/adf72cf6-4aeb-4f49-830b-dec970a8a1e1.png" alt class="image--center mx-auto" /></p>
<p>After completing the steps above, Docker should be installed and running on your Amazon EC2 instance. You can now use Docker to run and manage containers on your EC2 instance.</p>
<h2 id="heading-step-3-run-a-docker-container">Step 3: Run a Docker Container</h2>
<p>Great job so far! You've successfully created an instance, connected via SSH, and installed Docker Desktop on the instance. Now, we're at the final part of this lab: running a sample NGINX Docker container. P.S.: To learn more about Docker and Docker containers, please visit the <a target="_blank" href="https://docs.docker.com/get-started/">Docker-wiki-page.</a></p>
<ul>
<li>Let’s run an NGINX container on port <strong>8080</strong> and name it <code>my-nginx-container</code>:</li>
</ul>
<pre><code class="lang-powershell">docker run <span class="hljs-literal">-d</span> -<span class="hljs-literal">-name</span> my<span class="hljs-literal">-nginx</span><span class="hljs-literal">-container</span> <span class="hljs-literal">-p</span> <span class="hljs-number">8080</span>:<span class="hljs-number">80</span>  nginx
</code></pre>
<p>Let me break down the above command</p>
<ul>
<li><p><code>-d</code> Runs the container in detached mode (in the background)</p>
</li>
<li><p><code>—name</code> allows you to name your container whatever you prefer. In this lab, my container is named<code>my-nginx-container</code>:</p>
</li>
<li><p><code>-p 8080:80</code> maps the instance’s port <code>8080</code> to the container’s port <code>80</code></p>
</li>
</ul>
<p>You can now open a browser and visit your EC2 instance's <strong>public IP</strong> with port 8080 to see the NGINX welcome page. Here is my URL: <code>http://13.222.94.175:8080</code> By the time you read this, I will have disconnected the EC2 instance.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1752283268651/4d34ce71-d80a-4d61-8022-3d57ac9a2493.png" alt class="image--center mx-auto" /></p>
<p><strong>Here are some useful Docker commands to monitor and manage your container:</strong></p>
<ul>
<li><p>List Running Containers <code>docker ps</code></p>
</li>
<li><p>List all Containers, including stopped containers : <code>docker ps -a</code></p>
</li>
<li><p>Stop the Container: <code>docker stop my-nginx-container</code></p>
</li>
<li><p>Start the Container Again: <code>docker start my-nginx-container</code></p>
</li>
<li><p>Restart the Container: <code>docker restart my-nginx-container</code></p>
</li>
</ul>
<p>Yay! Congratulations, you have just completed this lab.</p>
]]></content:encoded></item></channel></rss>