<?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 Stephanie Batanwi on Medium]]></title>
        <description><![CDATA[Stories by Stephanie Batanwi on Medium]]></description>
        <link>https://medium.com/@Stephanie_Batanwi?source=rss-538c281c70c5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Stephanie Batanwi on Medium</title>
            <link>https://medium.com/@Stephanie_Batanwi?source=rss-538c281c70c5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 01:33:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Stephanie_Batanwi/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[Generative AI Meets AWS: Amazon Bedrock Explained.]]></title>
            <link>https://ai.plainenglish.io/generative-ai-meets-aws-amazon-bedrock-explained-595e10fd70ef?source=rss-538c281c70c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/595e10fd70ef</guid>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Stephanie Batanwi]]></dc:creator>
            <pubDate>Wed, 16 Sep 2026 13:56:26 GMT</pubDate>
            <atom:updated>2026-09-16T13:56:26.785Z</atom:updated>
            <content:encoded><![CDATA[<h4>How generative AI creates content and how Amazon Bedrock helps builders turn it into useful applications.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*r34mcLwGg009CdFgWvCumA@2x.jpeg" /></figure><p>You have probably already used generative AI.</p><p>Perhaps you’ve asked a chatbot to explain a difficult topic, summarize a document, create an image, or improve an email and within seconds it produced a reply based on your request.</p><p>But what happens when a company wants to add that ability to its own application?</p><p>That is where Amazon Bedrock comes in.</p><h4>First, what is generative AI?</h4><p>Traditional software usually follows fixed instructions. Think about a calculator, when you enter 5+5, it follows a rule and returns 10. The answer is predictable.</p><p>Generative AI works differently, it learns patterns from large amounts of data and uses those patterns to create new content. It can generate text, images, summaries, codes and more.</p><p>Imagine a very competent assistant. You could ask:</p><ul><li>“Summarize these meeting notes.”</li><li>“Explain cloud computing to a beginner.”</li><li>“Turn this customer conversation into a call summary.”</li></ul><p>The assistant studies your request and creates a response. It is not simply copying one stored answer. It is generating an answer based on patterns it learned.</p><h4>The engine behind generative AI</h4><p>Generative AI applications are powered by <strong>foundation models</strong>.</p><p>A <strong>foundation model</strong> is trained on a massive amount of diverse data and can handle many types of tasks. Think of it as the engine inside a car: the engine supplies the power, but someone still needs to build the rest of the car around it.</p><p>When you type a request, that request is called a <strong>prompt</strong>. The model processes the prompt and generates an <strong>output.</strong></p><p>The process looks like this:</p><p>Your prompt → Foundation model → Generated response(output)</p><p>For example:</p><p><em>Prompt</em> : “Explain Amazon S3 using an everyday example.”</p><p><em>Generated response</em>: “Amazon S3 is like a digital storage warehouse where you can keep and retrieve files whenever you need them.”</p><p>The quality of the response depends partly on the model and partly on how clearly you describe what you need.</p><h4>So, what is Amazon Bedrock?</h4><p>Amazon Bedrock is a fully managed AWS service for building and scaling generative AI applications using foundation models.</p><p>Think of Bedrock as a food court.</p><p>At a food court, you do not build a restaurant every time you want a meal. The kitchens, equipment, and staff are already available. You choose the provider that best matches what you want.</p><p>Amazon Bedrock offers a similar starting point for AI builders. It provides access to a catalog of foundation models and tools through AWS. A builder can compare models and select one that fits the application without managing the underlying model infrastructure.</p><p>The connection is simple:</p><ul><li><strong>Generative AI </strong>is the technology that creates new content.</li><li><strong>A foundation model</strong> is the engine that generates that content.</li><li><strong>Amazon Bedrock</strong> is the AWS service that builders can use to access models and add generative AI capabilities to applications.</li></ul><p>A practical example could be a technical support representative who has helped a customer reconnect a laptop to WiFi. After the call, the representative must document the issue, troubleshooting steps,result,next action which is time consuming.</p><p>The company could build an approved application that sends the call transcript to a foundation model through Amazon Bedrock. The model could generate notes with issue description, troubleshooting steps taken and resolution. That way, the representative would check the facts, correct any errors and approve the notes.</p><p>Here, generative AI creates the summary, Bedrock gives the application managed access to the model and the employee provides human review.</p><h4>What if the AI Needs Company Information?</h4><p>A general foundation model will not automatically know a company’s latest policies or troubleshooting guides. That would be like hiring a new employee and expecting them to answer company-specific questions without giving them the handbook.</p><p>Amazon Bedrock Knowledge Bases can help applications use <strong>Retrieval-Augmented Generation</strong>, usually called <strong>RAG</strong>.</p><p>With RAG, the application first retrieves relevant information from an approved data source. It then gives that information to the model as context for the response.</p><p>The process becomes:</p><p>Question → Find relevant company information → Give it to the model → Generate a grounded response</p><p>For example, before suggesting a troubleshooting step, the application could retrieve the company’s current Wi-Fi support guide. This makes the response more relevant than relying only on the model’s general knowledge.</p><h4><strong>Why Guardrails and human review matter</strong></h4><p>Generative AI can produce useful answers but it can also misunderstand context or generate incorrect information.</p><blockquote>An AI response may sound confident and still be wrong.</blockquote><p><strong>Amazon Bedrock Guardrails </strong>can evaluate user inputs and model responses using configured safeguards. Depending on how they are set up, guardrails can help filter unwanted content and protect sensitive information.</p><p>However, guardrails do not remove human responsibility. Builders still need to ask;</p><ul><li>Is this data approved for AI use?</li><li>Who is allowed to access the application?</li><li>Could the output cause harm if it is incorrect?</li><li>Who checks the final result?</li></ul><p><em>Good AI architecture is not only about what a model can do. It is also about what the application should be allowed to do.</em></p><p><strong>The Lesson</strong></p><p>Amazon Bedrock makes Generative AI more accessible but cloud fundamentals still matter. Builders need to understand security, IAM permissions, data protection, monitoring, testing, and cost. Bedrock does not replace those skills, it gives us a new way to apply them.</p><p>My biggest lesson is this:</p><blockquote>Building with AI is not just choosing a powerful model. It is designing a safe and useful system around that model.</blockquote><p>Generative AI provides the ability to create. Amazon Bedrock provides the AWS foundation for bringing that ability into an application. Human judgment provides the direction and accountability.</p><blockquote>AI helps you start faster. You stay in control.</blockquote><p>As I continue exploring cloud and AI, my approach remains simple:</p><blockquote>Learn it. Build it. Explain it.</blockquote><h4>Learn more</h4><ul><li><a href="https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-bedrock.html">Amazon Bedrock overview</a></li><li><a href="https://docs.aws.amazon.com/bedrock/latest/userguide/key-definitions.html">Generative AI terminology in Amazon Bedrock</a></li><li><a href="https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html">Amazon Bedrock knowledge Bases</a></li><li><a href="https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html">Amazon Bedrock Guardrails</a></li></ul><h3>Before you go</h3><ul><li>Please take a moment to like the post and follow the writer!</li><li>Did you know that over 400,000 developers share what they’re building, learning, and discovering across our platforms every month? Learn how you can contribute <a href="https://plainenglish.io/write-for-us">here</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=595e10fd70ef" width="1" height="1" alt=""><hr><p><a href="https://ai.plainenglish.io/generative-ai-meets-aws-amazon-bedrock-explained-595e10fd70ef">Generative AI Meets AWS: Amazon Bedrock Explained.</a> was originally published in <a href="https://ai.plainenglish.io/">Artificial Intelligence in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Did you Know AI Agent Can Build While You Step Away?]]></title>
            <link>https://ai.plainenglish.io/did-you-know-ai-agent-can-build-while-you-step-away-3a2350211bd4?source=rss-538c281c70c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a2350211bd4</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Stephanie Batanwi]]></dc:creator>
            <pubDate>Tue, 08 Sep 2026 10:22:22 GMT</pubDate>
            <atom:updated>2026-09-09T23:52:56.887Z</atom:updated>
            <content:encoded><![CDATA[<h4>Meet AWS Kiro</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*3FNLfx43kWUGE9KQGqJ21g@2x.jpeg" /></figure><p>Most of us use AI to ask questions, to explain a difficult topic or generate a piece of code. But did you know that an AI agent can help complete an entire development task?</p><p>That is the idea behind <strong>AWS Kiro</strong>.</p><p>Kiro is an agentic development tool designed to help builders move from an idea to working software. Instead of giving you only a quick code suggestion it can help understand the requirements, create a plan, write the code, generate tests and prepare the work for review.</p><p><strong>Think of Kiro as a Remote Junior Developer</strong></p><p>Imagine you are building a website and need to add a contact form.</p><p>With a regular AI assistant, you might ask:</p><blockquote>“Can you show me the code for a contact form?”</blockquote><p>You receive the code but you still have to decide where it belongs, connect it to your project and test everything yourself.</p><p>However, with an autonomous agent such as Kiro, you can give it a broader goal:</p><blockquote>“Add a contact form to this application, validate the information and create tests for it.”</blockquote><p>Kiro can then study the project, ask questions if something is unclear, make a plan and work through the task. In autonomous mode, it can complete the work in an isolated cloud environment and prepare a pull request for you to review.</p><p>This is similar to assigning work to a junior developer on your team. You explain what you need, the developer works remotely and then brings teh completed work back for your approval.</p><h4>How Can Kiro Help Builders Today?</h4><p>Kiro can support builders with tasks like;</p><ul><li>Turning an idea into clear requirements</li><li>Creating a development plan before writing code</li><li>Building or updating application features</li><li>Finding and fixing bugs</li><li>Preparing changes for review</li></ul><p>This is very helpful when learning in cloud engineering. Instead of just copying code, you can examine Kiro’s plan, review the changes and study how the different parts of the application work together.</p><h4>Does This Mean the Builder Is No Longer needed?</h4><p>No, Kiro may be able to complete development steps but the builder still provides teh direction and judgement. You must decide; what problem should be solved, what access/permission to give the agent, verify the security of the architecture, the suitability/accuracy of the tests and the readiness of the final result.</p><p>AI generated code isn’t 100%perfect, it can contain mistakes or introduce security and code risks. Builders still need to review the code, protect credentials, limit permissions and test changes before deploying them, especially in a production environment.</p><h4>From Asking AI to Working With AI</h4><p>The biggest change is not that AI can write code, we’ve already seen that.</p><p>The change is that Ai can now participate in a workflow; understanding a goal, planning the work, taking several actions and returning with a result.</p><p>For today’s builders, learning to work with agents may become as important as learning to work with cloud services and automation tools.</p><p>The goal is not to hand over every decision but to spend less time on repetitive steps and more time understanding the problem, improving teh design and making responsible choices.</p><p>Kiro can help you build faster, but you remain the architect.</p><blockquote>Learn it. Build it. Explain it like you work there.</blockquote><h4>Sources</h4><ul><li><a href="https://aws.amazon.com/documentation-overview/kiro/">Kiro documentation overview — AWS</a></li><li><a href="https://kiro.dev/web/">Kiro Web</a></li><li><a href="https://kiro.dev/docs/web/autonomous-mode/">Kiro autonomous mode</a></li></ul><h3>Before you go</h3><ul><li>Please take a moment to like the post and follow the writer!</li><li>Did you know that over 400,000 developers share what they’re building, learning, and discovering across our platforms every month? Learn how you can contribute <a href="https://plainenglish.io/write-for-us">here</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a2350211bd4" width="1" height="1" alt=""><hr><p><a href="https://ai.plainenglish.io/did-you-know-ai-agent-can-build-while-you-step-away-3a2350211bd4">Did you Know AI Agent Can Build While You Step Away?</a> was originally published in <a href="https://ai.plainenglish.io/">Artificial Intelligence in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[You Won’t Lose Your Job to AI, You’ll Lose It To Someone Using AI.]]></title>
            <link>https://medium.com/@Stephanie_Batanwi/you-wont-lose-your-job-to-ai-you-ll-lose-it-to-someone-using-ai-2e4306b4ffbb?source=rss-538c281c70c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e4306b4ffbb</guid>
            <category><![CDATA[future]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Stephanie Batanwi]]></dc:creator>
            <pubDate>Mon, 20 Jul 2026 05:45:54 GMT</pubDate>
            <atom:updated>2026-07-20T05:45:54.381Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*TNEDUnQWhKrOWpXHd1NYUg@2x.jpeg" /></figure><blockquote>“Every generation experiences a change in technology. The internet was one, AI might be the next.”</blockquote><p>Just to be clear, I do not believe robots are coming for everyone’s jobs but I do believe something just as important is happening.</p><p>The way we work is changing and it’s changing fast.</p><p>A few years ago, AI could answer your questions. Today, it can do a lot more likde; write reports, analyze spreadsheets, build websites, write code and even manage parts of a business. And it’s only getting started.</p><h4>Meet AI Agents</h4><p>Imagine giving someone a goal instead of a list of instructions. So instead of saying; “Open this file, Read it,Summarize it, Email John” . You simply say; “Review this report and send John a summary before 5pm”.</p><p>An AI agent figures out the steps, it plans, decides then acts.</p><p>That’s the biggest shift, AI is moving from answering questions to completing work.</p><h4>Sound Familiar?</h4><p>Many people dislike change, remeber when the internet became mainstream? People said they didn’t need email, some said they’ll never shop online. Today, it’s hard to imagine life without it.</p><p>AI feels similar, You can ignore it if you want, the world probably won’t.</p><h4>Should We Be Worried?</h4><p>To be honest, maybe.</p><p>However, going by history, the tractor didn’t eliminate the farmers, it changed farming. The internet didn’t eliminate business, it changed it. AI prbably won’t eliminate work, it’ll change how work’s done. Some jobs will shrink, others will grow. And many of these jobs don’t even exist yet. We’re already seeing the rise of; AI agent developers, AI workflow Designers, AI trainers and Evaluators and so much more.</p><p>You may be wondering(like me), What about Cloud Engineers?</p><p>That’s the interesting part, Every AI agent needs a place to live, computing power, storage, monitoring, networking… and that’s the cloud. The smarter AI becomes, the more cloud infrastructure it needs. Someone has to build, secure and keep running it.</p><p>All of that to say AI isn’t replacing Cloud Engineers, it’s creating more reasons to need them.</p><h4>The Real Opportunity</h4><p>The biggest mistake you can make is pretending AI isn’t changing your industry.</p><p>You don’t have to become an AI researcher or know how to code but understanding how AI works may soon become as important as knowing how to use the internet. Those who thrive will be the ones building with it because the future won’t belong to AI, it will belong to the people who know how to work alongside it.</p><blockquote>All of this to say as I don’t see AI as something to fear but as a reminder that every major technological shift rewards the people willing to learn.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e4306b4ffbb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[VIBE CODING IN THE CLOUD: How AI is Rewriting the Rules of AWS Engineering]]></title>
            <link>https://medium.com/@Stephanie_Batanwi/vibe-coding-in-the-cloud-how-ai-is-rewriting-the-rules-of-aws-engineering-aff0b1023ac6?source=rss-538c281c70c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/aff0b1023ac6</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[solution-architect]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <dc:creator><![CDATA[Stephanie Batanwi]]></dc:creator>
            <pubDate>Wed, 25 Feb 2026 06:29:52 GMT</pubDate>
            <atom:updated>2026-02-25T06:29:52.081Z</atom:updated>
            <content:encoded><![CDATA[<p>The Engineers who learn this skill will move faster than those who ignore it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*WPPCjiFg64Ek3VvrA1ZtYg@2x.jpeg" /></figure><p>There was a time when being a strong cloud engineer meant memorizing AWS services, writing Terraform from scratch, manually debugging every pipeline and spending hours reading documentation .</p><p>That time is fading, cloud is evolving.</p><p>We’re entering a new phase of engineering where your ability to collaborate with AI determines not just how fast you move but also how well you design.</p><p>That shift is <strong>Vibe Coding.</strong></p><h4>What is Vibe Coding?</h4><p>It is the intentional collaboration between an engineer and AI to design, build, refine and optimize cloud systems.</p><p>It is worth noting that vibe coding isn’t copy-paste engineering or lazy coding. It is strategic acceleration. How?</p><p>You bring architecture judgement, cloud fundamentals, security awareness, cost sensitivity while AI brings speed, pattern recognition, rapid iteration.</p><p>Together, you move faster without sacrificing quality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*-EXefslvp5BfB9hL_ZLPpQ@2x.jpeg" /><figcaption>vI be coding = collaboration and not replacement.</figcaption></figure><h4>Why This Matters in the AWS Ecosystem</h4><p>AWS is incredibly powerful but also incredibly vast with hundreds of services, constant updates, evolving security best practices and cost nuances.</p><p>No single engineer can hold all of these in active memory. That’s where vibe coding come in, shifting the mindset from; “How do I memorize everything?” To; “How do I design intelligently and use AI to accelerate execution?”. This mindset changes everything.</p><h4>Top AI Tools Powering Vibe Coding in AWS.</h4><p>Here are some of the tools you need to know if you want to vibe code seriously.</p><h4>1. Kiro : AWS’ Newest AI Coding Agent</h4><p><a href="https://kiro.dev/">Kiro</a> is AWS’ newest AI-powered coding agent and a big shift from simple autocomplete tools. It’s designed specifically for the AWS ecosystem and modern development workflows. It turns prompts in plain language into specs, architectural design and working code, manages tasks across your code base and integrates deeper into IDEs and CLIs with agentic capabilities.</p><p>Kiro doesn’t just suggest code snippets but it can act on your intentions. You can describe what you want at a higher level and it helps structure, generate and organize real implementations.</p><p>It is Best for AWS cloud apps, infrastructure generation, end-to-end development, and deployments.</p><blockquote>It’s a must learn if you want AI to drive real production grade AWS coding not just suggest lines of code.</blockquote><h4>2. AMAZON Q DEVELOPER ; AWS’ IDE-friendly AI coder.</h4><p>It’s AWS’s core AI assistant for cloud engineers.</p><p>Developers use it because it generates, explains , refactors and debugs code. It works inside IDEs and through the CLI, it also understands AWS services like Lambda, CloudFormation, DynamoDB and more thus providing cloud-aware suggestions.</p><p>It behaves like a developer co-pilot built specifically around your AWS stack.</p><p>Best for: Day-to-day AWS development, automation, infrastructure scripting.</p><blockquote>Very strong for reliability engineering, refactoring, and operational cloud work.</blockquote><h4>3. GitHub Copilot; The General AI Coding Assistant</h4><p>Even though it’s not AWS-native, GitHub Copilot remains one of the most mature AI coding assistants available.</p><p>It still matters because it has a deep integration with VS code and JetBrains, it is excellent at generating code from prompts, helps navigate large codebases, supports multiple languages and frameworks.</p><p>Best for: IDE productivity, scripting, and large project navigation.</p><blockquote>Copilot compliments AWS-native tools beautifully.AI agents don’t just autocomplete code but help design,secure and deploy full AWS architectures</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*guMgCnFsxEpXomsaLuqEiA@2x.jpeg" /><figcaption>AI agents don’t just autocomplete code but help design, secure and deploy full AWS architectures.</figcaption></figure><h4>Pitfalls to Avoid in Vibe Coding</h4><p>As powerful as vibe coding is, discipline is required.</p><h4>1. Blindly Trusting AI</h4><p>Always review, validate and test because AI can over-permission IAM roles, suggest insecure defaults, or generate inefficient architectures.</p><h4>2. Skipping Fundamentals</h4><p>AI amplifies expertise not replace it therefore in order to know when AI is wrong, you need to understand networking, IAM, scaling behavior and failure domains.</p><h4>3. Ignoring Cost</h4><p>AI might default to larger instances or always-on or multi-AZ services. In AWS, architecture decisions equal cost decisions. So you have to think financially.</p><h4>4. Over-Engineering</h4><p>Just because AI can generate a 12service architecture doesn’t mean you need one. Most times, simplicity is the way to go.</p><h4>The Bigger Picture</h4><p>Cloud roles are evolving and AI familiarity is quietly becoming an expected skill. In order to thrive, you need to not only think architecturally but also leverage AI strategically.</p><h4>What’s Next?</h4><p>In my next article, I’ll walk through a hands-on implementation of vibe coding in AWS. We’ll design a real-world architecture, use AI to scaffold infrastructure, evaluate cost, deploy strategically.</p><p>Stay Tuned.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aff0b1023ac6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Secret to AWS Security? Don’t Store Secrets.]]></title>
            <link>https://aws.plainenglish.io/the-secret-to-aws-security-dont-store-secrets-4fd95e880659?source=rss-538c281c70c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/4fd95e880659</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Stephanie Batanwi]]></dc:creator>
            <pubDate>Tue, 18 Nov 2025 17:11:11 GMT</pubDate>
            <atom:updated>2025-11-18T17:11:11.362Z</atom:updated>
            <content:encoded><![CDATA[<h4>Here’s What I Built Instead: A hands-on guide to creating a secure, secret-free AWS environment using IAM roles, tight policies, and Secrets Manager.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*wMhPvjbBowjoMtIV_3m4EA@2x.jpeg" /></figure><p>Security on AWS always starts with one uncomfortable truth: the easiest secrets to secure are the ones you never store.</p><p>And if you must store them? Store them in the safest possible way.</p><p>In this guide, I’ll walk you through the real-world project I built to eliminate hard-coded credentials entirely using IAM roles, scoped-down IAM policies, and AWS Secrets Manager. This approach is production-ready, aligns with AWS Well-Architected best practices, and is something any Cloud Engineer or DevOps Engineer should know.</p><p>Let’s dive into the architecture, the security decisions, and the exact steps you can recreate.</p><h4>Why “No Secrets Stored” Is the Real Goal</h4><p>Every major AWS breach you’ve heard of involved one pattern:</p><p>Leaked credentials.</p><p>Whether exposed on GitHub, embedded in Lambda code, or committed inside Docker images. Once an attacker has your keys, your cloud is theirs.</p><p>I used to worry about rotating credentials constantly. Then I discovered something better: Use IAM roles so your applications never handle long-term credentials at all.</p><p>Roles solve 80% of security headaches by giving AWS services temporary, auto-rotated, least-privileged credentials.</p><p>The remaining 20%?</p><p>For those unavoidable secrets (API tokens, DB passwords), you store them in Secrets Manager, not in your code.</p><h4>What I Built: A Secure, Secret-Free AWS Serverless Application</h4><p>I built a small serverless workflow that pulls data from an external API, processes it in Lambda, and stores results in DynamoDB with zero hard-coded secrets.</p><h4>The setup looked like this:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/303/1*fx4J7yTPy5JUjCQXH4ni_Q@2x.jpeg" /><figcaption>Architecture diagram</figcaption></figure><blockquote>Lean, secure, scalable.</blockquote><p>•	Lambda with no static credentials</p><p>•	IAM Role attached to Lambda (with least-privilege permissions)</p><p>•	Secrets Manager storing one external API key</p><p>•	VPC Endpoint for Secrets Manager (no internet exposure)</p><p>•	Python Lambda function retrieving the secret at runtime</p><p>•	CloudWatch Logs + KMS encryption</p><blockquote>Everything accesses everything else using temporary role credentials not stored secrets.</blockquote><h4>Step 1: Build an IAM Execution Role With Tight Policies</h4><p>The Lambda execution role is the heart of the setup.</p><p>Here’s the “just enough access” policy I attached:</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Allow&quot;,<br>      &quot;Action&quot;: [<br>        &quot;dynamodb:PutItem&quot;,<br>        &quot;dynamodb:UpdateItem&quot;<br>      ],<br>      &quot;Resource&quot;: &quot;arn:aws:dynamodb:ca-central-1:123456789012:table/MyAppTable&quot;<br>    },<br>    {<br>      &quot;Effect&quot;: &quot;Allow&quot;,<br>      &quot;Action&quot;: [<br>        &quot;secretsmanager:GetSecretValue&quot;<br>      ],<br>      &quot;Resource&quot;: &quot;arn:aws:secretsmanager:ca-central-1:123456789012:secret:MyAPIKey-*&quot;<br>    }<br>  ]<br>}</pre><blockquote>No * wildcards, No admin-level privileges ,Just the exact permissions the function needs.</blockquote><h4>Best practice:</h4><ul><li>Avoid giving Lambda full Secrets Manager access</li><li>Restrict access to specific ARNs</li><li>Enforce KMS key restrictions where possible</li></ul><h4>Step 2: Create the Secret in Secrets Manager</h4><p>I stored the external API key like this:</p><p><strong>Secret Name</strong>: MyAPIKey</p><p><strong>Secret Value:</strong></p><pre>{<br>  &quot;api_key&quot;: &quot;YOUR-TOKEN-HERE&quot;<br>}</pre><p>Then I enabled:</p><ul><li>Automatic rotation (30 days)</li><li>Encryption using a customer-managed KMS key</li><li>Resource policy locking down which roles can read it</li></ul><h4>Step 3: Secure Access Using a VPC Endpoint</h4><p>This is the part most people miss.</p><p>If your Lambda runs in a VPC, you don’t want it hitting the public internet to reach Secrets Manager.</p><p>So I added:</p><pre>com.amazonaws.ca-central-1.secretsmanager<br></pre><p>as an Interface VPC Endpoint, ensuring:</p><ul><li>No outbound internet needed</li><li>Access is internal and private</li><li>Traffic stays within AWS’s network</li><li>VPC security groups control access</li></ul><p>This is an AWS security gold standard.</p><h4>Step 4: Write Lambda Code That Retrieves Secrets Securely</h4><p>Here’s the production-grade Python snippet I used:</p><pre>import boto3<br>import json<br><br>def lambda_handler(event, context):<br>    secrets_client = boto3.client(&quot;secretsmanager&quot;)<br>    <br>    response = secrets_client.get_secret_value(<br>        SecretId=&quot;MyAPIKey&quot;<br>    )<br>    <br>    secret = json.loads(response[&quot;SecretString&quot;])<br>    api_key = secret[&quot;api_key&quot;]<br><br>    # Example use-case: calling an external API<br>    results = call_external_service(api_key)<br>    store_results_in_dynamodb(results)<br>    <br>    return {<br>        &quot;status&quot;: &quot;success&quot;,<br>        &quot;message&quot;: &quot;Data processed securely&quot;<br>    }</pre><p>Notice what’s missing?</p><ul><li>No passwords in the code</li><li>No environment variables with secrets</li><li>No static credentials</li></ul><p>All secrets come from a secure, controlled, encrypted source — only when the function needs them.</p><h4>Step 5: Monitor Everything With CloudWatch and IAM Access Analyzer</h4><p>In production, good security = visibility.</p><p>I enabled:</p><p><strong>CloudWatch Alarms</strong></p><p>•	Lambda errors</p><p>•	Secrets Manager throttles</p><p>•	IAM role STS session failures</p><p><strong>Access Analyzer</strong></p><p>•	Alerts on overly broad resource policies</p><p>•	Findings on unintended public access</p><p>•	Verification that only my Lambda role could read the secret</p><blockquote>This is where most teams fall short, security doesn’t stop after deployment.</blockquote><h4>What I Learned Building This</h4><ol><li>IAM roles remove 90% of credential management. Temporary credentials = no secret leaks.</li></ol><p>2. Secrets Manager fills the last gap: For the few secrets you must use, this keeps them safe.</p><p>3. VPC Endpoints : drastically reduced attack surface</p><p>No more exposure to the public internet.</p><p>4. Least-privilege IAM policies matter more than people think</p><p>The smaller the blast radius, the safer you are.</p><p>5. Good logging + monitoring is non-negotiable</p><p>Security doesn’t end when you deploy, it begins.</p><h4>Final Thoughts:</h4><p>When you stop embedding secrets and start architecting around identity, everything gets easier: deployments become safer, breaches become less likely, and compliance becomes automatic.</p><p>If you’re building on AWS in 2025, this approach isn’t optional, it’s the new baseline. And once you adopt it, you’ll wonder how you ever shipped code with hard-coded credentials at all.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4fd95e880659" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/the-secret-to-aws-security-dont-store-secrets-4fd95e880659">The Secret to AWS Security? Don’t Store Secrets.</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“Beyond Lift and Shift: How AWS Migration and Modernization Drive Real Cloud Transformation “]]></title>
            <link>https://medium.com/@Stephanie_Batanwi/beyond-lift-and-shift-how-aws-migration-and-modernization-drive-real-cloud-transformation-a87fd0e6b445?source=rss-538c281c70c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/a87fd0e6b445</guid>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[aws-in-plain-english]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud-migration]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Stephanie Batanwi]]></dc:creator>
            <pubDate>Thu, 23 Oct 2025 13:30:13 GMT</pubDate>
            <atom:updated>2025-10-23T13:30:13.887Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*CFlccFkGTNS8BtMg3gsz4g@2x.jpeg" /></figure><p>In today’s digital economy, every second of downtime, every monolithic/isolated system and every legacy dependency costs businesses time, money and opportunity. The pressure to do more with less; to innovate, automate and scale has made cloud migration and modernization a strategic imperative, not a technical luxury.</p><p>Cloud transformation however, isn’t just about moving servers to the cloud. It’s about re-engineering how you build, run and evolve your business. That’s where AWS leads the way, offering both the tools and frameworks that help organizations migrate confidently and modernize intelligently.</p><blockquote>“Migration brings you to the cloud.Modernization helps you stay competitive.”</blockquote><h3>Migration : Move with Confidence</h3><p>Migration involves moving workloads (applications, data and infrastructure) from on-premises or other clouds into AWS.</p><p>This can take several forms:</p><ul><li>Rehost (“Lift and Shift”); Move as-is with minimal changes using AWS Application Migration Service (MGN)</li><li>Replatform (“lift and optimize”) ; migrate and make small adjustments like moving from self-managed SQL to Amazon RDS.</li><li>Repurchase ; replace legacy software with SaaS offerings hosted on AWS.</li></ul><h3>Modernization : Transforming for Agility</h3><p>Modernization goes beyond migration. It’s about refactoring applications to leverage modern AWS services like:</p><ul><li>AWS Lambda for event-driven serverless compute</li><li>Amazon ECS and EKS for containerized workloads</li><li>Amazon Aurora for cloud-native, self-healing databases</li><li>AWS Step functions for workflow orchestration.</li></ul><p>Together, these two pillars help enterprises reduce technical debt, increase agility, and accelerate innovation.</p><h3>The AWS Approach: Tools, Frameworks, and Programs</h3><p>AWS does not let you figure it out alone , it provides a rich ecosystem of services and structured frameworks designed to reduce risk and accelerate results.</p><h4>1. AWS Migration Acceleration Program (MAP)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/297/1*GSEYtvz0Nl4h9UbNX9y8NQ@2x.jpeg" /></figure><p>It’s a comprehensive three-phase approach which includes:</p><ul><li>Assess: Evaluate readiness using the AWS cloud adoption framework (CAF)</li><li>Mobilize: Build a landing zone, align stakeholders, and set up governance.</li><li>Migrate and Modernize: Execute migrations with automation tools and best practices.</li></ul><h4>2. AWS Migration Hub</h4><p>A central dashboard to track migration progress and performance across multiple tools and teams.</p><h4>3. AWS Application Migration Service (MGN)</h4><p>Automates reposting from physical, virtual or cloud servers with minimal downtime.</p><h4>4. Modernization Workbench</h4><p>For analysis, dependency mapping, and refactoring recommendations to move from monoliths to microservices.</p><h4>5. AWS Well-Architected Framework</h4><p>Ensures your workloads are secure, efficient, reliable, cost- optimized and sustainable post-migration.</p><h3>Benefits of Migrating and Modernizing with AWS</h3><ul><li>Cost Optimization : Pay only for what you use ; no upfront costs. Save on hardware, maintenance and licensing costs.</li><li>Agility and Innovation: Modern architectures accelerate development and time-to-market.</li><li>Scalability: auto-scaling and managed services adapt to demand with no downtime</li><li>Security: Enterprise-grade protection with ISM, encryption and compliance</li><li>Resilience: Built-in redundancy and disaster recovery across AWS regions.</li><li>Sustainability: AWS infrastructure is designed for lower carbon intensity than on-premises data centers.</li><li>Innovation : Once modernized, workloads can easily integrate with AWS AI and ML services.</li></ul><h3>Real-World Example</h3><p>CBIHealth Canada, a Canadian healthcare provider with over 13000 team members who provide home health and outpatient rehabilitation to approximately 12million Canadians each year. Migrated 100% of its legacy infrastructure (500+ servers, 70TB of data) to AWS in under 3months using AWS Experience-Based Acceleration (AWS EBA), which is used to build cloud foundations, migrate at scale, modernize businesses and innovate with an outcome-focused transformation methodology. As a result, they were able to reduce infrastructure cost by about 60% and technology footprint by 75%.</p><p>That’s the power of combining migration discipline with modernization strategy.</p><h3>AWS Workshops You Can Try</h3><p>If you want to explore migration and modernization yourself, AWS offers free, guided labs and workshops:</p><ul><li><a href="https://catalog.workshops.aws/well-architected-migration/en-US">Migrate the AWS Well-Architected Way</a></li><li><a href="https://catalog.workshops.aws/databasemigration/en-US">AWS Database Migration Workshop</a></li><li><a href="https://workshops.aws/card/.NET%20Application%20Modernization">.NET Application Modernization</a></li></ul><p>Each lab walks you through real-world migration paths from assessment to re-architecture using AWS tools step by step.</p><h3>Key Takeaway</h3><p>Migrating to the cloud is no longer a milestone, it’s a starting point, pathways to resilience, growth and innovation in a rapidly evolving tech economy.</p><p>With AWS’ deep portfolio of migration tools, modernization frameworks and hands-on programs, organizations of all sizes can move forward with confidence. Transforming not just their IT but their entire business.</p><blockquote>“Their journey doesn’t end with migration, it begins with modernization.”</blockquote><h3>References and Resources</h3><ul><li><a href="https://aws.amazon.com/migration-hub/">AWS Migration Hub</a></li><li><a href="https://aws.amazon.com/professional-services/CAF/">AWS Cloud Adoption Framework</a></li><li><a href="https://wellarchitectedlabs.com/">AWS Well-Architected Lab</a></li><li><a href="https://aws.amazon.com/migration-acceleration-program/">AWS Migration Acceleration Program (MAP)</a></li><li><a href="https://workshops.aws/">AWS Workshops Portal</a></li></ul><p>If you found this helpful , tap 👏🏽 and share your thoughts on modernization. Follow for more AWs and Cloud transformation insights.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a87fd0e6b445" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“Stack Smarter, Not Harder: Your 3-Tier AWS Architecture with Terraform”]]></title>
            <link>https://medium.com/@Stephanie_Batanwi/stack-smarter-not-harder-your-3-tier-aws-architecture-with-terraform-28705e7a3b3b?source=rss-538c281c70c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/28705e7a3b3b</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-architecture]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[infrastructure-as-code]]></category>
            <dc:creator><![CDATA[Stephanie Batanwi]]></dc:creator>
            <pubDate>Fri, 17 Oct 2025 06:29:21 GMT</pubDate>
            <atom:updated>2025-10-17T06:29:21.664Z</atom:updated>
            <content:encoded><![CDATA[<h4>A Step-by-Step Guide to deploy a production-ready AWS environment that includes VPC, ALB, Auto Scaling EC2 instances, RDS database, and CloudWatch monitoring.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*ZexrMwXU0ZIcLfm8SGOcPQ@2x.jpeg" /></figure><p>If you’ve ever wondered how large-scale web applications run seamlessly on AWS, this workshop is your roadmap. In this step-by-step guide, we’ll use Terraform to build a complete production-ready 3-tier architecture from the ground up. You’ll create a custom VPC, public and private subnets, an Application Load Balancer (ALB), an Auto Scaling Group (ASG) of EC2 instances, and a managed RDS database, all tied together with CloudWatch alarms for automated scaling.</p><h3>Prerequisites</h3><p>Before you begin, make sure you have the following:</p><p>•	An AWS account with admin or PowerUser privileges.</p><p>•	Terraform installed on your local machine.</p><p>•	Basic familiarity with Terraform syntax (HCL) and AWS fundamentals.</p><p>•	An IAM user with administrative privileges</p><p>•	A terminal (Mac/Linux) or PowerShell (Windows) configured with aws configure.</p><h3>Project Overview:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/336/1*F5ISgaKj4ZlRh-BNRp7yuA@2x.jpeg" /></figure><p>We’ll build a complete 3-tier web application infrastructure:</p><ul><li>Network tier: a secure, multi-AZ VPC with public and private subnets.</li><li>Application tier: EC2 instances running behind an Application Load Balancer (ALB) in an Auto Scaling Group (ASG).</li><li>Data tier: a managed Amazon RDS instance in private subnets, accessible only from the app layer.</li></ul><p>You’ll also learn to wire up CloudWatch alarms that scale your ASG automatically when CPU utilization rises or falls</p><h4>Project structure</h4><p>Put all the files below inside that folder (one code block = one file).</p><blockquote>Folder name suggestion: terraform-aws-3tier/</blockquote><p>You’ll organize your Terraform project as follows:</p><pre>terraform-aws-3tier/<br>├── 00-network.tf           # VPC, subnets, routes<br>├── 10-web-alb.tf           # Application Load Balancer<br>├── 20-app-asg.tf           # EC2 Auto Scaling Group<br>├── 30-db-rds.tf            # RDS Database<br>├── 40-monitoring-scaling.tf# CloudWatch + Scaling Policies<br>├── variables.tf            # Variables<br>├── providers.tf            # Providers + Backend config<br>├── outputs.tf              # Outputs<br>└── user_data.sh            # EC2 bootstrap script</pre><p>This modular structure mirrors how professional DevOps teams structure Terraform projects, keeping your network, compute, and data layers cleanly separated.</p><h3>Providers, variables &amp; outputs</h3><p>providers.tf</p><pre>terraform {<br>  required_version = &quot;&gt;= 1.6.0&quot;<br>  required_providers {<br>    aws = {<br>      source  = &quot;hashicorp/aws&quot;<br>      version = &quot;&gt;= 5.0&quot;<br>    }<br>  }<br>}<br><br>provider &quot;aws&quot; {<br>  region = var.aws_region<br>}</pre><p>variables.tf</p><pre>variable &quot;project&quot;        { description = &quot;Prefix for all resources&quot;; type = string; default = &quot;three-tier&quot; }<br>variable &quot;aws_region&quot;     { description = &quot;AWS region&quot;; type = string; default = &quot;us-east-1&quot; }<br><br>variable &quot;vpc_cidr&quot;       { description = &quot;CIDR for the VPC&quot;; type = string; default = &quot;10.0.0.0/16&quot; }<br>variable &quot;az_count&quot;       { description = &quot;Number of AZs&quot;; type = number; default = 2 }<br>variable &quot;public_subnet_bits&quot; { description = &quot;cidrsubnet bits for public&quot;; type = number; default = 4 }<br>variable &quot;app_subnet_bits&quot;    { description = &quot;cidrsubnet bits for app&quot;; type = number; default = 4 }<br>variable &quot;db_subnet_bits&quot;     { description = &quot;cidrsubnet bits for db&quot;; type = number; default = 4 }<br><br>variable &quot;instance_type&quot;  { description = &quot;EC2 instance type&quot;; type = string; default = &quot;t3.micro&quot; }<br>variable &quot;desired_capacity&quot; { description = &quot;ASG desired&quot;; type = number; default = 2 }<br>variable &quot;min_size&quot;         { description = &quot;ASG min&quot;; type = number; default = 2 }<br>variable &quot;max_size&quot;         { description = &quot;ASG max&quot;; type = number; default = 4 }<br>variable &quot;key_name&quot;         { description = &quot;Optional EC2 key pair&quot;; type = string; default = &quot;&quot; }<br><br>variable &quot;db_engine&quot;      { description = &quot;postgres or mysql&quot;; type = string; default = &quot;postgres&quot; }<br>variable &quot;db_engine_version&quot; { description = &quot;DB engine version&quot;; type = string; default = &quot;15&quot; }<br>variable &quot;db_instance_class&quot; { description = &quot;RDS class&quot;; type = string; default = &quot;db.t3.micro&quot; }<br>variable &quot;db_name&quot;        { description = &quot;DB name&quot;; type = string; default = &quot;appdb&quot; }<br>variable &quot;db_username&quot;    { description = &quot;DB user&quot;; type = string; default = &quot;appuser&quot; }<br>variable &quot;db_password&quot;    { description = &quot;DB password (use env/secret)&quot;; type = string; sensitive = true }<br><br>variable &quot;health_check_path&quot;      { description = &quot;ALB health path&quot;; type = string; default = &quot;/&quot; }<br>variable &quot;cpu_scale_out_threshold&quot; { description = &quot;ASG avg CPU% to scale out&quot;; type = number; default = 60 }<br>variable &quot;cpu_scale_in_threshold&quot;  { description = &quot;ASG avg CPU% to scale in&quot;; type = number; default = 25 }</pre><p>Outputs.tf</p><pre>output &quot;alb_dns_name&quot;   { description = &quot;Public URL for the app&quot;; value = aws_lb.this.dns_name }<br>output &quot;rds_endpoint&quot;   { description = &quot;Private RDS endpoint&quot;;   value = aws_db_instance.this.address }<br>output &quot;app_asg_name&quot;   { description = &quot;Auto Scaling Group name&quot;; value = aws_autoscaling_group.app_asg.name }</pre><p>Let’s start with the Network Tier, where we’ll design the foundation which is your VPC, subnets, and routing, all in Terraform.</p><h3>Tier 1: Network Layer (VPC &amp; Subnets)</h3><p>Every strong cloud architecture starts with a solid network foundation.</p><p>In this first tier, we’ll create a Virtual Private Cloud (VPC) with public, private-app, and private-DB subnets spread across two Availability Zones.</p><p>We’ll also configure routing so internet traffic reaches only your public layer.</p><blockquote>00-network.tf</blockquote><pre>data &quot;aws_availability_zones&quot; &quot;available&quot; {<br>  state = &quot;available&quot;<br>}<br><br>locals {<br>  azs = slice(data.aws_availability_zones.available.names, 0, var.az_count)<br>}<br><br>resource &quot;aws_vpc&quot; &quot;this&quot; {<br>  cidr_block           = var.vpc_cidr<br>  enable_dns_support   = true<br>  enable_dns_hostnames = true<br>  tags = { Name = &quot;${var.project}-vpc&quot; }<br>}<br><br>resource &quot;aws_internet_gateway&quot; &quot;igw&quot; {<br>  vpc_id = aws_vpc.this.id<br>  tags   = { Name = &quot;${var.project}-igw&quot; }<br>}<br><br># Public subnets (ALB + NAT)<br>resource &quot;aws_subnet&quot; &quot;public&quot; {<br>  for_each = { for idx, az in local.azs : idx =&gt; az }<br>  vpc_id                  = aws_vpc.this.id<br>  availability_zone       = each.value<br>  cidr_block              = cidrsubnet(var.vpc_cidr, var.public_subnet_bits, tonumber(each.key))<br>  map_public_ip_on_launch = true<br>  tags = { Name = &quot;${var.project}-public-${each.value}&quot;, Tier = &quot;public&quot; }<br>}<br><br># Private app subnets<br>resource &quot;aws_subnet&quot; &quot;app&quot; {<br>  for_each = { for idx, az in local.azs : idx =&gt; az }<br>  vpc_id            = aws_vpc.this.id<br>  availability_zone = each.value<br>  cidr_block        = cidrsubnet(var.vpc_cidr, var.app_subnet_bits, tonumber(each.key) + 16)<br>  tags = { Name = &quot;${var.project}-app-${each.value}&quot;, Tier = &quot;private-app&quot; }<br>}<br><br># Private DB subnets<br>resource &quot;aws_subnet&quot; &quot;db&quot; {<br>  for_each = { for idx, az in local.azs : idx =&gt; az }<br>  vpc_id            = aws_vpc.this.id<br>  availability_zone = each.value<br>  cidr_block        = cidrsubnet(var.vpc_cidr, var.db_subnet_bits, tonumber(each.key) + 32)<br>  tags = { Name = &quot;${var.project}-db-${each.value}&quot;, Tier = &quot;private-db&quot; }<br>}<br><br># Public RT → IGW<br>resource &quot;aws_route_table&quot; &quot;public&quot; {<br>  vpc_id = aws_vpc.this.id<br>  tags   = { Name = &quot;${var.project}-public-rt&quot; }<br>}<br>resource &quot;aws_route&quot; &quot;public_to_internet&quot; {<br>  route_table_id         = aws_route_table.public.id<br>  destination_cidr_block = &quot;0.0.0.0/0&quot;<br>  gateway_id             = aws_internet_gateway.igw.id<br>}<br>resource &quot;aws_route_table_association&quot; &quot;public_assoc&quot; {<br>  for_each       = aws_subnet.public<br>  subnet_id      = each.value.id<br>  route_table_id = aws_route_table.public.id<br>}<br><br># One NAT (cost-saving; not HA)<br>resource &quot;aws_eip&quot; &quot;nat&quot; {<br>  domain = &quot;vpc&quot;<br>  tags   = { Name = &quot;${var.project}-nat-eip&quot; }<br>}<br>resource &quot;aws_nat_gateway&quot; &quot;nat&quot; {<br>  allocation_id = aws_eip.nat.id<br>  subnet_id     = values(aws_subnet.public)[0].id<br>  tags          = { Name = &quot;${var.project}-nat&quot; }<br>  depends_on    = [aws_internet_gateway.igw]<br>}<br><br># App RT → NAT<br>resource &quot;aws_route_table&quot; &quot;app&quot; {<br>  vpc_id = aws_vpc.this.id<br>  tags   = { Name = &quot;${var.project}-app-rt&quot; }<br>}<br>resource &quot;aws_route&quot; &quot;app_to_internet_via_nat&quot; {<br>  route_table_id         = aws_route_table.app.id<br>  destination_cidr_block = &quot;0.0.0.0/0&quot;<br>  nat_gateway_id         = aws_nat_gateway.nat.id<br>}<br>resource &quot;aws_route_table_association&quot; &quot;app_assoc&quot; {<br>  for_each       = aws_subnet.app<br>  subnet_id      = each.value.id<br>  route_table_id = aws_route_table.app.id<br>}<br><br># DB RT (no Internet route)<br>resource &quot;aws_route_table&quot; &quot;db&quot; {<br>  vpc_id = aws_vpc.this.id<br>  tags   = { Name = &quot;${var.project}-db-rt&quot; }<br>}<br>resource &quot;aws_route_table_association&quot; &quot;db_assoc&quot; {<br>  for_each       = aws_subnet.db<br>  subnet_id      = each.value.id<br>  route_table_id = aws_route_table.db.id<br>}</pre><h4>Step 1: Define the VPC and Availability Zones</h4><p>We’ll fetch the available AZs and carve out a new VPC that supports DNS for easier host resolution.</p><p>What happens is Terraform dynamically grabs your region’s AZs and limits them to the number you define (usually 2).</p><h4>Step 2: Internet Gateway and Public Subnets</h4><p>Public subnets host internet-facing resources which in our case are the Application Load Balancer and the NAT Gateway.</p><p>The cidrsubnet() function automatically divides your VPC into smaller subnets, keeping your configuration flexible if you add more AZs later.</p><h4>Step 3: Private Subnets for App &amp; DB Tiers</h4><p>These are isolated zones, the app servers live in one, the database in another with no public IPs. Isolation improves security and blast-radius control. If an app instance is compromised, your database stays protected in its own subnet and SG.</p><h4>Step 4: Route Tables &amp; NAT Gateway</h4><p>We’ll create route tables that decide how traffic flows:</p><p>•	Public RT: sends traffic to the Internet Gateway.</p><p>•	App RT: routes outbound traffic through a single NAT Gateway.</p><p>•	DB RT: has no outbound internet route.</p><blockquote>Tip: NAT Gateways charge hourly + per-GB, so one shared NAT keeps this tutorial low-cost. In production, you’d deploy one per AZ for full high availability.</blockquote><p>You now have a multi-AZ network foundation: public, app, and DB layers.Internet access is tightly scoped to the public layer only, Your app and database subnets are private,invisible from the Internet but able to reach out via NAT gateways.</p><p>The groundwork is ready for higher tiers to plug in cleanly.</p><h3>Web Layer (Application Load Balancer)</h3><p>Your Web Layer acts as the front door of your architecture — safely exposing your app to the Internet.</p><p>Here, we’ll create an Application Load Balancer (ALB) that listens on port 80 (HTTP) and forwards traffic to your private app instances.</p><blockquote>10- web-alb.tf</blockquote><pre># Security Group for ALB: allow HTTP from anywhere<br>resource &quot;aws_security_group&quot; &quot;alb_sg&quot; {<br>  name        = &quot;${var.project}-alb-sg&quot;<br>  description = &quot;Allow HTTP from Internet&quot;<br>  vpc_id      = aws_vpc.this.id<br><br>  ingress {<br>    description      = &quot;HTTP from anywhere&quot;<br>    from_port        = 80<br>    to_port          = 80<br>    protocol         = &quot;tcp&quot;<br>    cidr_blocks      = [&quot;0.0.0.0/0&quot;]<br>    ipv6_cidr_blocks = [&quot;::/0&quot;]<br>  }<br><br>  egress {<br>    from_port        = 0<br>    to_port          = 0<br>    protocol         = &quot;-1&quot;<br>    cidr_blocks      = [&quot;0.0.0.0/0&quot;]<br>    ipv6_cidr_blocks = [&quot;::/0&quot;]<br>  }<br><br>  tags = { Name = &quot;${var.project}-alb-sg&quot; }<br>}<br><br># ALB + Target Group + Listener<br>resource &quot;aws_lb&quot; &quot;this&quot; {<br>  name               = &quot;${var.project}-alb&quot;<br>  load_balancer_type = &quot;application&quot;<br>  security_groups    = [aws_security_group.alb_sg.id]<br>  subnets            = [for s in aws_subnet.public : s.id]<br>  idle_timeout       = 60<br>  tags               = { Name = &quot;${var.project}-alb&quot; }<br>}<br><br>resource &quot;aws_lb_target_group&quot; &quot;app_tg&quot; {<br>  name     = &quot;${var.project}-tg&quot;<br>  port     = 80<br>  protocol = &quot;HTTP&quot;<br>  vpc_id   = aws_vpc.this.id<br><br>  health_check {<br>    healthy_threshold   = 2<br>    unhealthy_threshold = 3<br>    interval            = 15<br>    path                = var.health_check_path<br>    port                = &quot;traffic-port&quot;<br>    timeout             = 5<br>    matcher             = &quot;200-399&quot;<br>  }<br><br>  tags = { Name = &quot;${var.project}-tg&quot; }<br>}<br><br>resource &quot;aws_lb_listener&quot; &quot;http&quot; {<br>  load_balancer_arn = aws_lb.this.arn<br>  port              = 80<br>  protocol          = &quot;HTTP&quot;<br><br>  default_action {<br>    type             = &quot;forward&quot;<br>    target_group_arn = aws_lb_target_group.app_tg.arn<br>  }<br>}</pre><h4>Step 1: Create a Security Group for the ALB</h4><p>This group allows inbound HTTP traffic from the world and outbound traffic to anywhere.</p><h4>Step 2: Create the Load Balancer, Target Group, and Listener</h4><p>ALBs operate at Layer 7 (HTTP/HTTPS) and support features like path-based routing, host-based routing, and integrated WAF which is ideal for modern web apps.</p><blockquote>You now have a secure, managed entry point into your architecture.</blockquote><h3>Tier 2: Application Layer (EC2 + Auto Scaling Group)</h3><p>This is the heart of your architecture where the application runs.</p><p>We’ll use EC2 Auto Scaling to ensure the app can grow or shrink based on demand. The app servers live in private app subnets, receive traffic only from the ALB, and egress to the Internet via NAT for updates. We’ll bootstrap a simple nginx page.</p><blockquote>20- app-sag.tf</blockquote><pre># SG for App: allow HTTP only from ALB SG<br>resource &quot;aws_security_group&quot; &quot;app_sg&quot; {<br>  name        = &quot;${var.project}-app-sg&quot;<br>  description = &quot;Allow HTTP from ALB&quot;<br>  vpc_id      = aws_vpc.this.id<br><br>  ingress {<br>    description     = &quot;HTTP from ALB&quot;<br>    from_port       = 80<br>    to_port         = 80<br>    protocol        = &quot;tcp&quot;<br>    security_groups = [aws_security_group.alb_sg.id]<br>  }<br><br>  egress {<br>    from_port        = 0<br>    to_port          = 0<br>    protocol         = &quot;-1&quot;<br>    cidr_blocks      = [&quot;0.0.0.0/0&quot;]<br>    ipv6_cidr_blocks = [&quot;::/0&quot;]<br>  }<br><br>  tags = { Name = &quot;${var.project}-app-sg&quot; }<br>}<br><br># Amazon Linux 2023 AMI<br>data &quot;aws_ami&quot; &quot;al2023&quot; {<br>  most_recent = true<br>  owners      = [&quot;137112412989&quot;] # Amazon<br>  filter { name = &quot;name&quot;; values = [&quot;al2023-ami-*-x86_64&quot;] }<br>}<br><br>resource &quot;aws_launch_template&quot; &quot;app_lt&quot; {<br>  name_prefix   = &quot;${var.project}-lt-&quot;<br>  image_id      = data.aws_ami.al2023.id<br>  instance_type = var.instance_type<br><br>  user_data = base64encode(file(&quot;${path.module}/user_data.sh&quot;))<br><br>  vpc_security_group_ids = [aws_security_group.app_sg.id]<br>  update_default_version = true<br><br>  dynamic &quot;key_name&quot; {<br>    for_each = var.key_name == &quot;&quot; ? [] : [var.key_name]<br>    content { key_name = var.key_name }<br>  }<br><br>  tag_specifications {<br>    resource_type = &quot;instance&quot;<br>    tags = { Name = &quot;${var.project}-app&quot;, Tier = &quot;app&quot; }<br>  }<br>}<br><br>resource &quot;aws_autoscaling_group&quot; &quot;app_asg&quot; {<br>  name                      = &quot;${var.project}-asg&quot;<br>  max_size                  = var.max_size<br>  min_size                  = var.min_size<br>  desired_capacity          = var.desired_capacity<br>  vpc_zone_identifier       = [for s in aws_subnet.app : s.id]<br>  health_check_type         = &quot;EC2&quot;<br>  health_check_grace_period = 90<br><br>  launch_template {<br>    id      = aws_launch_template.app_lt.id<br>    version = &quot;$Latest&quot;<br>  }<br><br>  target_group_arns = [aws_lb_target_group.app_tg.arn]<br><br>  tag {<br>    key                 = &quot;Name&quot;<br>    value               = &quot;${var.project}-app&quot;<br>    propagate_at_launch = true<br>  }<br><br>  lifecycle { create_before_destroy = true }<br>}<br></pre><h4>Step 1: Create the App Security Group</h4><p>It allows HTTP traffic only from the ALB.</p><h4>Step 2: Define the EC2 Launch Template</h4><p>This defines the instance configuration (AMI, size, user data, security group, etc.).</p><blockquote>user_data.sh</blockquote><pre>#!/bin/bash<br>set -xe<br>dnf -y update<br>dnf -y install nginx<br><br>INSTANCE_ID=$(curl -s http://169.254.169.254/latest/meta-data/instance-id || echo &quot;unknown&quot;)<br>HOSTNAME=$(hostname)<br><br>cat &gt;/usr/share/nginx/html/index.html &lt;&lt;EOF<br>&lt;html&gt;<br>  &lt;head&gt;&lt;title&gt;Three-Tier App&lt;/title&gt;&lt;/head&gt;<br>  &lt;body style=&quot;font-family: sans-serif;&quot;&gt;<br>    &lt;h1&gt;It works 🎉&lt;/h1&gt;<br>    &lt;p&gt;Instance: $INSTANCE_ID / $HOSTNAME&lt;/p&gt;<br>    &lt;p&gt;Tier: App → served by nginx on EC2 behind an ALB&lt;/p&gt;<br>  &lt;/body&gt;<br>&lt;/html&gt;<br>EOF<br><br>systemctl enable nginx<br>systemctl start nginx</pre><blockquote>The user data ensures each instance configures itself on boot with no manual setup needed.</blockquote><h4>Step 3: Create the Auto Scaling Group (ASG)</h4><p>Attach it to the target group from the ALB for load balancing.</p><h3>Tier 3: Data Layer (RDS)</h3><p>The data tier stores your persistent application data.</p><p>We’ll deploy a PostgreSQL RDS instance that only your app servers can access.</p><blockquote>30-db-rds.tf</blockquote><pre># SG for DB: allow traffic from App SG on DB port<br>resource &quot;aws_security_group&quot; &quot;db_sg&quot; {<br>  name        = &quot;${var.project}-db-sg&quot;<br>  description = &quot;DB access from app tier only&quot;<br>  vpc_id      = aws_vpc.this.id<br><br>  ingress {<br>    description     = &quot;DB from app&quot;<br>    from_port       = var.db_engine == &quot;postgres&quot; ? 5432 : 3306<br>    to_port         = var.db_engine == &quot;postgres&quot; ? 5432 : 3306<br>    protocol        = &quot;tcp&quot;<br>    security_groups = [aws_security_group.app_sg.id]<br>  }<br><br>  egress {<br>    from_port        = 0<br>    to_port          = 0<br>    protocol         = &quot;-1&quot;<br>    cidr_blocks      = [&quot;0.0.0.0/0&quot;]<br>    ipv6_cidr_blocks = [&quot;::/0&quot;]<br>  }<br><br>  tags = { Name = &quot;${var.project}-db-sg&quot; }<br>}<br><br>resource &quot;aws_db_subnet_group&quot; &quot;this&quot; {<br>  name       = &quot;${var.project}-db-subnets&quot;<br>  subnet_ids = [for s in aws_subnet.db : s.id]<br>  tags       = { Name = &quot;${var.project}-db-subnets&quot; }<br>}<br><br>resource &quot;aws_db_instance&quot; &quot;this&quot; {<br>  identifier_prefix       = &quot;${var.project}-db-&quot;<br>  engine                  = var.db_engine<br>  engine_version          = var.db_engine_version<br>  instance_class          = var.db_instance_class<br>  db_name                 = var.db_name<br>  username                = var.db_username<br>  password                = var.db_password<br>  allocated_storage       = 20<br>  max_allocated_storage   = 100<br>  storage_encrypted       = true<br>  multi_az                = false<br>  db_subnet_group_name    = aws_db_subnet_group.this.name<br>  vpc_security_group_ids  = [aws_security_group.db_sg.id]<br>  skip_final_snapshot     = true<br>  deletion_protection     = false<br>  publicly_accessible     = false<br>  backup_retention_period = 1<br>  apply_immediately       = true<br><br>  tags = { Name = &quot;${var.project}-db&quot; }<br>}</pre><h4>Step 1: Create a Database Security Group</h4><p>Allow only connections from the app layer on the right port.</p><h4>Step 2: Define the RDS Instance and Subnet Group</h4><p>The DB lives in private subnets, keeping your data secure and isolated. It’s only reachable from the app security group, not the Internet.</p><h3>Monitoring &amp; Auto Scaling Policies</h3><p>No production system is complete without monitoring and dynamic scaling.</p><p>We’ll use Amazon CloudWatch to watch CPU utilization and trigger scaling actions automatically.</p><p>40- monitoring-scaling.tf</p><pre>resource &quot;aws_autoscaling_policy&quot; &quot;scale_out&quot; {<br>  name                   = &quot;${var.project}-scale-out&quot;<br>  autoscaling_group_name = aws_autoscaling_group.app_asg.name<br>  adjustment_type        = &quot;ChangeInCapacity&quot;<br>  scaling_adjustment     = 1<br>  cooldown               = 120<br>  policy_type            = &quot;SimpleScaling&quot;<br>}<br><br>resource &quot;aws_cloudwatch_metric_alarm&quot; &quot;cpu_high&quot; {<br>  alarm_name          = &quot;${var.project}-cpu-high&quot;<br>  comparison_operator = &quot;GreaterThanOrEqualToThreshold&quot;<br>  evaluation_periods  = 2<br>  metric_name         = &quot;CPUUtilization&quot;<br>  namespace           = &quot;AWS/EC2&quot;<br>  period              = 60<br>  statistic           = &quot;Average&quot;<br>  threshold           = var.cpu_scale_out_threshold<br><br>  dimensions = {<br>    AutoScalingGroupName = aws_autoscaling_group.app_asg.name<br>  }<br><br>  alarm_description = &quot;Scale out when average CPU &gt;= ${var.cpu_scale_out_threshold}%&quot;<br>  alarm_actions     = [aws_autoscaling_policy.scale_out.arn]<br>}<br><br>resource &quot;aws_autoscaling_policy&quot; &quot;scale_in&quot; {<br>  name                   = &quot;${var.project}-scale-in&quot;<br>  autoscaling_group_name = aws_autoscaling_group.app_asg.name<br>  adjustment_type        = &quot;ChangeInCapacity&quot;<br>  scaling_adjustment     = -1<br>  cooldown               = 300<br>  policy_type            = &quot;SimpleScaling&quot;<br>}<br><br>resource &quot;aws_cloudwatch_metric_alarm&quot; &quot;cpu_low&quot; {<br>  alarm_name          = &quot;${var.project}-cpu-low&quot;<br>  comparison_operator = &quot;LessThanOrEqualToThreshold&quot;<br>  evaluation_periods  = 4<br>  metric_name         = &quot;CPUUtilization&quot;<br>  namespace           = &quot;AWS/EC2&quot;<br>  period              = 60<br>  statistic           = &quot;Average&quot;<br>  threshold           = var.cpu_scale_in_threshold<br><br>  dimensions = {<br>    AutoScalingGroupName = aws_autoscaling_group.app_asg.name<br>  }<br><br>  alarm_description = &quot;Scale in when average CPU &lt;= ${var.cpu_scale_in_threshold}%&quot;<br>  alarm_actions     = [aws_autoscaling_policy.scale_in.arn]<br>}</pre><h4>Step 1: Define Scaling Policies</h4><p>ASG policies ensure you always have enough capacity during spikes and save cost during idle times.</p><h4>Step 2: Create CloudWatch Alarms</h4><p>These alarms will invoke the scaling policies when CPU thresholds are crossed.</p><blockquote>Together, they make your architecture self-healing and elastic which are hallmarks of cloud-native design.</blockquote><p>Simple scaling policies tied to CloudWatch CPU on the ASG:</p><p>•	Scale out when avg CPU ≥ cpu_scale_out_threshold</p><p>•	Scale in when avg CPU ≤ cpu_scale_in_threshold</p><h4>How to run (copy-paste)</h4><pre># 0) Set DB password securely (example)<br>export TF_VAR_db_password=&#39;ChangeMe-Use-Secrets-Manager-In-Prod&#39;<br><br># 1) Init / plan / apply<br>terraform init<br>terraform plan -out plan.out<br>terraform apply plan.out<br><br># 2) Get the ALB DNS and open it<br>terraform output alb_dns_name</pre><p>Clean-up</p><pre>terraform destroy</pre><p>Congratulations! 🎉</p><p>You’ve successfully built and automated a 3-tier AWS architecture entirely with Terraform,no manual clicks, no console chaos.</p><p>By now, you’ve learned how to:</p><ul><li>Design a multi-AZ network foundation with secure subnet isolation.</li><li>Expose applications safely using Application Load Balancers.</li><li>Deploy Auto Scaling EC2 instances that self-configure on launch.</li><li>Secure your data tier with private Amazon RDS instances.</li><li>Automate scaling and monitoring using CloudWatch alarms.</li></ul><p>If you found this workshop helpful, give it a 👏 (clap) and follow me on Medium for more hands-on AWS and Terraform tutorials. Feel free to share your thoughts or questions in the comments</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28705e7a3b3b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Host a Static Website on AWS S3 + CloudFront (No Domains Needed)]]></title>
            <link>https://medium.com/@Stephanie_Batanwi/host-a-static-website-on-aws-s3-cloudfront-no-domains-needed-d5a87bab7991?source=rss-538c281c70c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5a87bab7991</guid>
            <category><![CDATA[aws-cloudfront]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-s3]]></category>
            <category><![CDATA[s3]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Stephanie Batanwi]]></dc:creator>
            <pubDate>Tue, 30 Sep 2025 03:38:05 GMT</pubDate>
            <atom:updated>2025-09-30T03:38:05.310Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>Go live globally in minutes with secure, low-cost, serverless hosting</em></strong></p><h3><strong>What you’ll build:</strong></h3><p>A secure static site hosted in S3 and served globally via CloudFront with HTTPS (using the default CloudFront domain, no custom domain required).</p><h3><strong>Why this stack:</strong></h3><p>lowest operational overhead, great performance, cheap at small scale, and follows current AWS best practices (private S3 + Origin Access Control).</p><h3><strong>Prerequisites:</strong></h3><p>•	An AWS account with permissions for S3 and CloudFront.</p><p>•	(Optional) AWS CLI configured (aws configure).</p><p>•	A small site folder (we’ll start with the provided index.html).</p><p>If you don’t have any files yet, grab this starter:</p><pre>Deployed with Amazon S3 + CloudFront<br>This is a minimal static site. If you can read this via a cloudfront.net URL, your distribution is working! 🎉<br>What next?<br>	•	Edit this file and upload changes to your S3 bucket.<br>	•	For instant updates, create a CloudFront invalidation for /*.<br>	•	Optional: add a custom domain and HTTPS with AWS Certificate Manager.<br>Quick invalidation (AWS CLI)<br>aws cloudfront create-invalidation --distribution-id &lt;DIST_ID&gt; --paths &quot;/*&quot;<br>© My Static Site<br></pre><h3>Step 1: Create the S3 bucket (Private)</h3><ul><li>Sign into AWS management console and sign in</li><li>Navigate to S3 and select the “Create bucket” button</li><li>choose a globally unique name, e.g. my-static-site-12345.</li><li>pick your preferred region (e.g., us-east-1; any works).</li><li>Block Public Access: Leave ON (all four boxes checked).</li><li>Bucket versioning: optional (helpful for rollbacks).</li><li>Click Create bucket.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vi3ORyUyG5vGPK2Mqmh53g@2x.jpeg" /></figure><p>Upload your site files:</p><p>•	Open the bucket → Upload → add index.html (and any assets) → Upload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9V7XyHoo2ifhhbhEYHtnqA@2x.jpeg" /></figure><p>We’re intentionally not enabling “Static website hosting” on S3. CloudFront will serve the content securely.</p><h3>Step 2: Create a CloudFront distribution with OAC</h3><ul><li>Navigate to CloudFront then select Create Distribution</li><li>Origin domain: Browse S3 then pick your S3 bucket (the bucket name, not the website endpoint).</li><li>Origin access: choose Origin access control (OAC) → Create new OAC → keep defaults → Create.</li><li>Click Create distribution.</li></ul><p>Select edit behavior to view default cache behavior which includes;</p><ul><li>Viewer protocol policy: Redirect HTTP to HTTPS.</li><li>Allowed HTTP methods: GET, HEAD (static sites don’t need more).</li><li>Cache policy: Managed-CachingOptimized (Recommended for S3).</li><li>Restrict viewer access: No</li></ul><p>It will take a few minutes to deploy. You’ll get a domain like d123abcd.cloudfront.net.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T8-1-l2a2zo7gXItj_uLXg@2x.jpeg" /></figure><h3>Step 3: Lock down S3 with the OAC bucket policy</h3><p>Once the distribution is created:</p><p>1. Go to your CloudFront distribution → Origins → select the origin → Edit.</p><p>2. Origin access: choose Origin access control (OAC) → Create new OAC → keep defaults → Create.</p><p>3. If CloudFront offers a button like “Copy policy” for your OAC, click it, it shows the exact S3 bucket policy JSON to paste.</p><p>4. Click “Go to S3 Permissions” → Bucket policy → Edit.</p><p>Paste the policy CloudFront suggested (it will look like this template):</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Sid&quot;: &quot;AllowCloudFrontReadViaOAC&quot;,<br>      &quot;Effect&quot;: &quot;Allow&quot;,<br>      &quot;Principal&quot;: { &quot;Service&quot;: &quot;cloudfront.amazonaws.com&quot; },<br>      &quot;Action&quot;: &quot;s3:GetObject&quot;,<br>      &quot;Resource&quot;: &quot;arn:aws:s3:::my-static-site-12345/*&quot;,<br>      &quot;Condition&quot;: {<br>        &quot;StringEquals&quot;: {<br>          &quot;AWS:SourceArn&quot;: &quot;arn:aws:cloudfront::&lt;ACCOUNT_ID&gt;:distribution/&lt;DISTRIBUTION_ID&gt;&quot;<br>        }<br>      }<br>    }<br>  ]<br>}</pre><ul><li>Keep Block Public Access ON.</li><li>No public ACLs needed. CloudFront will be the only reader.</li><li>Save the policy.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tkQ79FboSDxFCS_hySeDlA@2x.jpeg" /></figure><h3>Step 4: (Optional but recommended) Friendly SPA fallback</h3><p>If you’re building a single-page app, or you just want a nicer experience for missing pages:</p><p>•	In CloudFront → Error pages → Create custom error response:</p><p>•	HTTP error code: 404 (repeat for 403 too)</p><p>•	Customize error response: Yes</p><p>•	Response page path: /index.html</p><p>•	HTTP response code: 200</p><p>•	TTL: e.g., 300 seconds</p><p>This makes unknown routes fall back to index.html.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jqJBDU6RMmWNYz2fxzYY2g@2x.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*avH4sqTshFy3wuXn2QJ4Cw@2x.jpeg" /></figure><h3>Step 5: Test your site</h3><ul><li>In your distribution General tab, copy the Domain name (e.g., d123abcd.cloudfront.net).</li><li>Open it in a browser, you should see your index.html.</li></ul><p>ta-da…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hA1UAK2tg48_IMRKADcs_g@2x.jpeg" /></figure><p>You’ve now deployed a fully functional static website using just Amazon S3 and CloudFront with no servers to manage, no SSL headaches, and no domain name required. Your site is already available on a secure *.cloudfront.net URL, backed by AWS’s global CDN for speed and reliability.</p><p>This setup is ideal for portfolios, prototypes, internal tools, or any project where you want to go live quickly without extra overhead. And when the time comes to add a custom domain and branded URL, you can extend this same architecture with Route 53 and ACM without redoing your work.</p><p>The beauty of this approach is its simplicity:</p><p>•	Secure by default (S3 private + CloudFront OAC).</p><p>•	Scalable worldwide with zero extra configuration.</p><p>•	Low cost &amp; low maintenance since you only pay for what you use.</p><p>🚀 Try it yourself today: upload your own index.html, deploy via S3 + CloudFront, and share your site instantly.</p><p>💡 If you enjoyed this walkthrough, follow me here on Medium for more hands-on AWS workshops , where we dive into practical, low-ops architectures you can use right away.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5a87bab7991" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“From Vulnerable to Bulletproof: Mastering Amazon S3 Security”]]></title>
            <link>https://medium.com/@Stephanie_Batanwi/from-vulnerable-to-bulletproof-mastering-amazon-s3-security-ec9b9e6a66a0?source=rss-538c281c70c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec9b9e6a66a0</guid>
            <category><![CDATA[aws-s3-bucket]]></category>
            <category><![CDATA[s3]]></category>
            <category><![CDATA[aws-in-plain-english]]></category>
            <category><![CDATA[aws-s3]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Stephanie Batanwi]]></dc:creator>
            <pubDate>Tue, 26 Aug 2025 23:59:52 GMT</pubDate>
            <atom:updated>2025-08-26T23:59:52.573Z</atom:updated>
            <content:encoded><![CDATA[<p>Amazon S3 (Simple Storage Service) is one of the most widely used AWS services for storing and managing data at scale. While it provides durability, scalability, and availability out of the box, security is a shared responsibility between AWS and you as the customer. Unfortunately, misconfigured S3 buckets have been at the center of some of the biggest data breaches in recent years. That makes it critical to understand not only what can go wrong, but also the built-in security features you can use to keep your data safe.</p><p>In this article, we’ll walk through the key risks, security features, and best practices for keeping your S3 data safe.</p><h3><strong>The Risks: What Can Go Wrong?</strong></h3><p>Let’s start with Common S3 Security Risks. S3 is flexible and powerful, but that flexibility also creates room for mistakes.</p><h4><strong>1. Publicly Accessible Buckets</strong></h4><p>Accidentally allowing public access to sensitive data. Publicly open buckets are the #1 cause of data leaks.</p><h4><strong>2. Weak Access Controls</strong></h4><p>Overly broad IAM policies or bucket policies that allow anyone(or too many roles) to read/write.</p><h4><strong>3. Unencrypted Data</strong></h4><p>Storing sensitive files in plain text increases risk if access is compromised.</p><h4><strong>4. Poor Monitoring</strong></h4><p>Without logging and alerts, malicious activity can go unnoticed.</p><p>These are the most common pitfalls and they happen more often that you would think. The fix for these risks lies in core security features in S3.</p><h3><strong>Core Security Features(Tools) in S3</strong></h3><h4>-<strong> Block Public Access:</strong></h4><p>A global setting to prevent unintended public exposure.</p><h4><strong>- Bucket Policies &amp; IAM Policies:</strong></h4><p>Fine-grained access control to define who can read, write, or list objects.</p><h4>- <strong>Encryption:</strong></h4><p>Server-Side Encryption (SSE-S3, SSE-KMS, SSE-C) protects data at rest.</p><p>Client-Side Encryption secures data before upload.</p><h4><strong>- Versioning &amp; Object Lock:</strong></h4><p>Prevents accidental deletion and supports immutability (useful for compliance).</p><h4><strong>- Logging &amp; Monitoring:</strong></h4><p><strong>Server Access Logs:</strong> Track requests.</p><p><strong>CloudTrail &amp; CloudWatch</strong>: Monitor for suspicious activity.</p><p><strong>Amazon Macie:</strong> Identifies sensitive data in S3 automatically.</p><p>These tools are powerful, but features alone do not guarantee safety. The real difference comes from how you apply them in practice.</p><h3>Best Practices for S3 Security</h3><p>Turning features into security requires a mindset: always assume the worst could happen and configure accordingly. That’s where best practices come in:</p><h4><strong>1. Enable Block Public Access (Always):</strong></h4><p>Unless you are hosting a static website, your bucket should not be public.</p><p>AWS Console Steps:</p><p>a. Navigate to S3 &gt; Block Public Access Settings.</p><p>b. Check all 4 options (e.g “Block public access to buckets”)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LmrjjqPKVaiX8DW6_hYn_g@2x.jpeg" /></figure><h4><strong>2. Enforce Least Privilege with IAM Policies;</strong></h4><p>Give users and applications only the permissions they need.</p><p>Use IAM conditions to restrict access by IP or MFA</p><p>Example of a simple bucket policy that allows access to a specific IAM role:</p><pre>{<br>  &quot;Version&quot;: &quot;2012-10-17&quot;,<br>  &quot;Statement&quot;: [<br>    {<br>      &quot;Effect&quot;: &quot;Allow&quot;,<br>      &quot;Principal&quot;: {<br>        &quot;AWS&quot;: &quot;arn:aws:iam::123456789012:role/MyAppRole&quot;<br>      },<br>      &quot;Action&quot;: &quot;s3:*&quot;,<br>      &quot;Resource&quot;: [<br>        &quot;arn:aws:s3:::my-secure-bucket&quot;,<br>        &quot;arn:aws:s3:::my-secure-bucket/*&quot;<br>      ]<br>    }<br>  ]<br>}</pre><p>Apply it with CLI command:</p><pre>aws s3api put-bucket-policy \<br>  --bucket my-secure-bucket \<br>  --policy file://bucket-policy.json</pre><h4>3. Enforce Encryption:</h4><p>Enable default encryption for all new objects; Use SSE-KMS if you need fine-grained control with AWS Key Management Service.</p><p>CLI command:</p><pre>aws s3api put-bucket-encryption \<br>  --bucket my-secure-bucket \<br>  --server-side-encryption-configuration &#39;{<br>    &quot;Rules&quot;: [<br>      {<br>        &quot;ApplyServerSideEncryptionByDefault&quot;: {<br>          &quot;SSEAlgorithm&quot;: &quot;aws:kms&quot;<br>        }<br>      }<br>    ]<br>  }&#39;</pre><h4>4. Enable Bucket Versioning:</h4><p>Protect against accidental overwrites or deletions.</p><p>CLI command:</p><pre>aws s3api put-bucket-versioning \<br>  --bucket my-secure-bucket \<br>  --versioning-configuration Status=Enabled</pre><h4>5. Enable MFA Delete :</h4><p>Adds an extra authentication layer before permanent deletion.</p><h4>6. Audit and Monitor :</h4><p>Log all activity to a separate secured bucket. Use CloudTrail for API-level auditing and to detect unusual access.</p><p>Use AWS Macie in AWS Security Hub and scan S3 buckets to automatically detect. sensitive data(Personally identifiable information, personal health information, API keys exposure.</p><h4>7. Set Lifecycle Policies :</h4><p>Expire, archive, or transition objects automatically to minimize risk exposure.</p><h4>8. Use Private Endpoints :</h4><p>For internal apps, route traffic through VPC endpoints instead of the internet.</p><h4>9. Audit Permissions with IAM Access Analyzer:</h4><p>Run IAM access analyzer to find unused permissions.</p><p>Check S3 bucket policies for “Effect”: “Allow” with wildcards.</p><h4>10. Regular S3 Security Audits:</h4><p>Monthly Checklist;</p><p>- Review bucket policies for public access</p><p>- Check IAM roles with S3 permissions</p><p>- Scan for unencrypted buckets</p><p>- Validate logging is still active.</p><p>AWS Config Rules to Enable;</p><p>* <em>s3-bucket-public-read prohibited</em></p><p>* <em>s3-bucket-server-side-encryption-enabled</em></p><p>Amazon S3 is a powerful service, but with great power comes great responsibility. By applying least privilege principles, encryption, monitoring, and public access controls, you can significantly reduce the risk of data leaks.</p><p>Key Takeaway: S3 security is foundational, not optional.</p><p>Save this checklist for your next cloud project,</p><p>Audit your S3 buckets today, it only takes a few minutes to catch common mistakes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec9b9e6a66a0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with Amazon S3: What I Wish Someone Had Told Me on Day One]]></title>
            <link>https://medium.com/@Stephanie_Batanwi/getting-started-with-amazon-s3-what-i-wish-someone-had-told-me-on-day-one-666ee77422f1?source=rss-538c281c70c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/666ee77422f1</guid>
            <category><![CDATA[s3-bucket]]></category>
            <category><![CDATA[s3]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-s3]]></category>
            <category><![CDATA[amazon-s3]]></category>
            <dc:creator><![CDATA[Stephanie Batanwi]]></dc:creator>
            <pubDate>Wed, 30 Jul 2025 06:48:14 GMT</pubDate>
            <atom:updated>2025-07-30T07:23:28.255Z</atom:updated>
            <content:encoded><![CDATA[<p>When I first started exploring AWS, I had never heard of Amazon S3. I was transitioning into cloud engineering, and everywhere I looked job postings, tutorials, tech conversations, everyone kept mentioning this “Simple Storage Service (S3)”</p><p>Simple? It felt anything but simple.</p><p>Every explanation I found was either too technical (“object based storage with 99.999999999% durability”) or too vague (“it’s like Dropbox for developers”). I was stuck in that frustrating middle ground where I knew S3 was important, but I couldn’t grasp why everyone was so obsessed with it.</p><p>Then something clicked. Once I understood what S3 actually does and more importantly, WHY it exists everything made sense. Here’s what I wish someone had told me on day one.</p><p><strong>What S3 Actually Is</strong></p><p>S3 stands for Simple Storage Service. Think of it as a super secure online locker where you can keep almost any type of file: photos, videos, documents, backups, even entire websites.</p><p>The best part? You can access your files anytime, from anywhere in the world.</p><p>It’s like Google Drive or Dropbox but on steroids. Companies like Netflix, Airbnb, and thousands of others use S3 because it’s reliable, scalable, and surprisingly beginner-friendly.</p><p><strong>Why is S3 so popular?</strong></p><p>Here’s what finally made it click for me: S3 solves the storage headaches that used to keep IT teams up at night.</p><p>The old way: Companies bought physical servers, worried about hard drive failures, manually backed up data, and panicked when they ran out of space.</p><p>The S3 way:</p><p>•	Scalable: Start small and grow big, S3 handles it automatically</p><p>•	Secure: AWS protects and backs up your data without you lifting a finger</p><p>•	Affordable: You only pay for the space you actually use</p><p>Imagine renting a storage unit but only being charged for the exact square footage your stuff occupies. That’s how S3 works.</p><p><strong>The 3 Core Concepts You Need to Grasp First</strong></p><p>Before you dive in, here are three S3 terms you’ll hear constantly:</p><ol><li>Buckets: Think of these as top-level folders or containers</li><li>Objects: These are the actual files you upload into buckets</li><li>Regions: The physical location where AWS stores your data (US East, Europe, Asia, etc.)</li></ol><p>Real example: If I upload my resume PDF into a bucket called Work-Bucket, that PDF is the object. If I choose the US-East-1 region, that’s where AWS stores it.</p><p>Simple, right?</p><p><strong>What I Built to Finally ‘Get It’</strong></p><p>The moment S3 clicked for me was when I stopped reading about it and actually used it. Here’s the hands-on exercise that changed everything:</p><p><strong>Your First S3 Bucket</strong></p><p>1.	Log in to your AWS Management Console</p><p>2.	Search for “S3” and click on it</p><p>3.	Click “Create Bucket”</p><p>4.	Give it a unique name (like my-first-s3-bucket)</p><p>5.	Choose a region close to you</p><p>6.	Click “Create”</p><p>Congratulations! you just created your first piece of cloud infrastructure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t_Fksuostxs4k86XIyFhSw@2x.jpeg" /></figure><p>Now upload a file. Any file. Watch it appear in your bucket. Access it from your phone. This is when it hits you: your file is now living in the cloud, accessible from anywhere.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M4B-rE8C7M95eXWpDSRC-w@2x.jpeg" /></figure><p><strong>Common Beginner Mistakes I Made</strong></p><p>Mistake 1: Thinking S3 is just for developers.</p><p>Reality: Anyone can use it. I’ve backed up photos and files to S3.</p><p>Mistake 2: Worrying about costs before trying it.</p><p>Reality: The free tier gives you 5GB for a year. Start experimenting, you’ll barely spend anything.</p><p>Mistake 3: Getting overwhelmed by all the features</p><p>Reality: You only need to understand buckets and objects to get started. Everything else can wait.</p><p><strong>What You Can Actually Do with S3</strong></p><p>Once you have the basics down, S3 opens up a world of possibilities:</p><p>•	Host a static website (your portfolio, landing page, or blog)</p><p>•	Back up important files from your computer or applications</p><p>•	Store media libraries for apps or websites</p><p>•	Archive old documents you rarely access but need to keep</p><p>•	Share files with colleagues or clients securely</p><p>The beauty of S3 is that it grows with you. Start with simple file storage, then gradually explore more advanced features as your needs evolve.</p><p>Your Next Steps</p><p>Amazon S3 is one of those AWS services you’ll use over and over again. It’s the foundation for countless cloud projects, and mastering it early will pay dividends throughout your cloud journey.</p><p>Challenge for this week: Create your first bucket and upload a file. Play around with it. Get comfortable with the interface.</p><p>Coming up next: I’ll show you how to use S3 to host a static website. Yes, you can build and launch a small portfolio or event page in minutes, no servers required.</p><p>Question for you:</p><p>Have you ever used S3? What’s the first thing you’d want to store in S3? A website backup? Family photos? Project files? Drop it in the comments, I’d love to know where you’re starting your cloud journey!</p><p>Follow me for more beginner-friendly cloud tutorials. We’re learning this together, one bucket at a time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=666ee77422f1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>