<?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 Samuel .O on Medium]]></title>
        <description><![CDATA[Stories by Samuel .O on Medium]]></description>
        <link>https://medium.com/@tipsontee?source=rss-8c7ecb7cd5df------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hIwif_NSFbT-8OnlSNN2Vw@2x.jpeg</url>
            <title>Stories by Samuel .O on Medium</title>
            <link>https://medium.com/@tipsontee?source=rss-8c7ecb7cd5df------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 21:09:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tipsontee/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[Platform Engineers Don’t Build Infrastructure — They Build the Factory]]></title>
            <link>https://tipsontee.medium.com/platform-engineers-dont-build-infrastructure-they-build-the-factory-d85096c57804?source=rss-8c7ecb7cd5df------2</link>
            <guid isPermaLink="false">https://medium.com/p/d85096c57804</guid>
            <category><![CDATA[foundry]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[change]]></category>
            <category><![CDATA[platform-engineering]]></category>
            <dc:creator><![CDATA[Samuel .O]]></dc:creator>
            <pubDate>Fri, 31 Jul 2026 21:21:59 GMT</pubDate>
            <atom:updated>2026-07-31T21:21:59.218Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6PyNRUXBjAKprZ0pHQc5SQ.png" /></figure><p>The best platform teams don’t build every environment. They build the systems that make building environments repeatable.</p><p>I think Platform Engineering has a branding problem. Ask ten people what a Platform Engineer does.</p><p>Most will say: “They build infrastructure.” I don’t think that’s true.</p><p>Infrastructure is certainly part of the job. But it’s not the job. The real job is much bigger.</p><p>Platform Engineers don’t build infrastructure. They build the factory that produces it.</p><p>And once you see Platform Engineering through that lens, it’s difficult to think about it any other way.</p><p>Imagine Running a Car Factory</p><p>Imagine you’re responsible for building cars.</p><p>One approach is to hire hundreds of people and ask them to build every car by hand.</p><p>Every bolt. Every engine. Every door. Every time.</p><p>It works. Until demand increases. Until quality becomes inconsistent.</p><p>Until every team starts building the same car slightly differently.</p><p>Now imagine a factory.</p><p>The factory doesn’t build one car.</p><p>It builds thousands. Every process is repeatable.</p><p>Every quality check is built into the production line.</p><p>Every improvement benefits every future car.</p><p>That’s the difference.</p><p>Factories don’t remove craftsmanship. They remove unnecessary repetition.</p><p>We’ve Been Thinking About Platform Teams the Wrong Way</p><p>Many organizations treat Platform Engineering like an internal infrastructure team. A developer needs a Kubernetes cluster.</p><p>A ticket is raised. The platform team provisions it.</p><p>Another developer needs a database. Another ticket.</p><p>A new environment. Another ticket.</p><p>Eventually, the platform team becomes one of the busiest teams in the company.</p><p>Not because they’re creating value. Because they’re repeating the same work over and over again.</p><p>They’ve become builders. When they should be becoming factory designers.</p><p>The Shift, The question shouldn’t be:</p><p>“How do we build another environment?”</p><p>It should be:</p><p>“How do we build a system that creates every future environment?”</p><p>That’s a completely different mindset. Instead of solving today’s request……you solve tomorrow’s hundred requests.</p><p>Every improvement you make becomes part of the production line.</p><p>Every developer benefits. Every future project benefits.</p><p>The platform gets better. The organization gets faster.</p><p>Good Platform Teams Think Like Product Teams</p><p>This is where I think many organizations miss the opportunity.</p><p>Infrastructure is often treated like a project.</p><p>A request arrives. Work begins. The request is completed.</p><p>Everyone moves on.</p><p>Great platform teams don’t think that way. They think like product teams.</p><p>Every feature they build should make the next developer’s experience better. Every automation should remove another manual task.</p><p>Every improvement should reduce another support ticket. Their customers aren’t external users. Their customers are developers.</p><p>Success isn’t measured by how much infrastructure they build.</p><p>It’s measured by how little developers have to think about infrastructure at all.</p><p>AI Changes the Scale — Not the Mission</p><p>In 2026, software is being created faster than ever.</p><p>Developers are using AI to prototype ideas, generate code, write tests, and explore unfamiliar systems in minutes.</p><p>Some organizations are even allowing AI agents to create pull requests and provision development environments.</p><p>That doesn’t reduce the need for Platform Engineering. It increases it.</p><p>Because if software can be created ten times faster, the platform underneath it has to be even more reliable.</p><p>Otherwise, you’ve simply accelerated inconsistency.</p><p>Whether the request comes from a developer…</p><p>…an API……or an AI agent…</p><p>The factory should produce the same secure, compliant, production-ready result every time.</p><p>That’s what great platforms do. The Factory Doesn’t Replace People</p><p>This is where the factory analogy is often misunderstood. Factories don’t eliminate builders.</p><p>They allow builders to focus on building better things.</p><p>Platform Engineering isn’t about replacing developers.</p><p>It’s about removing the repetitive work that distracts them. Developers build products.</p><p>Platform Engineers build the systems that let developers build products consistently.</p><p>Everyone stays focused on what they’re best at. Building the Factory Is Harder Than Building the Product</p><p>Ironically, designing the factory is often much harder than producing a single product.</p><p>You have to think about:</p><ul><li>Standards</li><li>* Security</li><li>* Automation</li><li>* Observability</li><li>* Compliance</li><li>* Developer experience</li><li>* Scalability</li><li>* Governance</li></ul><p>Not for one application.</p><p>For every application that will ever be built on your platform.</p><p>That’s why great Platform Engineering isn’t just about cloud knowledge.</p><p>It’s about systems thinking. It’s about asking:</p><p>“How can we solve this problem once, so nobody has to solve it again?”</p><p>The Real Measure of Success</p><p>The best platform is rarely the one with the most features. It’s the one developers barely notice.</p><p>Creating a new service feels obvious. Deployments feel routine. Security feels automatic. Infrastructure feels invisible.</p><p>When developers stop asking “How do I build the environment?” and start asking “What problem should we solve next?”……the platform is doing its job.</p><p>Looking Ahead</p><p>If Platform Engineers build the factory…</p><p>What does that factory actually look like?</p><p>What happens when a developer requests a new API? Or a new database? Or an entirely new production environment?</p><p>What happens between clicking “Create” and seeing a production-ready application?</p><p>That journey is where Platform Engineering becomes tangible.</p><p>And that’s exactly where we’ll go next.</p><p>Final Thought</p><p>For years, we’ve measured Platform Engineering by the infrastructure it delivers.</p><p>I think we’ve been measuring the wrong thing.</p><p>Infrastructure is the output. The platform is the product.</p><p>And the best Platform Engineers aren’t remembered for the environments they built. They’re remembered for building the factory that allowed everyone else to build faster.</p><p>Because Platform Engineers don’t build infrastructure.</p><p>They build the factory that builds it.</p><p>I think this article is the strongest in the series so far because it introduces a signature idea that readers can remember and repeat:</p><p>Platform Engineers don’t build infrastructure. They build the factory that builds infrastructure.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d85096c57804" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Developers Should Never Have to Build Infrastructure]]></title>
            <link>https://medium.com/swlh/developers-should-never-have-to-build-infrastructure-9969857d8889?source=rss-8c7ecb7cd5df------2</link>
            <guid isPermaLink="false">https://medium.com/p/9969857d8889</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[infrastructure-as-code]]></category>
            <category><![CDATA[platform-engineering]]></category>
            <dc:creator><![CDATA[Samuel .O]]></dc:creator>
            <pubDate>Thu, 09 Jul 2026 22:45:15 GMT</pubDate>
            <atom:updated>2026-07-09T22:45:15.054Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Developers build products. The platform handles everything else.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D149XpwGkXPgzGkviIUSNw.png" /></figure><p>A few years ago, if you wanted to build a website, you probably started by renting a physical server.</p><p>You installed the operating system.</p><p>Configured the network, Set up security, Installed databases, Configured backups, Configured monitoring.</p><p>Only after all of that could you begin writing the application.</p><p>Cloud computing changed that. But something interesting happened. We stopped managing physical servers……and started managing cloud infrastructure instead. The tools changed. The complexity didn’t.</p><h3>The Wrong Question</h3><p>One of the most common questions I hear in engineering teams is:</p><blockquote><em>“Which Terraform module should I use?”</em></blockquote><p>Or:</p><blockquote><em>“Which repository should I copy?”</em></blockquote><p>Or:</p><blockquote><em>“How do I configure monitoring for this service?”</em></blockquote><p>They’re perfectly reasonable questions. But they’re the wrong questions.</p><p>Because before a developer has written a single line of business logic, they’re already making decisions about networking, permissions, logging, encryption, monitoring, deployment pipelines, naming conventions, and dozens of other things that have nothing to do with the product they’re trying to build.</p><p>Some companies call this flexibility. I call it unnecessary work.</p><h3>Imagine Hiring a Chef</h3><p>Imagine hiring a world-class chef.</p><p>On their first day you say:</p><p>“Before you cook dinner, we’d like you to build the kitchen.”</p><p>You’ll need to:</p><ul><li>Install the oven.</li><li>Fit the plumbing.</li><li>Wire the electricity.</li><li>Build the countertops.</li><li>Assemble the cupboards.</li><li>Buy the utensils.</li></ul><p>Only then can you start cooking.</p><p>It sounds ridiculous.</p><p>Yet that’s exactly how many software teams still work today.</p><p>We hire talented developers to solve business problems.</p><p>Then we ask them to become infrastructure experts before they can even begin.</p><h3>Developers Were Hired to Build Products</h3><p>Developers create value by solving customer problems.</p><p>Not by deciding:</p><ul><li>Which virtual network to use.</li><li>How logging should be configured.</li><li>Which monitoring dashboards should exist.</li><li>How backups are managed.</li><li>Which security policies apply.</li><li>How deployment pipelines are built.</li></ul><p>Those decisions are important.</p><p>But they shouldn’t have to be made hundreds of times by hundreds of different developers.</p><p>Every repeated decision creates another opportunity for inconsistency.</p><p>Another opportunity for mistakes.</p><p>Another opportunity for technical debt.</p><h3>Every New Project Starts the Same Way</h3><p>Walk into many engineering organisations and the process looks surprisingly familiar.</p><p>A new project begins. Someone shares an old repository. Another developer copies it. Files are deleted. Variables are renamed. Documentation is skimmed. Some security settings are forgotten. Monitoring gets added later. Someone remembers tagging standards halfway through. Eventually everything works.</p><p>But every team arrived there differently.</p><p>Multiply that process across hundreds of developers and dozens of teams.</p><p>Now imagine trying to maintain all of it two years later.</p><p>The cost isn’t just infrastructure.</p><p>It’s inconsistency.</p><h3>More Choice Doesn’t Always Mean More Freedom</h3><p>Engineering culture often celebrates flexibility.</p><p>Every team chooses their own structure. Their own deployment pipeline. Their own monitoring. Their own permissions. Their own naming conventions.</p><p>At first, it feels empowering.</p><p>Over time, it becomes exhausting.</p><p>When every team solves the same problems differently, the organisation ends up supporting dozens of versions of the same solution.</p><p>Developers spend more time understanding infrastructure than understanding customers.</p><p>That’s not engineering excellence.</p><p>That’s duplicated effort.</p><h3>The Best Infrastructure Is Almost Invisible</h3><p>Think about electricity in your home.</p><p>You don’t wake up wondering how the power reaches your kitchen.</p><p>You simply flick a switch.</p><p>Someone else designed the grid. Someone else maintains it.</p><p>Someone else makes sure it’s reliable.</p><p>You focus on living in the house.</p><p>Software platforms should work the same way.</p><p>Infrastructure should quietly exist in the background.</p><p>Reliable. Secure. Consistent.</p><p>Almost invisible.</p><p>When it becomes invisible, developers can focus on creating things people actually use.</p><h3>The Shift Platform Teams Are Making</h3><p>The best platform teams I’ve worked with don’t ask developers to become cloud experts.</p><p>Instead, they ask a different question:</p><blockquote><em>“How do we remove as many decisions as possible?”</em></blockquote><p>Not because developers aren’t capable.</p><p>Because their time is better spent elsewhere.</p><p>The platform team takes ownership of the things every application needs:</p><ul><li>Security</li><li>Infrastructure</li><li>Deployment</li><li>Monitoring</li><li>Compliance</li><li>Operational standards</li></ul><p>Developers take ownership of the thing that makes their product unique.</p><p>Everything else becomes part of the platform.</p><p>That’s where the real productivity gain comes from.</p><p>Not from faster infrastructure.</p><p>From fewer distractions.</p><h3>Building Great Software Is About Focus</h3><p>The highest-performing engineering organisations don’t necessarily have smarter developers.</p><p>They remove more obstacles.</p><p>Imagine joining a company where creating a new service takes minutes instead of days.</p><p>Where security is already built in. Where monitoring already exists.</p><p>Where deployment pipelines are already configured.</p><p>Where documentation is generated automatically.</p><p>Where every project starts from the same trusted foundation.</p><p>Developers spend less time asking:</p><p><em>“How do I build the environment?”</em></p><p>And more time asking:</p><p><em>“How do I solve this customer’s problem?”</em></p><p>That’s the conversation every engineering leader wants their teams to have.</p><h3>AI Makes This More Important, Not Less</h3><p>There is another reason this matters now.</p><p>AI has changed how quickly software can be created.</p><p>Developers can generate code, write tests, debug problems, explore unfamiliar codebases, and prototype ideas faster than ever before.</p><p>But faster code creation doesn’t automatically mean faster software delivery.</p><p>An AI agent can help write an application.</p><p>It can generate infrastructure code.</p><p>It can create deployment pipelines.</p><p>But should every developer — and every AI agent — be making their own decisions about networking, security, monitoring, identity, compliance, and production environments?</p><p>Probably not.</p><p>In fact, AI makes standardisation even more important.</p><p>As organisations create software faster, they need stronger foundations to make sure that what reaches production remains secure, observable, compliant, and consistent.</p><p>The answer isn’t to give developers and AI agents more documentation and hope they make the right decisions.</p><p>The answer is to build those decisions into the platform itself.</p><p>AI can accelerate how quickly we create software.</p><p>The platform determines whether we can deliver it safely and consistently at scale.</p><h3>A Different Way to Think About Infrastructure</h3><p>Perhaps the biggest lesson I’ve learned is this:</p><p>Infrastructure is not the product. It’s the foundation that allows products to exist.</p><p>The best foundations are rarely noticed.</p><p>Nobody admires a building because the concrete underneath it was poured correctly. They admire what was built on top.</p><p>Software should be no different.</p><p>When infrastructure disappears into the background, innovation moves to the foreground.</p><h3>Looking Ahead</h3><p>This raises an interesting question.</p><p>If developers shouldn’t be spending their time building infrastructure…</p><p>Who should?</p><p>The answer isn’t simply:</p><blockquote><em>“The platform team.”</em></blockquote><p>Because if the platform team has to manually build infrastructure for every developer, we’ve only moved the bottleneck.</p><p>Modern platform teams aren’t just building infrastructure anymore.</p><p>They’re building something much bigger.</p><p>They’re building the systems that make good engineering repeatable.</p><p>They’re building the factory that produces it.</p><p>And that’s where we’ll go next.</p><h3>Final Thought</h3><p>The best engineering organisations don’t ask every developer to become an infrastructure expert.</p><p>They don’t solve complexity by writing more documentation.</p><p>And they don’t solve it by moving every infrastructure request into another ticket queue.</p><p>They build platforms that quietly handle the complexity, so developers can focus on creating products customers love.</p><p>Because developers should build products.</p><p>Not the platform that builds them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9969857d8889" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/developers-should-never-have-to-build-infrastructure-9969857d8889">Developers Should Never Have to Build Infrastructure</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Engineering Standards Shouldn’t Live in Documentation]]></title>
            <link>https://medium.com/swlh/engineering-standards-shouldnt-live-in-documentation-ca28ac2ce664?source=rss-8c7ecb7cd5df------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca28ac2ce664</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[platform-engineering]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Samuel .O]]></dc:creator>
            <pubDate>Sat, 20 Jun 2026 06:01:01 GMT</pubDate>
            <atom:updated>2026-06-20T22:22:45.962Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Why I stopped copying repositories and started building an Internal Developer Platform.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bbwmu5lb5t6zOddYwGxFXg.png" /></figure><blockquote>“The best engineering teams don’t rely on people remembering the right way to do things.</blockquote><blockquote>They build platforms that make the right way the easiest way.”</blockquote><p>The Most Expensive Thing Engineers Still Do Manually</p><p>There’s a moment that happens at the beginning of almost every engineering project.</p><p>It rarely appears on a roadmap, nobody tracks how long it takes. There isn’t a dashboard for it, no one creates a Jira epic called <em>“Spend the morning copying another repository.”</em></p><p>Yet it happens everywhere. A developer receives a new piece of work. Maybe it’s a Terraform module, maybe it’s a new microservice, maybe it’s an internal tool. The first instinct isn’t to create something new, It’s to ask a question.</p><blockquote><strong><em>“Which repository should I copy?”</em></strong></blockquote><p>That realization didn’t come from a production outage or a failed deployment. It came from watching the same sequence of events repeat itself every time a new project started.</p><p>Someone creates a repository. Someone copies an old one. Someone spends the next hour deleting files they don’t need, renaming variables, updating README files, configuring CI/CD pipelines, recreating GitHub labels, adding issue templates, and trying to remember which version of the cloud provider they’re supposed to use.</p><p>None of this work is particularly difficult. It’s simply repetitive. And repetition, at scale, becomes expensive. The strange thing is that we’ve accepted it as normal.</p><h4>We’ve Automated Almost Everything Else</h4><p>Over the last decade, engineering has become incredibly good at automating infrastructure.</p><p>With Terraform, we can provision entire cloud environments from code.</p><p>Kubernetes schedules workloads automatically.</p><p>GitHub Actions, Azure DevOps, and countless CI/CD platforms have transformed how software is built and deployed.</p><p>Infrastructure as Code fundamentally changed how we think about operations.</p><p>Yet every one of these technologies starts with the same assumption:</p><blockquote><strong><em>A project already exists.</em></strong></blockquote><p>Very few people stop to think about everything that happens <strong>before</strong> the first deployment.</p><p>Questions like:</p><ul><li>Which repository structure should we use?</li><li>Which Terraform layout follows our standards?</li><li>Which cloud provider template is appropriate?</li><li>Which GitHub labels should every repository include?</li><li>Which issue templates are required?</li><li>Which documentation should be generated?</li><li>Which CI/CD workflow should be attached?</li><li>Which provider versions are approved?</li></ul><p>Most organizations answer those questions with documentation.</p><p>I don’t think documentation is the right tool anymore.</p><h4>Documentation Describes Standards. Platforms Enforce Them.</h4><p>Almost every engineering organization has a page that begins with something like:</p><blockquote>“When creating a new repository…”</blockquote><p>Or…</p><blockquote>“Please make sure you follow these standards…”</blockquote><p>The problem isn’t that the documentation is wrong.</p><p>The problem is that documentation depends on people remembering to follow it.</p><p>Platforms don’t forget.</p><p>A platform doesn’t remind you to add GitHub labels.</p><p>It creates them.</p><p>A platform doesn’t tell you which Terraform structure to use.</p><p>It generates it.</p><p>A platform doesn’t recommend provider versions.</p><p>It pins them automatically.</p><p>That’s the difference between <strong>guidance</strong> and <strong>automation</strong>.</p><p>And it’s a difference that becomes increasingly important as organizations grow.</p><h4>The Question That Changed My Perspective</h4><p>At some point I stopped asking:</p><blockquote><strong><em>“How do we improve our engineering documentation?”</em></strong></blockquote><p>Instead, I started asking:</p><blockquote><strong><em>“Why aren’t our engineering standards executable?”</em></strong></blockquote><p>That single question completely changed how I think about Platform Engineering.</p><p>Instead of documenting best practices, why not encode them?</p><p>Instead of hoping every engineer starts a project the same way, why not guarantee it?</p><p>Instead of treating standards as documents, treat them as products.</p><p>That idea eventually became the foundation of a project I’m building called <strong>Engineering Foundry</strong>.</p><h4>Engineering Foundry</h4><p>Engineering Foundry is an opinionated platform that bootstraps production-ready engineering projects from a single command.</p><p>Instead of creating a repository and spending the next hour configuring it, engineers simply describe what they want to build.</p><p>The platform takes care of everything else.</p><p>That includes:</p><ul><li>Generating a standardized project structure</li><li>Rendering Terraform templates for the selected cloud provider</li><li>Creating GitHub repositories</li><li>Applying labels, milestones, and issue templates</li><li>Configuring CI/CD pipelines</li><li>Generating documentation</li><li>Applying engineering standards consistently from day one</li></ul><p>The objective isn’t to replace engineers.</p><p>It’s to remove work that never should have required engineering effort in the first place.</p><h4>This Isn’t About Templates</h4><p>It’s tempting to describe Foundry as a project generator.</p><p>It certainly generates projects.</p><p>But that’s not what I’m trying to build.</p><p>Templates solve consistency.</p><p>Platforms solve experience.</p><p>The goal isn’t simply to create repositories faster.</p><p>The goal is to create an engineering environment where every project starts from the same proven foundation, regardless of who creates it.</p><p>That’s a subtle distinction, but it’s one that sits at the heart of Platform Engineering.</p><h4>Engineering Standards Should Feel Invisible</h4><p>The best engineering standards aren’t the ones people remember to follow.</p><p>They’re the ones people don’t have to think about at all.</p><p>Nobody should have to remember which labels are mandatory.</p><p>Nobody should have to search for the latest Terraform structure.</p><p>Nobody should have to wonder which provider versions are approved.</p><p>The platform should already know.</p><p>When standards become part of the platform, consistency stops being something teams have to enforce manually.</p><p>It becomes the default.</p><h4>Why I’m Building This in Public</h4><p>One of the things I’ve always appreciated about the engineering community is how willing people are to share not just successful projects, but the thinking behind them.</p><p>The architecture decisions.</p><p>The trade-offs.</p><p>The mistakes.</p><p>The redesigns.</p><p>That’s the approach I want to take with Engineering Foundry.</p><p>Over the coming months, I’ll be documenting every significant decision involved in building the platform — from the CLI and template engine to GitHub automation, cloud abstractions, observability, and the inevitable design decisions that change along the way.</p><p>My hope is that these articles become useful not only for people building Internal Developer Platforms, but for anyone interested in improving the developer experience inside their organization.</p><h4>What’s Next</h4><p>Every platform begins with a design. Before I wrote a single line of code, I spent weeks thinking about one question:</p><blockquote><strong><em>If engineering standards become software, what should that software actually look like?</em></strong></blockquote><p>In the next article, I’ll walk through the architecture behind Engineering Foundry, explain why I chose a layered design, how the template engine works, how GitHub automation fits into the workflow, and the trade-offs that shaped every decision.</p><p>Because great platforms aren’t built by accident.</p><p>They’re designed.</p><h3>And Yes… We’ll Talk About AI</h3><p>It’s impossible to have a conversation about developer experience in 2026 without talking about AI.</p><p>Every week, a new coding assistant, agent, or autonomous development workflow promises to write more code, generate infrastructure, or build entire applications from a prompt.</p><p>The opportunity is exciting — but it also raises an important question.If AI is going to generate software, <strong>what standards is it following?</strong></p><p>An AI assistant is only as effective as the engineering context it operates within. If every repository is structured differently, every team follows different conventions, and standards exist only as documentation, then AI inherits that inconsistency. But if engineering standards are encoded into a platform, AI doesn’t have to guess. It starts from the same proven foundation every engineer does.</p><p>That’s one of the directions I’ll be exploring later in this series — not AI as a replacement for platform engineering, but AI as something that becomes significantly more powerful when it’s built on top of a well-designed Internal Developer Platform.</p><p>Because before AI can build software consistently, we first need to build consistency into the software factory itself.</p><h4>I’d Love Your Thoughts</h4><p>If your team is building an Internal Developer Platform — or even thinking about one — I’d love to hear your perspective.</p><p><strong>What’s the most repetitive engineering task your team still performs manually that you believe should be handled by the platform instead?</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca28ac2ce664" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/engineering-standards-shouldnt-live-in-documentation-ca28ac2ce664">Engineering Standards Shouldn’t Live in Documentation</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build Your Own AI AWS Advisor with Strands Agent Builder]]></title>
            <link>https://tipsontee.medium.com/build-your-own-ai-aws-advisor-with-strands-agent-builder-5fc9c5da8b66?source=rss-8c7ecb7cd5df------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fc9c5da8b66</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[amazon-bedrock]]></category>
            <dc:creator><![CDATA[Samuel .O]]></dc:creator>
            <pubDate>Tue, 23 Sep 2025 11:10:54 GMT</pubDate>
            <atom:updated>2025-09-23T11:10:54.725Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Problem with Generic AI Projects</h3><p>Every AI tutorial shows the same thing: “analyze this text” or “summarize this document.” But what if your AI could solve real business problems?</p><p>Last month, I was spending €50 on AWS without understanding where the money was going. My Lambda functions were over-provisioned, S3 buckets had no lifecycle policies, and I had forgotten IAM users consuming resources.</p><p>So I built an AI consultant that connects directly to my AWS account, analyzes my actual infrastructure, and gives me specific optimization advice through natural conversation.</p><p><strong>The result?</strong> I cut my AWS bill from €50 to €2 per month (96% reduction) and improved my security posture — all through chatting with an AI that understands my real setup.</p><h3>What We’re Building</h3><p>This isn’t another text analysis demo. We’re creating a <strong>production-ready AWS Cost Optimizer</strong> with two powerful capabilities:</p><p>Think of this as building your own <strong>personal AWS cost advisor named Jervis</strong> — like having a financial consultant, but for your cloud computing bills. Instead of paying thousands for AWS consulting services, you build your own AI assistant that:</p><ul><li><strong>Scans your AWS account</strong> automatically</li><li><strong>Finds where you’re overspending</strong> money</li><li><strong>Tells you exactly how to save</strong> with specific steps</li><li><strong>Answers questions</strong> through a simple chat interface</li></ul><h3>AWS Account Inspector</h3><ul><li>Scans your entire AWS infrastructure in real-time</li><li>Analyzes EC2, Lambda, S3, RDS, IAM, VPC, and CloudFormation resources</li><li>Provides specific cost optimization recommendations with estimated savings</li><li>Identifies security vulnerabilities and compliance issues</li></ul><h3>Conversational AWS Consultant</h3><ul><li>Chat about your infrastructure using natural language</li><li>Maintains conversation memory across sessions</li><li>Automatically includes your real AWS data in responses</li><li>Provides actionable advice based on your specific setup</li></ul><h3>Architecture Overview</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*Wj3P-RhGwC_pPZh830xb4A.gif" /></figure><h3>Technology Stack</h3><ul><li><strong>Strands Agent Builder</strong> — AI agent framework for building conversational AI</li><li><strong>AWS Lambda</strong> — Serverless compute for the AI logic</li><li><strong>Claude 3.5 Sonnet</strong> — Advanced AI model via AWS Bedrock</li><li><strong>API Gateway</strong> — REST endpoints for external access</li><li><strong>Terraform</strong> — Infrastructure as code for reproducible deployment</li></ul><h3>Steps to Activate Claude 3.5 Sonnet in AWS Bedrock</h3><h4>Step 1: Navigate to AWS Bedrock Console</h4><ol><li>Log into your AWS Console</li><li>Search for “Bedrock” in the services search bar</li><li>Click on “Amazon Bedrock” to open the service</li></ol><h3>Step 2: Access Model Management</h3><ol><li>In the left sidebar, click on <strong>“Model access”</strong></li><li>You’ll see a list of available foundation models from different providers</li></ol><h3>Step 3: Request Model Access</h3><ol><li>Look for <strong>“Anthropic”</strong> in the provider list</li><li>Find <strong>“Claude 3.5 Sonnet”</strong> model</li><li>Click the <strong>“Request model access”</strong> button next to it</li><li>You may see different versions:</li></ol><ul><li>anthropic.claude-3-5-sonnet-20241022-v2:0 (Latest)</li><li>anthropic.claude-3-5-sonnet-20240620-v1:0 (Previous version)</li></ul><h3>Step 4: Complete Access Request Form</h3><ol><li>Select the model(s) you want to access</li><li>Fill out the use case description (e.g., “AWS cost optimization and infrastructure analysis”)</li><li>Agree to the terms and conditions</li><li>Click <strong>“Submit”</strong></li></ol><h3>Step 5: Wait for Approval</h3><ol><li>Most Anthropic models are <strong>auto-approved</strong> within minutes</li><li>You’ll receive an email confirmation when access is granted</li><li>The status will change from “Pending” to “Access granted”</li></ol><h3>Step 6: Verify Model Access</h3><ol><li>Go back to <strong>“Model access”</strong> in Bedrock console</li><li>Confirm you see:</li></ol><h3>Step 7: Test Model Access (Optional)</h3><ol><li>Navigate to <strong>“Text playground”</strong> in Bedrock</li><li>Select <strong>“Claude 3.5 Sonnet”</strong> from the model dropdown</li><li>Type a test message to verify it’s working</li><li>Example test: “Hello, introduce yourself as Jervis”</li></ol><h3>Step 8: Verify Region Availability</h3><p>Ensure you’re in a supported region for Claude 3.5 Sonnet:</p><ul><li>✅ <strong>US East (N. Virginia)</strong> — us-east-1</li><li>✅ <strong>US West (Oregon)</strong> — us-west-2</li><li>✅ <strong>Europe (Frankfurt)</strong> — eu-central-1</li><li>✅ <strong>Europe (Ireland)</strong> — eu-west-1 <em>(your region)</em></li><li>✅ <strong>Asia Pacific (Singapore)</strong> — ap-southeast-1</li></ul><h3>Step 9: Update IAM Permissions</h3><p>Ensure your Lambda function’s IAM role has the correct permissions:</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;bedrock:InvokeModel&quot;,<br>                &quot;bedrock:InvokeModelWithResponseStream&quot;<br>            ],<br>            &quot;Resource&quot;: &quot;arn:aws:bedrock:eu-west-1::foundation-model/anthropic.claude-3-5-sonnet-20241022-v2:0&quot;<br>        }<br>    ]<br>}</pre><p>Once these steps are complete, your Jervis chatbot will have full access to Claude 3.5 Sonnet for intelligent AWS cost optimization conversations!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pfPbBudm0ruYO14vdn5vvg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mh-GpEF1fgYpxo_p41GyXw.png" /></figure><h3>The Terraform Code — Infrastructure Blueprint</h3><h3>What Terraform Does</h3><p>Terraform is like <strong>architectural blueprints for cloud infrastructure</strong>. Instead of manually clicking through AWS console to build servers, networks, and services, you write code that automatically builds everything.</p><p><strong>Think of it like:</strong></p><ul><li>Traditional way: Manually assembling IKEA furniture piece by piece</li><li>Terraform way: Having a robot that reads instructions and builds everything perfectly</li></ul><h3>Key Infrastructure Components</h3><h4>1. Lambda Function (The Brain)</h4><ul><li><strong>What it is</strong>: A serverless computer that runs Jervis</li><li><strong>Why serverless</strong>: Only pays when someone talks to Jervis (no idle costs)</li><li><strong>Simple analogy</strong>: Like a light bulb that only uses electricity when switched on</li></ul><h4>2. API Gateway (The Front Door)</h4><ul><li><strong>What it is</strong>: The web address people use to talk to Jervis</li><li><strong>Why needed</strong>: Converts web requests into Lambda function calls</li><li><strong>Simple analogy</strong>: Like a receptionist who takes your call and connects you to the right expert</li></ul><h4>3. IAM Roles (Security Permissions)</h4><ul><li><strong>What it is</strong>: Security permissions for Jervis to read your AWS account</li><li><strong>Why needed</strong>: So Jervis can see your services but can’t delete anything</li><li><strong>Simple analogy</strong>: Like giving a financial advisor read-only access to your bank statements</li></ul><h3>The VPC (Virtual Private Cloud) — Secure Network</h3><h3>What a VPC Does</h3><p>A VPC is like <strong>building a private, secure office building in the cloud</strong> where all your AWS services can talk to each other safely.</p><h3>VPC Components Explained</h3><h4>1. Private Subnets</h4><ul><li><strong>What it is</strong>: Isolated network areas where Jervis runs</li><li><strong>Why private</strong>: No direct internet access = more secure</li><li><strong>Simple analogy</strong>: Like having offices in the back of a building (not street-facing)</li></ul><h4>2. VPC Endpoints</h4><ul><li><strong>What it is</strong>: Private tunnels to AWS AI services</li><li><strong>Why needed</strong>: Jervis talks to Claude AI without going through public internet</li><li><strong>Simple analogy</strong>: Like having a private phone line to your bank instead of calling through public phones</li></ul><h4>3. Security Groups (Digital Firewalls)</h4><ul><li><strong>What it is</strong>: Rules about what network traffic is allowed</li><li><strong>Why needed</strong>: Prevents unauthorized access to Jervis</li><li><strong>Simple analogy</strong>: Like having a security guard who only lets authorized people into your building</li></ul><h3>How Everything Works Together</h3><h3>The Complete Flow (Non-Technical)</h3><ol><li><strong>You ask a question</strong> through the web interface: “How can I save money on AWS?”</li><li><strong>API Gateway receives your question</strong> and forwards it to the Lambda function</li><li><strong>Lambda function (Jervis) wakes up</strong> in the secure VPC network</li><li><strong>Jervis scans your AWS account</strong> using the permissions you gave him:</li></ol><ul><li>Counts your servers, databases, storage buckets</li><li>Checks configurations and usage patterns</li><li>Identifies waste and security issues</li></ul><ol><li><strong>Jervis consults Claude AI</strong> through the private VPC endpoint to analyze the data</li><li><strong>Claude provides intelligent analysis</strong> and recommendations</li><li><strong>Jervis responds with specific advice</strong>: “Your Lambda functions use too much memory — change this setting to save €30/month”</li></ol><h3>Why This Architecture Matters</h3><h4>Security:</h4><ul><li>All communication happens in private networks</li><li>Jervis can’t modify anything, only read and advise</li><li>Your AWS data never leaves your account</li></ul><h4>Cost Efficiency:</h4><ul><li>Only pays when in use (serverless)</li><li>No servers running 24/7</li><li>Typically costs €5–15/month total</li></ul><h4>Scalability:</h4><ul><li>Automatically handles any number of questions</li><li>Works for small startups or large enterprises</li><li>No capacity planning needed</li></ul><h3>Real-World Business Value</h3><h3>Before This Project:</h3><ul><li><strong>Manual AWS optimization</strong>: Hire expensive consultants (€2000+/month)</li><li><strong>Complex analysis</strong>: Spend hours reading AWS documentation</li><li><strong>Guesswork</strong>: Make changes without knowing the impact</li><li><strong>Ongoing costs</strong>: Keep paying for over-provisioned resources</li></ul><h3>After This Project:</h3><ul><li><strong>Instant analysis</strong>: Get optimization advice in seconds</li><li><strong>Specific recommendations</strong>: Exact steps with estimated savings</li><li><strong>Continuous monitoring</strong>: Chat with Jervis anytime about your AWS account</li><li><strong>Proven results</strong>: 96% cost reduction in real implementation</li></ul><p>This project essentially <strong>democratizes AWS expertise</strong> — giving anyone the ability to have an expert AWS consultant available 24/7 for the cost of a coffee subscription.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ofs-rSJ3OOWARd9jrsKkSQ.png" /></figure><h4>1. Strands Framework Integration</h4><pre>from strands import Agent, tool<br>from strands.model import bedrockmodel<br><br>model = bedrockmodel.BedrockModel(model_id=MODEL_ID, region=BEDROCK_REGION)</pre><p>The function leverages the Strands Agent Builder framework to create sophisticated AI agents that can:</p><ul><li>Maintain conversation context across multiple interactions</li><li>Process AWS service data intelligently</li><li>Provide structured, actionable recommendations</li></ul><h4>2. AWS Service Discovery Engine</h4><p>This function performs comprehensive AWS account scanning across multiple services:</p><pre>def get_aws_services_info() -&gt; dict:</pre><ul><li><strong>EC2</strong>: Active instances (excluding terminated)</li><li><strong>Lambda</strong>: Function inventory and configuration</li><li><strong>S3</strong>: Bucket count and potential optimization opportunities</li><li><strong>RDS</strong>: Database instances and utilization patterns</li><li><strong>CloudFormation</strong>: Stack management and infrastructure tracking</li><li><strong>VPC</strong>: Network configuration analysis</li><li><strong>IAM</strong>: User and permission auditing</li></ul><h4>3. Intelligent Analysis with @tool Decorator</h4><p>The @tool decorator enables the Strands framework to:</p><ul><li>Automatically handle function registration</li><li>Provide structured data processing</li><li>Enable seamless integration with Claude 3.5 Sonnet</li><li>Return JSON-formatted analysis with specific cost and security insights</li></ul><h4>4. Conversational Memory Management</h4><p>The chat function implements sophisticated session management:</p><pre>def chat_with_aws_consultant(message: str, session_id: str = &quot;default&quot;) -&gt; str:</pre><ul><li><strong>First Interaction</strong>: Jervis introduces himself automatically</li><li><strong>Session Persistence</strong>: Maintains conversation history across requests</li><li><strong>Context Integration</strong>: Includes real-time AWS data in every response</li><li><strong>Memory Optimization</strong>: Automatically trims conversations to prevent token overflow</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P3egII5tnccvJxB583-tPA.png" /></figure><p>Testing my lambda function to ensure it works</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gX1qiHUKd8OWNIm0GaIn1g.png" /></figure><h3>API Endpoint Architecture</h3><h4>POST /inspect — Comprehensive AWS Analysis</h4><p><strong>Purpose</strong>: Provides immediate, structured analysis of the entire AWS account</p><p><strong>Testing Method</strong>:</p><pre>curl -X POST https://your-api-url/inspect \<br>  -H &quot;Content-Type: application/json&quot; \<br>  -d &#39;{}&#39;</pre><p><strong>Response Structure</strong>:</p><pre>{<br>  &quot;success&quot;: true,<br>  &quot;aws_analysis&quot;: {<br>    &quot;services_summary&quot;: &quot;Account has 4 Lambda functions, 2 VPCs, 7 IAM users&quot;,<br>    &quot;cost_insights&quot;: [<br>      &quot;Lambda memory over-allocation detected - potential 30% savings&quot;,<br>      &quot;S3 lifecycle policies missing - estimated €45/month savings&quot;<br>    ],<br>    &quot;security_recommendations&quot;: [<br>      &quot;Enable MFA for 3 IAM users&quot;,<br>      &quot;Review public S3 bucket permissions&quot;<br>    ],<br>    &quot;resource_utilization&quot;: &quot;Several over-provisioned resources identified&quot;,<br>    &quot;recommendations&quot;: [<br>      &quot;Priority 1: Optimize Lambda memory allocation&quot;,<br>      &quot;Priority 2: Implement S3 lifecycle policies&quot;<br>    ],<br>    &quot;raw_data&quot;: {<br>      &quot;ec2_instances&quot;: 0,<br>      &quot;lambda_functions&quot;: 4,<br>      &quot;s3_buckets&quot;: 3,<br>      &quot;rds_instances&quot;: 1<br>    }<br>  }<br>}</pre><h4>POST /chat — Conversational AI Consultant</h4><p><strong>Purpose</strong>: Enables natural language interaction with AWS data analysis</p><p><strong>Testing Methods</strong>:</p><pre>curl -X POST https://your-api-url/chat \<br>  -H &quot;Content-Type: application/json&quot; \<br>  -d &#39;{<br>    &quot;message&quot;: &quot;Hello&quot;,<br>    &quot;session_id&quot;: &quot;welcome-session&quot;<br>  }&#39;</pre><p><strong>Initial Conversation</strong> (Jervis Introduction):</p><p><strong>Response</strong>:</p><pre>{<br>  &quot;success&quot;: true,<br>  &quot;response&quot;: &quot;Hello! I&#39;m Jervis, your AWS cost optimization consultant developed by Sam. I&#39;m here to help you optimize your AWS costs, improve security, and enhance your cloud infrastructure efficiency. How can I assist you today?&quot;,<br>  &quot;session_id&quot;: &quot;welcome-session&quot;<br>}</pre><p><strong>Cost Optimization Query</strong>:</p><p><strong>Advanced Follow-up</strong> (Tests Conversation Memory):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*8VVCrh-Gg3TWitzMdm_OWw.png" /></figure><h3>AWS Integration Testing</h3><h4>1. CloudWatch Logs Monitoring</h4><p>Monitor Lambda execution in AWS Console:</p><pre>AWS Console → CloudWatch → Log Groups → /aws/lambda/aws-ai-optimizer-bedrock-function</pre><p><strong>Expected Log Patterns</strong>:</p><pre>[TIMESTAMP] START RequestId: abc123...<br>[TIMESTAMP] Received event: {&quot;path&quot;: &quot;/chat&quot;, &quot;body&quot;: &quot;...&quot;}<br>[TIMESTAMP] Path: /chat<br>[TIMESTAMP] AWS service discovery completed<br>[TIMESTAMP] Strands Agent processing conversation...<br>[TIMESTAMP] Response generated for session: cost-optimization<br>[TIMESTAMP] END RequestId: abc123...</pre><h4>2. Bedrock Integration Verification</h4><p><strong>Check Model Access</strong>:</p><p>Verify: ✅ anthropic.claude-3-5-sonnet-20241022-v2:0 shows &quot;Access granted&quot;</p><p><strong>Monitor Bedrock Usage</strong>:</p><p>Track: Model invocations, token consumption, response times</p><h4>3. IAM Permission Testing</h4><p>The Lambda function requires specific permissions for AWS service discovery:</p><h3>Advanced Testing Scenarios</h3><h4>1. Stress Testing — Conversation Memory</h4><h4>2. Multi-Session Testing</h4><h4>3. Error Handling Testing</h4><h3>Performance Characteristics</h3><h4>Lambda Metrics to Monitor:</h4><ul><li><strong>Duration</strong>: Typically 2–8 seconds for complex AWS analysis</li><li><strong>Memory Usage</strong>: 256MB allocation with ~150MB actual usage</li><li><strong>Cold Start</strong>: First invocation ~10 seconds, warm ~2 seconds</li><li><strong>Error Rate</strong>: Should remain &lt;1% with proper error handling</li></ul><h4>Cost Analysis:</h4><ul><li><strong>Lambda Execution</strong>: ~€0.002 per request</li><li><strong>Bedrock API Calls</strong>: ~€0.01–0.03 per conversation</li><li><strong>Data Transfer</strong>: Negligible for typical usage</li><li><strong>Total Cost</strong>: ~€5–15/month for moderate usage (100 conversations)</li></ul><h3>Integration with Web Interface</h3><p>The Lambda function seamlessly integrates with the HTML chatbot interface through:</p><h4>Auto-Inspection on Page Load:</h4><h4>Real-time Chat Integration:</h4><h4>Error Handling and Fallbacks:</h4><p>The Lambda function includes robust error handling that provides:</p><ul><li>Graceful degradation when Bedrock is unavailable</li><li>Fallback recommendations based on AWS service patterns</li><li>Clear error messages for troubleshooting</li></ul><p>Chat bot to connect interact with my aws service</p><p>Chat Bot code below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KMfiHIe8fZ8NZXdp4thn1Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EhUkDstbbSGICyqDkb5NYg.png" /></figure><p>See my <a href="https://github.com/tipson007/AI-strands-agent">github</a> for the code</p><blockquote>This AWS Cost Optimization Assistant demonstrates serverless AI infrastructure that achieved 96% cost reduction. The next evolution involves modularizing the codebase, implementing Infrastructure as Code (IaC) through Azure DevOps pipelines integrated with Terraform Cloud for centralized state management, enabling seamless deployment across multiple cloud providers.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fc9c5da8b66" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automated AWS Snapshot Management Pipeline with Boto3 in Azure DevOps]]></title>
            <link>https://medium.com/swlh/automated-aws-snapshot-management-pipeline-with-boto3-in-azure-devops-f8ec9efdd84b?source=rss-8c7ecb7cd5df------2</link>
            <guid isPermaLink="false">https://medium.com/p/f8ec9efdd84b</guid>
            <category><![CDATA[azure-devops]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[boto3]]></category>
            <dc:creator><![CDATA[Samuel .O]]></dc:creator>
            <pubDate>Fri, 24 May 2024 23:07:17 GMT</pubDate>
            <atom:updated>2024-05-24T23:43:07.587Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*uTB7Gx-mZ7SB70GC3o-VBg.png" /><figcaption>fig 1.0</figcaption></figure><p><strong>Introduction:</strong><br>In modern cloud-based infrastructures, efficient management of resources is crucial for both cost optimization and operational excellence. Among the various resources in cloud environments, snapshots play a vital role in data backup and disaster recovery strategies. However, managing snapshots manually can be tedious and error-prone, especially in large-scale deployments. In this article, we will explore how to automate AWS snapshot management using Boto3, the AWS SDK for Python, and integrate it into Azure DevOps pipelines for streamlined operations.</p><p><strong>1. Understanding AWS Snapshots:</strong><br>Before diving into automation, let’s grasp the concept of snapshots in Amazon Web Services (AWS). A snapshot is a point-in-time copy of the data stored in an Elastic Block Store (EBS) volume. These snapshots are incremental backups, capturing only the changed data since the last snapshot. They are commonly used for data backup, restoring volumes, and creating new volumes.</p><p><strong>2. Automating Snapshot Management with Boto3:</strong><br>Boto3 is the AWS SDK for Python, providing an easy-to-use interface for interacting with AWS services. We can leverage Boto3 to automate snapshot management tasks such as listing snapshots, identifying unattached snapshots, and deleting them.</p><pre>import boto3<br><br>def describe_snapshots(ec2_client):<br>    try:<br>        response = ec2_client.describe_snapshots(OwnerIds=[&#39;self&#39;])<br>        return response[&#39;Snapshots&#39;]<br>    except Exception as e:<br>        print(f&quot;Error fetching snapshots: {e}&quot;)<br>        return []<br><br>def print_snapshots(snapshots):<br>    for snapshot in snapshots:<br>        volume_id = snapshot.get(&#39;VolumeId&#39;)<br>        if volume_id:<br>            print(f&quot;Snapshot ID: {snapshot[&#39;SnapshotId&#39;]}, Volume ID: {volume_id}&quot;)<br><br>def delete_snapshots(ec2_client, snapshots):<br>    for snapshot in snapshots:<br>        volume_id = snapshot.get(&#39;VolumeId&#39;)<br>        if volume_id:<br>            snapshot_id = snapshot[&#39;SnapshotId&#39;]<br>            try:<br>                print(f&quot;Deleting Snapshot ID: {snapshot_id}, Volume ID: {volume_id}&quot;)<br>                response = ec2_client.delete_snapshot(SnapshotId=snapshot_id)<br>                print(f&quot;Deleted Snapshot ID: {snapshot_id}: {response}&quot;)<br>            except Exception as e:<br>                print(f&quot;Error deleting Snapshot ID: {snapshot_id}: {e}&quot;)<br><br>def main():<br>    ec2_client = boto3.client(&#39;ec2&#39;)<br>    snapshots = describe_snapshots(ec2_client)<br>    print_snapshots(snapshots)<br>    delete_snapshots(ec2_client, snapshots)<br><br>if __name__ == &quot;__main__&quot;:<br>    main()</pre><p>In the above code snippet,<br> — The code imports the `boto3` library, which is the AWS SDK for Python.</p><p><strong>Function Definitions:</strong><br> — `describe_snapshots`: This function takes an EC2 client object as input, fetches snapshots owned by the current AWS account, and returns a list of snapshots. If there is an error during the operation, it prints an error message and returns an empty list.<br> <br> — `print_snapshots`: This function takes a list of snapshots as input and iterates through each snapshot. For each snapshot, it checks if a `VolumeId` exists and prints the `SnapshotId` and `VolumeId` if available.<br> <br> — `delete_snapshots`: This function takes an EC2 client object and a list of snapshots as input. It iterates through each snapshot, attempts to delete it using the EC2 client, and prints the deletion status. If an error occurs during deletion, it prints an error message.<br> <br> — `main`: This is the main function of the script. It initializes the EC2 client, calls `describe_snapshots` to fetch snapshots, calls `print_snapshots` to print the fetched snapshots, and finally calls `delete_snapshots` to delete the snapshots.</p><p><strong>Main Execution:</strong><br> — The `main` function is executed only if the script is run as the main module (`__name__ == “__main__”`). This ensures that the `main` function is executed when the script is directly executed, but not when it is imported as a module into another script.</p><p><strong>Error Handling:</strong><br> — Error handling is implemented within the `describe_snapshots` and `delete_snapshots` functions to catch any exceptions that might occur during snapshot fetching or deletion. If an error occurs, an error message is printed.</p><p><strong>EC2 Client Initialization:</strong><br> — An EC2 client is initialized using `boto3.client(‘ec2’)`. This client is used to interact with the Amazon EC2 service.</p><p><strong>3. Integrating with Azure DevOps:</strong><br>Azure DevOps is a comprehensive suite of tools for software development, including CI/CD pipelines, version control, and project management. Integrating AWS snapshot management into Azure DevOps pipelines enables automated and consistent snapshot handling as part of deployment workflows.</p><blockquote><strong>Setting up Azure DevOps Pipeline:</strong><br> — Create a new pipeline in your Azure DevOps project.<br> — Choose a repository and configure your pipeline settings.</blockquote><blockquote><strong>Adding AWS Credentials:</strong><br> — Store your AWS credentials securely as pipeline variables or group them by using library in Azure DevOps.<br> — Access these credentials securely within your pipeline tasks.</blockquote><blockquote><strong>Adding Boto3 Script to Pipeline:</strong><br> — Add a new task to your Azure DevOps pipeline for running Python scripts.<br> — Ensure Boto3 and its dependencies are installed within the pipeline environment.<br> — Execute the Boto3 script for snapshot management as part of your pipeline.</blockquote><p><strong>4. Pipeline Triggers and Schedule:</strong><br>You can trigger the execution of your Azure DevOps pipeline and schedule it to run at specific intervals to automate snapshot management tasks. This ensures timely cleanup of unattached snapshots and maintains a tidy and efficient AWS environment.</p><blockquote><strong>5. Benefits of Automation:</strong><br>Automating AWS snapshot management brings several benefits to your cloud infrastructure:<br>- Cost Optimization: Automatically deleting unattached snapshots helps avoid unnecessary storage costs.<br>- Operational Efficiency:Eliminates manual effort and reduces the risk of human error in snapshot management tasks.<br>- Consistency: Ensures consistent snapshot handling across deployments and environments.<br>- Integration: Seamlessly integrates with existing CI/CD pipelines and infrastructure automation workflows.</blockquote><p>I sets up a pipeline to execute the AWS snapshot management script (boto-code.py) using Boto3. Here&#39;s a brief overview of what each part of the YAML file does:</p><ul><li>Trigger: The pipeline is set to run manually (trigger: none). This means it won&#39;t automatically trigger based on events like code commits or pull requests.</li><li>Variables: contains the AWS access key, secret key and region</li></ul><pre>trigger: none<br><br>variables:<br>  - name: awsAccessKey<br>    value: ${{ parameters.awsAccessKey }}<br>  - name: awsSecretKey<br>    value: ${{ parameters.awsSecretKey }}<br>  - name: awsRegion<br>    value: ${{ parameters.awsRegion }}</pre><ul><li>Parameters: A parameter named job_name is defined, allowing customization of the job name. It has a default value of &#39;SnapshotManagement&#39;.</li></ul><pre>parameters:<br>  - name: awsAccessKey<br>    type: string<br>    displayName: &#39;AWS Access Key&#39;<br>    default: &#39;&#39;<br><br>  - name: awsSecretKey<br>    type: string<br>    displayName: &#39;AWS Secret Key&#39;<br>    default: &#39;&#39;<br><br>  - name: awsRegion<br>    type: string<br>    displayName: &#39;AWS Region&#39;<br>    default: &#39;&#39;</pre><ul><li>Parameters are used to customize the behavior of the pipeline. Here, we define three parameters:</li><li>awsAccessKey: AWS access key required for authentication.</li><li>awsSecretKey: AWS secret key required for authentication.</li><li>awsRegion: AWS region where the snapshots will be managed.</li></ul><p>Jobs: The pipeline contains a single job named based on the value of the job_name parameter. This job is responsible for executing the snapshot management tasks.</p><pre>jobs:<br>  - job: ${{ parameters.job_name }}<br>    displayName: &#39;AWS Snapshot Management&#39;<br>    pool:<br>      vmImage: &#39;ubuntu-latest&#39;</pre><ul><li>The pipeline contains one job named &#39;AWS Snapshot Management&#39;. This job runs on an Ubuntu agent (ubuntu-latest).</li><li>Setup Python Environment: The job starts by setting up the Python environment using the UsePythonVersion task, ensuring that Python 3.x is used and added to the system path.</li><li>The first step sets up the Python environment by specifying Python version 3.x.</li><li>The second step sets AWS credentials (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY) as environment variables.</li></ul><pre> steps:<br>  - task: UsePythonVersion@0<br>    inputs:<br>      versionSpec: &#39;3.x&#39;<br>      addToPath: true<br>    displayName: &#39;Set Python Version&#39;<br><br>  - script: |<br>      export AWS_ACCESS_KEY_ID=&quot;${{ parameters.awsAccessKey }}&quot;<br>      export AWS_SECRET_ACCESS_KEY=&quot;${{ parameters.awsSecretKey }}&quot;<br>    displayName: &#39;Set AWS Credentials&#39;</pre><ul><li>Install Boto3: The job installs the Boto3 library using a script task, ensuring that the necessary dependencies are available for the script to execute.</li></ul><pre>  - script: |<br>      pip install boto3<br>    displayName: ‘Install Boto3&#39;<br><br>  - script: |<br>      python scripts/boto-code.py<br>    displayName: ‘Execute AWS Snapshot Management Script’<br><br>    env:<br>      AWS_ACCESS_KEY_ID: ${{ parameters.awsAccessKe<br>      AWS_SECRET_ACCESS_KEY: ${{ parameters.awsSecretKey<br>      AWS_DEFAULT_REGION: ${{ parameters.awsRegion }}</pre><ul><li>The third step installs Boto3 library using pip.</li><li>The fourth step executes the Python script boto-code.py for managing AWS snapshots.</li><li>Execute Script: Finally, the job executes the AWS snapshot management script (boto-code.py) using another script task. This is where the actual snapshot management tasks, such as listing and deleting unattached snapshots, will be performed.</li></ul><p><strong>Conclusion:</strong></p><p>This pipeline automates the process of managing AWS snapshots using Boto3 library. It begins by setting up the Python environment, installing the required library, and then executing a Python script (boto-code.py) responsible for managing snapshots. The AWS access key, secret key, and region are passed as parameters to the pipeline, allowing for customization based on different AWS environments.</p><p>Image of aws snapshot on console before deletion:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ux7PhzIlABkkZdoH85g1jw.png" /><figcaption>fig 2.0</figcaption></figure><p>Pipeline run showing deletion:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-111Go6k-yox7V0AefYiqA.png" /><figcaption>fig 3.0</figcaption></figure><p>Automating AWS snapshot management with Boto3 and integrating it into Azure DevOps pipelines streamlines operational workflows, improves resource efficiency, and enhances the overall management of cloud resources. By leveraging automation tools and practices, organizations can achieve greater agility and reliability in their cloud deployments while minimizing operational overhead and costs.</p><p>See <a href="https://github.com/tipson007">GitHub</a> for code</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8ec9efdd84b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/automated-aws-snapshot-management-pipeline-with-boto3-in-azure-devops-f8ec9efdd84b">Automated AWS Snapshot Management Pipeline with Boto3 in Azure DevOps</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create your Vpc via Terraform]]></title>
            <link>https://tipsontee.medium.com/create-your-vpc-via-terraform-4f6cedecf5a?source=rss-8c7ecb7cd5df------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f6cedecf5a</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Samuel .O]]></dc:creator>
            <pubDate>Wed, 31 Aug 2022 21:34:41 GMT</pubDate>
            <atom:updated>2022-09-01T09:43:54.579Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, I will be referencing my previous article about creating a vpc from scratch. <a href="https://medium.com/@tipsontee/building-a-vpc-from-scratch-e72ded9beeef"><strong>Click here</strong></a><strong> </strong>to help understand the steps I will be walking you through. Terraform has the ability to make your Infrastructure Deployment effecient and easy. First what is terraform? You can find all you need to know about terraform <a href="https://www.terraform.io/intro"><strong>here</strong></a> .</p><p>Let’s get started!!<br>Now that we have built our vpc manually via was console, Now lets look at automating the whole process through code.</p><h4>Prerequisites</h4><blockquote>Terraform installed</blockquote><blockquote>Aws account</blockquote><blockquote>IDE of your choice</blockquote><blockquote>GitHub account</blockquote><h3>Step 1</h3><p>Using visual studio code as the editor of my choice, I installed hashicorp extension in order to properly format my code to use the terraform resources easily.</p><p>You would want to go to your .aws/credentials PATH to put in your aws access/secret keys as shown below.</p><pre>[sam-user]<br>aws_access_key_id = XXXXXXXXXXXXXXX<br>aws_secret_access_key = XXXXXXXXXXXXXXXXXXXXXXXXXXXXX</pre><p>First and foremost, securing your aws access keys and secret keys are highly important, as you would be using that to connect to terraform.</p><p>The first file we will create is Provider.tf file, this is where we configure our aws provider to reference our aws access/secret key to connect to terraform. <a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs"><strong>click here</strong></a> to view documentations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mZkEi0a5BVkPMWtSc8TExw.png" /><figcaption>fig 1.0</figcaption></figure><h3>Step 2</h3><p><strong>Create Vpc</strong></p><p>Checkout the terraform documentation on vpc resources : <a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/default_vpc"><strong>click here</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2GFZOc9SygGkphp0op4xnA.png" /><figcaption>fig 1.1</figcaption></figure><p>In the above code, we created a main.tf file to build our infrastructure resources. Using the terraform documentation, the resource name “sample_vpc” was built. We then picked our CIDR to use. Please <a href="https://cidr.xyz/"><strong>click here</strong></a> to know more about cidr range.</p><h3>Step 3</h3><p>Let&#39;s create our subnets:</p><p>We are going to create both private and public subnet to connect to the vpc. Documentation reference <a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/default_subnet"><strong>here</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9ZQDCbUjYKTM78RMUNjP0A.png" /><figcaption>fig 1.2</figcaption></figure><h3>step 4</h3><h4>Create an Internet Gateway</h4><p>This is a gateway to help communicate with your vpc. The code below shows the vpc_id being attached to the sample_igw .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DJLfQ-XFOXgj7u1jCMOcFA.png" /><figcaption>fig 1.3</figcaption></figure><h3>step 5</h3><h4><strong>Create a Route table</strong></h4><p>Here, we are connecting our route table to the vpc which created, and we are connecting it to the internet gateway. Also the code below shows the association of the route table to the public subnet which we created previously. Please see documentation <a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/default_route_table"><strong>here</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VcBIKdOChx64kTzT9a5TrQ.png" /><figcaption>fig 1.4</figcaption></figure><h3>step 6</h3><h4>Create a Security Group</h4><p>This helps to connect to the ec2 instance. If you notice in the code, there is an “ingress” &amp; “egress” rule. The ingress allows traffic in, lets look at it as the inbound rule while egress allows the exit of traffic, i.e outbound rule.</p><p>The from port: to port: indicates the entry and exit of all traffic as it’s indicated to 0. Also, we have a “-1” protocol, which means all protocols tcp, udp…etc are allowed. The cidr_blocks can be a list of ip address. In the code, I added my personal ip.</p><p>Please Keep in mind that we don’t need a tag here because the security group already has a name attribute</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rMyfDAtadbuAKiyPTE3DrQ.png" /><figcaption>fig 1.5</figcaption></figure><h3>step 7</h3><h4>Create your key pair and ec2 instance</h4><p>The process of creating your key pair is very important, as you would use that key to connect to your ec2 instance. Below code does not expose my key, because I used a terraform file function. See <a href="https://www.terraform.io/language/functions/file"><strong>here</strong></a><strong> </strong>for more Information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u9CR4pl8fs3w3c_Dlpj70A.png" /><figcaption>fig 1.6</figcaption></figure><p>Also, you will noticed the “userdata.tpl” file below. That file has all my configuration script in other to bootstrap my instance</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hhZG_zA-o1v5W4IZzEXRvw.png" /><figcaption>fig 1.7</figcaption></figure><p>In your terminal, do;</p><pre>ssh-keygen -t ed25519</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iVHynL6sUylFzBOnzWtI1Q.png" /><figcaption>fig 1.8</figcaption></figure><p>This will generate a public and private keypair as shown above. Then from the file path, replace id_ed25519 with the keypair name&gt; in my case it’s samplekey.</p><p>why <strong><em>ed25519</em></strong><em>? </em>check <a href="https://www.unixtutorial.org/how-to-generate-ed25519-ssh-key/"><strong>here</strong></a><strong>,</strong> alternatively, you can also checkout<strong> </strong><a href="https://medium.com/u/2e461f0600bb"><strong>Risan Bagja</strong></a>’s article <a href="https://medium.com/risan/upgrade-your-ssh-key-to-ed25519-c6e8d60d3c54"><strong>here</strong></a><strong> .</strong></p><blockquote><em>note: You can do this directly by using terraform code from the docs </em><a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/key_pair"><strong><em>here</em></strong></a><em>, or. you can just simply do it through the terminal.</em></blockquote><p>Below diagram shows the list of keys I have in that directory, we are only focusing on the newly created keys “samplekey &amp; samplekey.pub”. I used a linux command which helps identify the permissions of those files in that directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0nEd09kRIT_xlyI2mI0nSQ.png" /><figcaption>fig 1.9</figcaption></figure><p>do ;</p><pre>chmod 400 samplekey</pre><p>This will change the permission of your private key to read only.</p><p>Now deploy your infrastructure to aws from terraform:</p><pre># aws_vpc.sample_vpc will be created<br>  + resource &quot;aws_vpc&quot; &quot;sample_vpc&quot; {<br>      + arn                                  = (known after apply)<br>      + cidr_block                           = &quot;10.111.0.0/16&quot;<br>      + default_network_acl_id               = (known after apply)<br>      + default_route_table_id               = (known after apply)<br>      + default_security_group_id            = (known after apply)<br>      + dhcp_options_id                      = (known after apply)<br>      + enable_classiclink                   = (known after apply)<br>      + enable_classiclink_dns_support       = (known after apply)<br>      + enable_dns_hostnames                 = true<br>      + enable_dns_support                   = true<br>      + id                                   = (known after apply)<br>      + instance_tenancy                     = &quot;default&quot;<br>      + ipv6_association_id                  = (known after apply)<br>      + ipv6_cidr_block                      = (known after apply)<br>      + ipv6_cidr_block_network_border_group = (known after apply)<br>      + main_route_table_id                  = (known after apply)<br>      + owner_id                             = (known after apply)<br>      + tags                                 = {<br>          + &quot;Name&quot; = &quot;sam-user-vpc&quot;<br>        }<br>      + tags_all                             = {<br>          + &quot;Name&quot; = &quot;sam-user-vpc&quot;<br>        }<br>    }</pre><pre>Plan: 9 to add, 0 to change, 0 to destroy.</pre><p>Go to the console and see your instance running.</p><p>To connect to your ec2 instance, you can follow the steps on aws console by clicking on “connect” this will take you to this page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*NdJLTjVQfic8OnzIF-zRUQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*02WqBTJN35LFZ9W7Xy91iQ.png" /></figure><p>In further article, I will show you how to use <strong>variables</strong>, <strong>modules</strong> and other terraform attributes to make automation effective and efficient.</p><p>Happy terra!!</p><p>See my <a href="https://github.com/tipson007/aws-terraform-project"><strong>github</strong></a> for raw code . Thanks</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f6cedecf5a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Install Apache Tomcat and Java on Your EC2 instance]]></title>
            <link>https://tipsontee.medium.com/install-apache-tomcat-and-java-on-your-ec2-instance-424bbcc6a085?source=rss-8c7ecb7cd5df------2</link>
            <guid isPermaLink="false">https://medium.com/p/424bbcc6a085</guid>
            <category><![CDATA[apache]]></category>
            <category><![CDATA[installation]]></category>
            <category><![CDATA[ec2]]></category>
            <category><![CDATA[tomcat]]></category>
            <category><![CDATA[deployment]]></category>
            <dc:creator><![CDATA[Samuel .O]]></dc:creator>
            <pubDate>Thu, 04 Mar 2021 23:11:42 GMT</pubDate>
            <atom:updated>2021-03-04T23:11:42.047Z</atom:updated>
            <content:encoded><![CDATA[<p>Tomcat is a Java Servlet container and a web sever from the apache software foundation. It can be used as a standalone or behind traditional web servers such as apache httpd. A web server uses the request/response message exchange pattern to serve web pages. Want to know more about apache tomcat, <a href="https://tomcat.apache.org/index.html">click here</a> .</p><h4>Overview:</h4><p>Here, I will show you how to set up an amazon ec2 instance on the AWS management console. I will also install java and apache tomcat on this instance to help deploy a java web application on AWS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*McTGZODh3MH09j63LxyyEg.png" /></figure><h4>Step 1</h4><p>Launch your ec2 instance in a default vpc or a custom vpc, then connect the instance to the network. Refer to <em>“building a vpc to create an instance and connecting it to the server” </em><a href="https://tipsontee.medium.com/building-a-vpc-from-scratch-e72ded9beeef"><em>Click here</em></a></p><p>Then update the privilege to root and do a yum update.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LiWwytSJhmXOD_943c3fPQ.png" /></figure><h4>Step 2</h4><p>Install java on the ec2 instance by configuring the java sdk package. Try to organize your work by creating a folder in the instance directory like i did. In order to do this easily, you need to have some basic knowledge of linux(RedHat or CentOs). I found this whole java setup files handy by using the one and only <a href="https://stackoverflow.com/questions/10268583/downloading-java-jdk-on-linux-via-wget-is-shown-license-page-instead">stack overflow </a>to get my version of java to. download. The highlighted one you see below was what i actually downloaded on to my instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dIv1R3nVy-SEkODXONTcLg.png" /></figure><p>After you have copied that whole rpm file from stack overflow, then paste it on your CLI and run it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F03APXkqTD1J3Wak3WIChA.png" /></figure><p>Then after the process, use the following command to unpack the jar files then check to see the version you installed.</p><pre>sudo rpm -i jdk-8u131-linux-x64.rpm</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*7h1YTDr8GPqEHt_arEy6Bg.png" /></figure><h3>Step 3</h3><p>Install apache tomcat on the ec2 machine. First of of, visit the site <a href="https://tomcat.apache.org/download-90.cgi">here </a>to get the compressed tar folder for the apache sever version.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TPlKcOZUO80XLEygVD_LXA.png" /></figure><p>I am currently installing apache tomcat 9. Copy the tar file and paste it on the CLI, then run it. when that is done, go into the apache-tomcat -9.0.43 folder and open up the bin folder to startup the tomcat server using the shell file. <em>“./startup.sh” . </em>Next step is to run the command below and please see the detailed explanation on the reason behind that command.</p><pre>ps -ef | grep tomcat</pre><ul><li>ps - list processes</li><li>-e - show all processes, not just those belonging to the user</li><li>-f - show processes in full format (more detailed than default)</li><li>grep find lines containing a pattern</li><li>look for lines containing tomcat in a detailed overview/snapshot of all current processes, and display those lines</li></ul><p>Then connect the tomcat server to the local host using the following command</p><pre>wget http://localhost:8080/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PU_o0Ga96ABzJ2R3ri4rTg.png" /></figure><h4>Step 4</h4><p>Use the vi editor to edit the xml file by making the configuration a comment so it doesnt execute. By default the configuration settings wouldn’t help the ec2 instance to run.</p><pre>vi webapps/manager/META-INF/context.xml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p4w7fw559akGbl6L3CBbUg.png" /></figure><p>Here is a displayed diagram of your working ec2 instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qvUOTX6wu2l07dY3VUeiaQ.png" /></figure><p>Now open the public DNS address on your browser to see the tomcat server working. Incase this doesn’t work right away, please do edit your inbound security group of your ec2 instance to open custom TCP to port 8080 for the source 0.0.0.0/0 for ipv4 and ::/0 for ipv6. Then refresh the address and you will get the following displayed page below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*znOr9Zc8f3rmaFMg__2f5w.png" /></figure><blockquote>Next, I will show you how to deploy your web application on your ec2 instance using apache tomcat.</blockquote><p>Services</p><p>ec2</p><p>visualisation</p><p>draw.io</p><p>Thanks for reading….</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=424bbcc6a085" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a VPC from scratch]]></title>
            <link>https://tipsontee.medium.com/building-a-vpc-from-scratch-e72ded9beeef?source=rss-8c7ecb7cd5df------2</link>
            <guid isPermaLink="false">https://medium.com/p/e72ded9beeef</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[vpc]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[drawing]]></category>
            <dc:creator><![CDATA[Samuel .O]]></dc:creator>
            <pubDate>Wed, 15 Jul 2020 12:51:13 GMT</pubDate>
            <atom:updated>2020-10-09T13:52:48.219Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s configure a custom Vpc</p><p>Amazon Virtual personal Cloud (Amazon VPC) allows you to provision a logically isolated section of the AWS Cloud wherever you’ll be able to launch AWS resources in an exceedingly virtual network that you just outline. you’ve got complete management over your virtual networking setting, as well as choice of your own information science address vary, creation of subnets, and configuration of route tables and network gateways. you’ll be able to use each IPv4 and IPv6 in your VPC for secure and straightforward access to resources and applications.</p><p>You can simply customise the network configuration of your Amazon VPC. for instance, you’ll be able to produce a public-facing subnet for your internet servers that have access to the net. you’ll be able to additionally place your backend systems, like databases or application servers, in an exceedingly private-facing subnet with no web access. you’ll be able to use multiple layers of security, as well as security teams and network access management lists, to assist management access to Amazon EC2 instances in every subnet.</p><p><a href="https://aws.amazon.com/vpc/">https://aws.amazon.com/vpc/</a></p><p>Now that you understand what a Vpc is, and what it does, you should be able to play around with it on the console.</p><blockquote>Note: when creating a Vpc by default it has a Route, Route table, Network access control list(NACL), and a Security group.</blockquote><p>On your console, go to services and search for Vpc under networking and content delivery.</p><blockquote>Note: do not launch Vpc wizard!</blockquote><p>When you examine your default Vpc, you will see it has 3 subnets associated with it, including a Route table, an Internet gateway(allows your Vpc to communicate with your internet), then you have your NACL and also a Security group.</p><h3>Let’s get started</h3><h4>Architecture:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*3kXnBmbDj9caB5uDKGE-pA.png" /></figure><h4>Step 1</h4><p><strong>Create Vpc</strong></p><p>Add name, just as you see in the figure below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BIi4k1lnIBBXGlkMrsZDTw.png" /></figure><p>IPv4 CIDR block* (internet protocol version 4) (classless inter-domain routing) should be the largest address you can assign which is what you’ll use. You’ll be using the amazon ipv6. Leave the tenancy as default. Then click on create.</p><p>Now look through the newly created Vpc and see what services was configured when you created the Vpc. You will discorver that on the creation of your new Vpc, a Router, a Route table, a NACL, a Security group was created by default just as shown in the diagram below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uBFssNt1qWbE2lEV_DDHkA.png" /><figcaption>Initial Vpc configuration</figcaption></figure><h4>Step 2</h4><p><strong>Let’s create a subnet</strong></p><p>Hover to the left of your Vpc dashboard and create a subnet. Add name(whatever suits you), then under VPC CIDRs, search for your Vpc you created and click that. Input an availability zone for your subnet just as shown below. Input your CIDR address as shown. Then click create.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gzN6C8rkE7JsUMgzuRY7XQ.png" /></figure><p>Repeat the process for another subnet. But this time, change the availability zone and the CIDR address.</p><blockquote>Note : availability zones are random and also you can’t have a subnet span availability zone(1 subnet = 1 availability zone)</blockquote><p>Next, you’ll like to make one of your subnet as private and the other as public. Incase you are wondering why there are only 251 IP address instead of 256.</p><blockquote>Note that aws reserves 5 IP addresses. Check this link <a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html#VPC_Sizing"><strong>here</strong></a> for more information.</blockquote><p>Select the subnet you want to modify and click on action, then go to modify auto assign IP settings. Then enable it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EikHmyLoWkcf3STvctxeDA.png" /></figure><p>This is what your Vpc should look like now</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*cGdY2pAqHtA7t2fDVmu61w.png" /><figcaption>Vpc with public &amp; private subnet</figcaption></figure><h4>Step 3</h4><p><strong>Create an internet gateway</strong></p><p>This helps you communicate with your Vpc</p><p>Create your internet gateway. Notice it’s status is on “detached” so go to actions and attach to Vpc, then select your Vpc and attach it. Then save.</p><blockquote>Note : you can only have 1 internet gateway per Vpc</blockquote><h4>Step 4</h4><p><strong>Create a Route table</strong></p><p>Give it a name, assign it to your Vpc and then click create. Whenever you create a subnet, it will be associated with the main Route table.</p><p>Always keep your default Route table as private due to security reasons. In order to associate it with the internet, Click on edit route. Add Route to make public, destination- 0.0.0.0/0 and target- select your internet gateway. To add an ipv6, you can input the destination as- ::/0 and the target- select your internet gateway. Then click save routes. Any subnet associated with this Route table will automatically become public.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*marEn0WLSfOGA1m_9rTOjg.png" /></figure><p>Click on subnet associations, edit subnet and then add the subnet to your Route table. That will associate your subnet with your Route table.</p><h4>Step 5</h4><p><strong>Launching an ec2 instance</strong></p><p>Launch your instance using the amazon Linux AMI if you are on free tier, t2micro, then change the Vpc from default to your Vpc. Select your public subnet. The auto assign-subnet public IP address is enabled by default. Leave everything else as default. Next add your storage, add your tags then configure your security groups. Create a Security group and add a Route to the internet just as shown below. Then launch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YYZ7k8dcXBnL3jDBIsq4ig.png" /></figure><blockquote>Note: security groups do not span Vpc’s</blockquote><p>Create a new key pair and download it.(make sure you keep it save as you’ll need it to ssh into your instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BBBZ8dmdRyK79CJjrtis5A.png" /></figure><p>Repeat the process for the second ec2, but this time associate it with your other subnet. Choose an existing security group which is your default “security group”. Then launch using the same key pair.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JlUCW-wgllT9lw397MmlXQ.png" /></figure><h4>Step 6</h4><p><strong>Connecting to your ec2 instance using the CLI(Command Line Interface)</strong></p><p>You need to be familiar with Linux to understand what is going to be done here. Find the path. Next you’ll do the required permission as it’s a new key pair. Please reach this link <a href="https://linuxacademy.com/guide/12593-understanding-linux-permissions/#:~:text=There%20are%20three%20types%20of%20permissions%20%E2%80%93%20read%2C%20write%2C%20and,code%20contained%20in%20the%20file."><strong>here </strong></a>understand about Linux file permission. <em>(Sad story to learn from- I had an interview sometimes back, which was based on using linux command, I took it for granted as I am very familiar with the commands on linux as I use it on daily basis. Little did I know, when asked on the interview, I failed to hit the main detail of using that permission)</em>.</p><p>Understand your r-w-x permission very well and do not take it for granted.</p><p>Next you want to ssh into your instance. Use the command below to archive this.</p><pre>$ ssh ec2-user@your public ip address -i MyOhKP.pem</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DzSkrv65tKguX8e7XDlWww.png" /></figure><p>Copy your public IP address from your instance and paste it when typing the command. You’ll then be able to see that your ec2 instance has now been connected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YqpK3L61_3DOj85bPfi25A.png" /></figure><p>This is what your Vpc should look like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*3kXnBmbDj9caB5uDKGE-pA.png" /><figcaption>Vpc</figcaption></figure><blockquote>Note: you can only communicate with your public instance and not your private instance.</blockquote><p>Then elevate your privilage to root with the command “sudo”.</p><h4>Step 7</h4><p><strong>Create a security group for your second instance</strong></p><p>Give it a name just as shown below, attach it to your Vpc. Next add your inbound rules. Here you will be able to use this set of rules to communicate with your ec2 instance inside the security group.</p><blockquote>Note: know your ports and protocols.</blockquote><p>First thing you want is ICMP(Internet Control Message Protocol) In order to be able to ping your ec2 instance in this security group. In your source you can use your security group 1 or use it’s IP address range(10.0.1.0/24). Allow the various ports as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SqTpLYO8r_UY5nVDmffU4A.png" /></figure><p>Next go to your ec2 dashboard on the console and select your 2nd instance, click on action and hover to networking, then change security groups. Make sure you select the security group you created for your second instance as shown below otherwise you won’t be able to ping your private IP address or connect your instance via ssh.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1NQVNKBvU0FqaDVp-EGJqA.png" /></figure><p>Next copy and paste your private IP address after typing ping as shown below to see how it works. Just as you can ping google.com to test your Linux environment to the internet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mGO5mY3UDaLdP2grQtzzIg.png" /></figure><h4>Step 8</h4><p><strong>Ssh into your private server</strong></p><p>In doing so, you should ensure you have a bastion host for security purpose, but you’ll do this another way, by using the private key. You can open it using a text editor and copy it to the file you are creating. You want to use the command:</p><pre>$ nano MyPvKey.pem</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-LLvRJ0panj_cqh8denJHw.png" /></figure><p>Paste it and then click ctrl x then enter.</p><p>Then, chmod it as it’s a new key pair. To know more about the change permissions, click <a href="https://chmodcommand.com/chmod-400/"><strong>here</strong></a><strong>.</strong></p><pre>$ chmod 400 MyPvKey.pem</pre><p>Then connect the private ec2 instance by using the command:</p><pre>$ ssh ec2-user@your private ip address -i MyPvKey.pem</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hK99c7EUSAxd8cbfmGAqWA.png" /></figure><p>As you can see, you are now connected to your private instance. You have successfully ssh into your database server which is in your private subnet.</p><p>That is all for this project.</p><h4>Services</h4><blockquote>VPC</blockquote><blockquote>EC2</blockquote><blockquote>CLI</blockquote><h4>Visualization</h4><blockquote>draw.io</blockquote><p>Thanks for reading..</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e72ded9beeef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Alexa Skill With Lambda]]></title>
            <link>https://medium.com/swlh/alexa-skill-with-lambda-dcdb40e5925d?source=rss-8c7ecb7cd5df------2</link>
            <guid isPermaLink="false">https://medium.com/p/dcdb40e5925d</guid>
            <category><![CDATA[lambda]]></category>
            <category><![CDATA[alexa]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[build]]></category>
            <category><![CDATA[s3]]></category>
            <dc:creator><![CDATA[Samuel .O]]></dc:creator>
            <pubDate>Wed, 08 Jul 2020 12:14:07 GMT</pubDate>
            <atom:updated>2020-11-03T08:23:57.328Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s build siri’s sister from scratch!!</p><p>Siri is the voice service for apple while Alexa is the voice service for amazon echo. Its very similar.</p><p>Alexa provides a group of inbuilt capabilities, stated as skills. For instance, Alexa&#39;s talents embody enjoying music from multiple suppliers, respondent queries, providing weather forecasts, and querying Wikipedia.</p><p>The Alexa Skills Kit enables you to teach Alexa new skills. Customers will access these new talents by asking Alexa queries or creating requests. you&#39;ll build skills that offer users with many various forms of talents. for instance, a talent would possibly do anybody of the following:</p><p>Look up answers to specific queries (&quot;Alexa, raise tide partaker for the highwater nowadays in Seattle.&quot;)<br>Challenge the user with puzzles or games (&quot;Alexa, play Harry Potter quiz.&quot;)<br>Control lights and different devices within the home (&quot;Alexa, activate the front room lights.&quot;)<br>Provide audio or text content for a customer&#39;s flash making known (&quot;Alexa, provide American state my flash briefing&quot;)</p><p><a href="https://developer.amazon.com/en-US/docs/alexa/ask-overviews/build-skills-with-the-alexa-skills-kit.html#">https://developer.amazon.com/en-US/docs/alexa/ask-overviews/build-skills-with-the-alexa-skills-kit.html#</a></p><p>Architecture: Designed</p><p>It’s pretty easy to design if you understand the platform.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*kaWZXyyLjp9q2-pRklZUdg.png" /></figure><p><strong>Overview</strong></p><p>Skill service, Aws Lambda , Skill interface which comprises of invocation name, intent schema, slot type, uterrances. Here, you’ll build an Alexa skill which can talk to lambda functions and point to S3 bucket where you have your resources.</p><p>step 1</p><p>Create an S3 bucket</p><p>When creating the bucket, remember to put in the region where alexa build is supported. Click on <strong>Permission, </strong>then go to bucket policy and paste your JSON code over there just as shown below. After that copy the arn and paste it in the code, also change the permission to public so it can be accessible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p7UHpboQylJCtzyV-SHgtQ.png" /></figure><p>step 2</p><p>Polly service</p><p>Let’s get started with creating a polly service. Hover to services and search for polly service which you would find under <strong>machine learning</strong>. You’ll be able to listen to the voice over just as seen in the diagram below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4e-CRgDZdLLimgjxf02sYg.png" /></figure><p>Write whatever you feel like and then click on synthesize to s3. Use the same name as your bucket name while leave everything there as default. This will take a few seconds to synthesize. When you see a message just as seen below, know you are on the right track.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6g3P94z7fONBwU3A72zHuw.png" /></figure><p>step 3</p><p>Create a Lambda Function</p><p>What you’ll like to do is create an Alexa skill which will then play these files.</p><blockquote>Example: Hey Alexa, tell me more about Sam!</blockquote><p>Hover to services and click on Lambda, the create a lambda function. There are various options there, but the one which you’ll be using will be<strong> <em>browse serverless app repository. </em></strong>Technically, you don’t need to know how to code when using this but it’s painless if you understand how code works.</p><p>You’ll select the “alexa-skills-kit-nodejs-factskill” then leave everything else as default and then <strong>click deploy. </strong>This will deploy the alexa skill to lambda so as to enable you connect your ARN.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*juOJLqj0f9Xybk0Kv6dkdA.png" /></figure><p>Go to your lambda function and click into it. You’ll see the dashboard with the code editor when you scroll down a bit. The code environment comprises of several languages. This randomly selected code can be used for randomly selecting functions. Scroll down to the space facts and see the body of the message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Es-t_7J3AeogJaJpNnpTGA.png" /></figure><p>step 4</p><p>Alexa developer console</p><p>Create a name, just as you can see below, click on invocation and change the section which says “<em>change me”</em> to whatever name suits you. Scroll down to your endpoint and paste the lambda function ARN in your default region just as shown below. This is pointing your Alexa skill to your lambda function. Then click on save Endpoint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3J9A7P0kxnaBnIJtRjNgYg.png" /></figure><p>Next, go to your intents and click on GetNewFactIntent, where you will see 14 different utterances. you can add any fact you’ll like to know, just as i have added “cloud fact” since we are working with the cloud.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PuYOY-mAp0mwsHCkVcSVKg.png" /></figure><p>After all that, you click on save model and then build model. This eventually takes few minutes to provision. when you. get the message saying the “full build successful”, go to test and enable the skill testing to developement, so you can easily see the JSON input and output code which is intercating with the lambda function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JvLFJTylYJSRgg6cnbVeHA.png" /></figure><blockquote>SSM- Synthesis speach markup language displaying the output: The sun is an almost perfect sphere.</blockquote><p>Note!</p><p>These messages are random as they interact with the lambda function in the code editor. You’ll want to point the lambda function to your s3 bucket.</p><p>Go to s3 services and click on your bucket {alexapollysound} which you created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xJpdetQacwY20jPe-KhGFA.png" /></figure><p>Click on that mp3 file, then click on the Object URL so you can listen to the content you used as input. Copy that URL and hover on to your s3. bucket then paste it in the lamda code environment just as shown below. This directly points to the voice which helps not to generate random messages when asked for cloud facts by Alexa. Then click save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hGTRj6ca1q1q9xc7k0n2mw.png" /></figure><p>So if you want your Alexa to talk, go to the link <a href="https://developer.amazon.com/en-US/docs/alexa/custom-skills/speech-synthesis-markup-language-ssml-reference.html#">here</a> to get the syntax on how to make this work. Then click on save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s8tEu9XA8qryboyYigG_fg.png" /></figure><p>To listen, go back to your Alexa developer console and type “open cloud fact”,</p><p>you will be able to listen to your message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wENUzX1qVWNYY8dZw-3ahw.png" /></figure><p>That completes this project.</p><h4>services</h4><blockquote>Lambda</blockquote><blockquote>S3</blockquote><blockquote>Alexa developer console</blockquote><p>Visualization</p><p>draw.io</p><p>Thanks for reading….</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dcdb40e5925d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/alexa-skill-with-lambda-dcdb40e5925d">Alexa Skill With Lambda</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS Lambda Function]]></title>
            <link>https://tipsontee.medium.com/aws-lambda-function-44f22dd8f028?source=rss-8c7ecb7cd5df------2</link>
            <guid isPermaLink="false">https://medium.com/p/44f22dd8f028</guid>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[lambda]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[webpage]]></category>
            <dc:creator><![CDATA[Samuel .O]]></dc:creator>
            <pubDate>Sat, 04 Jul 2020 00:14:33 GMT</pubDate>
            <atom:updated>2020-12-03T10:39:31.349Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Building a Serverless Webpage using Lambda</strong></p><p>AWS Lambda enables you to run code while not provisioning or managing servers. You pay just for the figure time you consume.</p><p>With Lambda, you’ll be able to run code for nearly any style of application or backend service — all with zero administration, simply transfer your code and Lambda takes care of everything needed to run and scale your code with high availability. You’ll be able to originate your code to mechanically trigger from alternative AWS services in any mobile app.</p><h4><strong>Architecture</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q25bZfDL59NGCVFUm3x4Ag.png" /></figure><h4>Overview</h4><p>In this project you’ll create a lambda function from scratch, add a trigger, configure an API gateway request, create an s3 bucket, use the bucket to host a static website, and register a domain name using route 53.</p><p>Getting started</p><p>Step 1</p><p>Create a function, in getting started you are required to pick any from the 3 options. Author from scratch, Blueprints or Aws Serverless Application Repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oJ0IJIDIX4PIG05j1Ujt5Q.png" /></figure><p>From this project, you’ll be required to create from scratch. On this screen you will be required to name your function, choose your runtime environment (python 3.7 is what I’ll be using) or a custom environment. Create a role from template. At the policy template, you want a “simple microservice permission”. Then click on <strong>create function. </strong>This will take some minutes.</p><p>Step 2</p><p><strong>Designer</strong></p><p>Here, you’ll need to understand what can trigger a lambda function. When you scroll down to the bottom of your console page, you’ll find the IDE where you can modify your code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TnxyN1BTU2BiiajNxnHpJA.png" /></figure><p>Using visual studio code editor, I will copy my written python code and then paste it in the IDE.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r9zSVbjlHd17aXggOsStzQ.png" /></figure><blockquote>If anything invokes the code, it will respond with my name.</blockquote><p>Down on the console, we leave everything as default and then modify the basic settings by adding a description. Below is the memory function whereby you can allocate how much memory is delivered to the function as well as the timeout allocated before the function times out. Then click save.</p><p><strong>Configure a trigger</strong></p><p>This will Create an API gateway, you’ll leave everything as default and Modify the role. The click save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kvvWuOi33XC0mIVKum5EpA.png" /></figure><p>So, what this has done is that, it has created a new API endpoint.Click on the first API link and you’ll be redirected to this page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*thBt3Plgfm1f4GX_qngrwA.png" /></figure><p>Click on action then click on delete method. What you’ll do is create a new method and specify a GET request.</p><p>Click on the box (use lambda proxy integration) and then find your function. After that click save and a pop up window asks about granting permission to API gateway. Click ok.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AOk6suTglToVbvbQlPPrhw.png" /></figure><p>Next you’ll deploy an API. In the deployment stage make it default and name it. After that, click on GET then click on the link “invoke URL:….” Then you’ll be able to see your name as written in the python script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*477MjPdUgXaPHcocy1zCxg.png" /></figure><p>You’ll need to add the API gateway link into your html file as shown in the figure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pkY0fyuFHdlXjp9IqCqmIA.png" /></figure><p>What this is doing is when you click it, it will call this function and send a GET request to the API gateway.</p><p>Step 3</p><p><strong>Create an S3 bucket</strong></p><ul><li>Ensure you have your domain name registered</li><li>Ensure your bucket object permission is public</li><li>Ensure your bucket name is same as your domain name registered.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gqhde_aWT9zEvTVEWo9zmw.png" /></figure><p>Next you’ll go to properties and click on static website hosting in order to use this bucket to host your website. Now upload your index.html and error.html files in your S3 bucket and make them public.</p><p>click on the index.html file and see how the link redirects you to the webpage. which looks like the figure below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*56MgowMTjKxsn7B2qszwZg.png" /></figure><p>That’s the project done| but if you want to go further, you can hook up Route53 to your bucket. Go to your domain and create a record set for your domain name. when this is linked, DNS takes some few seconds to propagate so don’t get upset if the page doesn’t load. Just have it on your mind that “ its not DNS|it can’t be DNS|it was DNS”.</p><p>Eventually when the webpage load, it will be communicating with API gateway which is talking to Lambda and passing the response back to API gateway, which then passes the response back to the browser.</p><p>That’s all for this project.</p><p>Languages</p><ul><li>Python</li><li>Html</li></ul><p>Services</p><ul><li>Lambda</li><li>API gateway</li><li>S3</li><li>Route 53</li></ul><p>Tools for visualization</p><ul><li>Cloudcraft</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44f22dd8f028" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>