<?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 Marzena Pugo on Medium]]></title>
        <description><![CDATA[Stories by Marzena Pugo on Medium]]></description>
        <link>https://medium.com/@maz.pugo?source=rss-87694fcf8a07------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*EFHsSMWgiKvbEDBxmNm-OQ.jpeg</url>
            <title>Stories by Marzena Pugo on Medium</title>
            <link>https://medium.com/@maz.pugo?source=rss-87694fcf8a07------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 06:15:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@maz.pugo/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[Multi-Agentic AI Workflows on Amazon Bedrock]]></title>
            <link>https://medium.com/@maz.pugo/multi-agentic-ai-workflows-on-amazon-bedrock-8169a753f316?source=rss-87694fcf8a07------2</link>
            <guid isPermaLink="false">https://medium.com/p/8169a753f316</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[amazon-bedrock-agents]]></category>
            <dc:creator><![CDATA[Marzena Pugo]]></dc:creator>
            <pubDate>Sun, 07 Jun 2026 13:40:48 GMT</pubDate>
            <atom:updated>2026-06-16T14:28:31.724Z</atom:updated>
            <content:encoded><![CDATA[<h3>What This Lab Is About</h3><p>Amazon Bedrock removes the complexity of model training, infrastructure management, and scaling, making it straightforward to build intelligent multi-agent applications. This lab walks through building a multi-agent travel recommendation system end-to-end from data storage to a working web interface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*_BCJz2q0cZVZjlmPrY-TLw.png" /></figure><h3>Overview</h3><p>I built a <strong>multi-agent travel recommendation system</strong> on Amazon Bedrock that allows users to search for hotels and restaurants through a single natural language interface. Rather than relying on one large, complex prompt, I split responsibilities across specialised agents coordinated by a central supervisor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*OmjHmN89G9UyPrGB8I8crw.png" /></figure><h3>What I Built</h3><h4>- Data Layer</h4><p>I created an Amazon S3 bucket and populated it with two datasets: hotels.json containing hotel names, cities, and prices, and restaurants.json containing restaurant names, cities, and cuisines. This served as the grounding data source for both agents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*uEF1AGFeeHjolMHaOUlYfw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*RyXTIIgVl-EHcYOR2exc6Q.png" /></figure><h4>- Hotel Agent</h4><p>I built a HotelAgent that handles user queries based on city and budget. I connected it to an AWS Lambda function via an action group, which retrieves and filters hotel data directly from S3 and returns matching results to the user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/1*yGoDHvv_-l29enAZGCchRg.png" /></figure><h4>-Restaurant Agent</h4><p>I built a RestaurantAgent that handles user queries based on city and cuisine type. Similarly, I connected it to its own AWS Lambda function that queries the restaurant dataset from S3 and returns relevant matches.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*CpG1ideh-W7BreoXetLG_w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*ti7OiiNITCfaNVzpIx4wMg.png" /></figure><h4>-Supervisor Agent</h4><p>I created a SupervisorAgent to act as the central orchestrator. It interprets the user’s intent and decides whether to invoke the HotelAgent, the RestaurantAgent, or both in parallel. Once results are returned, it merges them into a single, structured travel guide response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*UYZvQF8ncMK7vfphjLjsxQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DJ1YBl-8-Evx5dMeUbHfrA.png" /></figure><h4>-Web Application</h4><p>I integrated the SupervisorAgent with a Flask web application, giving users a simple search bar to submit natural language queries and receive clear, structured recommendations in real time- completing the full end-to-end loop:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BjLcLhBgSPLDg4lBkGf1Fg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*Lk_a01MzD4bP_7Z69MYNFQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SOBX9YFXdyocY9HNSMlX0A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*ybCWyetWxMQee2jOj3LyQg.png" /></figure><h3>Key Takeaways</h3><ul><li>How to design and configure Bedrock Agents with action groups and Lambda backends</li><li>How to implement multi-agent collaboration with a supervisor orchestration pattern</li><li>How to ground agent responses in data I control using S3</li><li>How to use Bedrock traces to inspect agent reasoning and sub-agent delegation</li><li>How to connect a Bedrock-powered backend to a real frontend application</li></ul><p></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8169a753f316" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Prompt Engineering for Research (with Claude AI)]]></title>
            <link>https://medium.com/@maz.pugo/prompt-engineering-for-research-with-claude-ai-c85c511d5451?source=rss-87694fcf8a07------2</link>
            <guid isPermaLink="false">https://medium.com/p/c85c511d5451</guid>
            <category><![CDATA[prompt-engineering]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Marzena Pugo]]></dc:creator>
            <pubDate>Sun, 26 Apr 2026 11:11:46 GMT</pubDate>
            <atom:updated>2026-04-26T11:11:46.516Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*QEr5_RCsLtWZeo8w5MyOrA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DHonwwjfbX7fVf8xVSuSWw.png" /></figure><h3>Introducing Today’s Project</h3><p>In this project, I will apply four core prompt engineering techniques to address real research methodology tasks using Claude.</p><p>These tasks include generating methodology recommendations, designing research instruments, analysing data, and stress-testing a research design.</p><p>I will also develop a tested collection of research-focused prompts that demonstrate the use of role prompting, iterative refinement, chain-of-thought prompting, and adversarial prompting.</p><h3>Key tools and concepts</h3><p>In this step, I am:</p><ul><li>setting up a Claude account</li><li>downloading a sample dataset for research</li><li>verifying the setup by starting a new conversation</li></ul><h3>Challenges and wins</h3><p>In this step, I am learning how to use role prompting to shape an AI’s expert perspective in research tasks, and how this influences the quality of its outputs.</p><p>I am:</p><ul><li>crafting a role prompt that assigns Claude a research methodology expert persona</li><li>generating a methodology recommendation based on a research question</li><li>evaluating how role framing affects the clarity, depth, and usefulness of the response</li></ul><h3>Why I did this project</h3><p>In this step, I am starting with a broad prompt and then sharpening it through follow-up conversations with Claude. This mirrors how real researchers draft, test, and revise their instruments before going into the field.</p><h3>What I learned</h3><p>The key tools I used include:</p><ul><li>Claude</li><li>Prompt engineering techniques (role prompting, chain-of-thought, iterative refinement, adversarial prompting)</li><li>Research methods frameworks (quantitative, qualitative, and mixed methods design)</li></ul><h3>How long did it take</h3><p>This project took me approximately 60 minutes. The most challenging part was integrating multiple prompt engineering techniques into one coherent mega-prompt without making it complex.</p><p>I did this project today to learn how to design and use advanced prompt engineering techniques to generate structured, high-quality research methodology proposals.<br>Another skill I want to learn is how to apply these prompting techniques in real-world workflows, such as automating parts of research.</p><h3>Key concepts I learned include:</h3><ul><li>how to structure high-quality prompts so the AI produces more reliable and academically rigorous outputs</li><li>the importance of aligning research design components (research question, variables, data collection, and analysis)</li><li>operationalisation of variables, especially how abstract concepts (like motivation or belonging) are translated into measurable survey items</li><li>the strengths and limitations of different methodologies, and when to use quantitative, qualitative, or mixed methods approaches</li><li>the value of adversarial thinking, identifying weaknesses in a design before data collection</li><li>iterative refinement as a process, improving outputs step by step rather than expecting a perfect first result</li></ul><h3>Getting an Expert Methodology Recommendation</h3><p>In this step, I use adversarial prompting to instruct an AI model-Claude to act as a critical peer reviewer. This framing positions the model as a sceptic, encouraging it to identify weaknesses, hidden assumptions, and threats to validity in a given research design. I then compare these outputs with those generated from a neutral prompt, evaluating differences in depth, specificity, and critical insight. This comparison allows me to verify whether adversarial prompting produces more rigorous and diagnostically useful feedback.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2sAAE8PmZ6A_h8zeMJ78Uw.png" /></figure><h3>What Claude recommended</h3><p>Claude recommended using a quantitative approach, specifically Multiple Linear Regression (MLR), with a hierarchical (blocked) regression design, because it best fits the research question. and dataset, allows comparison of predictors, controls for confounding variables.</p><h3>How role prompting shaped the response</h3><p>The role-prompted response was different because it framed the AI as a research methodology expert, which led to more structured reasoning, use of academic terminology, and stronger justification of methodological choices rather than just listing general suggestions.</p><p>This expert framing made the output more:</p><p>-focused on the specific research question-detailed, with step-by-step methodological reasoning</p><p>-academic in tone, using concepts like regression, sampling, and validity</p><p>-analytical, by explaining why methods were appropriate rather than only what to use</p><h3>Designing a Data Collection Instrument</h3><p>Iterative refinement is useful because it turns a rough set of questions into a valid, reliable, and research-ready instrument, improving both the quality of the data collected and the strength of the conclusions you can draw from it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*TfZELfMbzqpHbTlTAAiv7g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-kwWin65v5qYOLbihmmT1A.png" /></figure><h3>Refining through iteration</h3><p>I improved my instrument by reordering the questions into a logical general-to-specific flow, simplifying technical or academic jargon into plain language that non-expert respondents can understand, and refining question wording to reduce ambiguity and cognitive burden while improving clarity and response accuracy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UHzOGQr3Qn7p3ofSWfdnIQ.png" /></figure><h3>Walking Through a Step-by-Step Analysis</h3><p>In this step, I am preparing to write a chain-of-thought prompting strategy for data analysis, in order to guide Claude through a structured, step-by-step interpretation of my dataset. I will use this approach to generate a complete analytical output where Claude systematically explains its reasoning at each stage of the analysis, rather than providing a superficial summary. Finally, I will evaluate the clarity, coherence, and reliability of the step-by-step analytical process produced.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*0aNkJk8k0clL-fGO9l1uIw.png" /></figure><h3>Why chain-of-thought prompting works</h3><p>I used chain-of-thought prompting, which works because it guides Claude to break down the analysis into clear, logical steps and explain its reasoning a teach stage, leading to more structured, thorough, and transparent outputs rather than shallow or incomplete answers. Asking Claude to explain each step produces better results because it forces the model to follow a structured analytical process instead of jumping straight to conclusions.</p><h3>Evaluating AI-generated analysis</h3><p>One clear strength was that the step-by-step structure made the analysis easy to follow and logically organised, with each stage (for example: summary statistics, patterns, relationships) building on the previous one. This improved transparency and made it easier to understand how conclusions were reached. One limitation was that, despite the structured reasoning, some interpretations could still be overly confident or not fully validated by the data, meaning the explanation sounded convincing but still required critical checking to ensure accuracy.</p><h3>Stress-Testing a Research Design</h3><p>One weakness the critique found was the reliance on self-reported survey data for key variables like study time and attendance. This matters because self-reported data is often biased or inaccurate, which can distort the statistical relationships in your analysis and lead to misleading conclusions about which factors truly influence academic performance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D3kthIrnLtI3AK4tW9JvFg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*2hKDGGOub2MKxtsYDNYnWA.png" /></figure><h3>Adversarial vs neutral prompting</h3><p>The adversarial critique was different because it focused on stress-testing the design by actively looking for weaknesses and potential sources of bias, rather than evaluating how well the components fit together overall.</p><p>I found the adversarial version more useful because it highlighted risks that could directly undermine the validity of my findings, such as measurement error or model mismatch While the general feedback help me to design the feedback, the adversial technique pushed me to think more critically what could go wrong.</p><h3>Building a Reusable Mega-Prompt</h3><p>In this project extension, I’m combining the four techniques because each one addresses a different weakness in AI-generated outputs, and together they create a much more reliable result.</p><p>Role prompting ensures the response has the right expertise and tone, chain-of-thought prompting improves reasoning quality, iterative refinement strengthens clarity and structure, and adversarial prompting exposes hidden flaws or risks.</p><p>Used in isolation, each technique helps, but combined hey act as a system of checks. A mega prompt is an approach how professionals build reliable, repeatable AI workflows.</p><h3>Mapping techniques to prompt sections</h3><p>In this project extension, I built the mega-prompt by combining all four techniques into a single prompt. Each labelled section tackles a different weakness. The ROLE section uses role prompting to prevent generic answers. CHAIN OF THOUGHT uses chain-of-thought prompting to prevent shallow analysis. SELF-CRITIQUE uses adversarial prompting to catch errors. The sections are modular and reusable, so you can swap in any research question without rewriting the structure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*tARDSVW73Yb7wFVGiRStHQ.png" /></figure><h3>Testing the combined approach</h3><p>In this project extension, I built the mega-prompt by combining four complementary prompting techniques into a single structured workflow, where each labelled section plays a specific role in improving the quality, depth, and reliability of the output.</p><p>[ROLE] -Role prompting</p><p>[CHAIN OF THOUGHT] -Chain-of-thought prompting</p><p>[ITERATIVE REFINEMENT] -Iterative refinement prompting</p><p>[SELF-CRITIQUE] -Adversarial prompting</p><p>[TASK] and [OUTPUT FORMAT] -Structure and consistency</p><p>Together, these sections transform the prompt from a simple request into a multi-stage reasoning and evaluation process, which is why the mega-prompt produces more robust and academically credible methodology proposals.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*XsxnAl-LfabNQ_ZDtqCA5g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/1*VtxCpvbj53-LKKHnKRPU0A.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c85c511d5451" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Prompt Engineering for Healthcare (with Claude AI)]]></title>
            <link>https://medium.com/@maz.pugo/prompt-engineering-for-healthcare-544113274d0e?source=rss-87694fcf8a07------2</link>
            <guid isPermaLink="false">https://medium.com/p/544113274d0e</guid>
            <category><![CDATA[claude-ai]]></category>
            <category><![CDATA[prompt-engineering]]></category>
            <dc:creator><![CDATA[Marzena Pugo]]></dc:creator>
            <pubDate>Sat, 11 Apr 2026 14:10:53 GMT</pubDate>
            <atom:updated>2026-04-11T14:12:09.368Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*pg-Uc7He_ncQb5AaIAm3yA.png" /></figure><h3>Introducing Today’s Project</h3><p>In this project, I’m going to a Claude Project with specialty-specific custom instructions that acts as a reusable clinical AI assistant for drug interactions, patient education, and differential diagnosis. I want to learn this because.it will help me build real-world AI tools that can support clinical decision-making and improve patient safety.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*toaOjF9oWSvNdYuR2kwOGA.png" /></figure><h3>Key tools and concepts</h3><p>The services I used were Claude Code and Prompt Engineering.. In this project, I built a fully configured Clinical AI Assistant in Claude with safety guardrails, optimized prompts, and structured outputs.. Key concepts I learned include: Role Prompting to simulate a clinical pharmacist for drug interaction analysis Audience Adaptation Prompting to tailor medical information for different reading levels Structured Output Formatting for clear and consistent differential diagnosis reports Claude Projects, Styles, and Skills to create reusable and efficient workflows Safety Guardrails, including citation requirements, uncertainty flagging, and refusal to provide definitive diagnoses.</p><h3>Challenges and wins</h3><p>This project took me approximately 60 minutes. The most challenging part was designing the prompts with the right level of detail while ensuring the AI followed strict safety guardrails, especially when adding structured outputs and preventing hallucinations. It was most rewarding to see how small prompt improvements significantly changed the quality and reliability of responses, and to successfully build a reusable Clinical AI Assistant in Claude that can handle drug interactions, patient education, and differential diagnosis in a structured and safe way.</p><h3>Why I did this project</h3><p>I chose to do this project today because I wanted to learn how to apply prompt engineering in a real-world scenario, especially in healthcare where accuracy and safety are critical. This project did meet my goals because it showed me how to go beyond basic prompts and build a structured, reliable AI assistant using Claude. I learned how to add safety guardrails, and improve response quality.</p><h3>Configuring the Clinical AI Assistant</h3><p>In this step, I am setting up a new Claude Project called “Clinical Assistant.” I will add base Project instructions with your medical specialty and role context.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*L4qf8yOCnWD7EN0Nmpp1gw.png" /></figure><h3>Why Safety Disclaimers Matter</h3><p>I added safety disclaimers because every response Claude generates will include appropriate caveats. This builds a habit of treating AI output as a brain storming tool, not a clinical authority. It helps to ensure that safety is consistent (the AI does not forget to include cautions in high risk scenarios), users stay critical(clinicians are reminded to apply their own judgement) an the risk is reduced.</p><h3>Checking Drug Interactions With Role Prompting</h3><p>In this step, I’m going to use role prompting to make Claude respond as a clinical pharmacist, test drug interaction checks with sample medication pairs and then iterate on my prompt to improve specificity and clinical relevance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*rDQGT95HviDexWPCUXNesQ.png" /></figure><h3>Analysing Interaction Results</h3><p>I tested the interaction between Metformin + Lisinopril Claude identified a Minor to Moderate severity interaction, driven primarily by pharmacodynamic mechanisms , specifically ACE inhibitor-enhanced insulin sensitivity potentiating hypoglycaemia risk alongside an indirect physiological cascade whereby lisinopril-induced renal impairment could increase metformin accumulation and raise lactic acidosis risk.</p><p>The combination is generally considered safe but warrants monitoring of renal function, electrolytes, and blood glucose.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*SARiefpnXhajGPze1zZmaQ.png" /></figure><h3>Simplifying Medical Content for Patients</h3><p>I’m learning to simplify medical content for patients needs. This is important because. Claude can rewrite medical content at specific reading levels, but you need to prompt it correctly. In this step I will use Claude Styles to create reusable writing presets for different reading levels., then apply them to clinical text using audience adaptation prompting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*CkJ7kiloGCsAMbJvX0GbOw.png" /></figure><h3>Testing Without Audience Instructions</h3><p>I noticed that without audience instructions, Claude’s response typically becomes more general-purpose and neutral. Without defined audience it is providing less tailored explanations avoiding anything too technical or too simplistic.</p><h3>Adding Safety Constraints</h3><p>I added constraints to ensure that simplified medical content remains <strong>clinically accurate, safe, and actionable</strong>.</p><ul><li><strong>Maintain Clinical Accuracy</strong> — Simplify language without changing medical meaning, thresholds, or treatment recommendations</li><li><strong>Add “When to Seek Help”</strong> — Clearly tell patients when to contact a doctor or seek urgent care</li><li><strong>Include a Safety Disclaimer, </strong>ensure every output states that it is educational and not a substitute for clinician advice</li><li><strong>Keep Medication Context Intact, do </strong>not remove drug names, classes, purposes, or escalation logic</li></ul><p>Without these constraints, simplified outputs may become easier to read but <strong>clinically unsafe</strong>, because important medical meaning and safety signals could be lost.</p><h3>Building a Structured Differential Diagnosis</h3><p>In this step, I’m going to use structured output formatting to create a Claude Skill that generates structured differential diagnoses on demand. Unlike Styles (which change how Claude writes), Skills define a specific task that you can trigger whenever you need it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*JidccYP5gZlrnpR_Z43lyA.png" /></figure><h3>Iterating on the Prompt</h3><p>I refined my prompt by adding two key rules to the differential diagnosis skill:</p><ol><li>Ask clarifying questions when information is insufficient If the clinical presentation is too vague to reasonably rank diagnoses, Claude must first gather additional information before generating a differential.</li><li>Include at least one “cannot miss” diagnosis Even if unlikely, Claude must always highlight a serious condition that should not be overlooked.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UU_whWNVxPcs1IayX2xOtg.png" /></figure><h3>Adding a Clinical Safety Layer</h3><p>In this project extension, I’m building a safety layer that protects the project by including things like: citation requirements, explicitly including uncertainty flagging rules , refusal to diagnose guardrail, test the complete safety layer with critical scenario.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*s5ziuInJEUHrhkLYlfnswQ.png" /></figure><h3>Confidence Markers and Citations</h3><p>In this project extension, I added confidence markers because confidence markers give the physician a quick signal about how much to trust each piece of the response. A “HIGH CONFIDENCE” label on a well-known drug interaction means the physician can move fast. A “LOW CONFIDENCE” label means they should double-check before acting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*rWPzXEVtcebi_yJWRcdlsQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=544113274d0e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build a CI/CD Pipeline for the 2048 Game using AWS CodePipeline, ECS, and ECR]]></title>
            <link>https://medium.com/@maz.pugo/build-a-ci-cd-pipeline-for-the-2048-game-using-aws-codepipeline-ecs-and-ecr-a6a080f1dce4?source=rss-87694fcf8a07------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6a080f1dce4</guid>
            <category><![CDATA[aws-ecs]]></category>
            <category><![CDATA[aws-ecr]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Marzena Pugo]]></dc:creator>
            <pubDate>Wed, 08 Apr 2026 15:15:07 GMT</pubDate>
            <atom:updated>2026-04-08T15:15:07.819Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0vCl58bsgj5A7xtr1i_d4Q.png" /></figure><h3>Project Overview</h3><p>This project focuses on setting up a CI/CD pipeline for deploying a Dockerized version of the 2048 game to AWS. The pipeline automates the process of building, testing, and deploying the game to a scalable infrastructure using <strong>Amazon ECS, Amazon ECR</strong>, and <strong>AWS CodePipeline</strong>.</p><h3>In this project I have :</h3><ul><li>build and pushed a Docker image of the 2048 game to <strong>Amazon ECR</strong>.</li><li>set up a <strong>CodePipeline</strong> to automate the build and deploy process.</li><li>deployed the Dockerized game to <strong>Amazon ECS</strong> using a <strong>Fargate</strong> launch type.</li></ul><h3>Steps to be performed:</h3><ul><li>set Up ECS Cluster and ECR Repository</li><li>prepare the 2048 Game Code</li><li>set Up CodeBuild for Continuous Integration</li><li>set Up CodePipeline for Continuous Deployment</li></ul><h3>Key Services Used</h3><ul><li><strong>AWS CodePipeline</strong>: orchestrates the CI/CD pipeline, automating the build, test, and deployment stages. <strong>(automation)</strong></li><li><strong>Amazon ECS</strong> : deploys and manages containerized applications using Fargate for serverless container management <strong>(Deployment)</strong></li><li><strong>Amazon ECR</strong>: stores and manages Docker images used in the ECS tasks. <strong>(Container Registry)</strong></li><li><strong>AWS CodeBuild</strong>: handles the build phase of the pipeline, including Docker image creation <strong>(Build)</strong></li><li><strong>IAM Roles &amp; Policies</strong>: ensure secure access between the services involved <strong>(Permissions)</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*e_ncXfF1jIymI8BYTe7yLw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*hDnOGglNRX1BE5aLP9gCXg.png" /></figure><h3>Final result</h3><p>Once my pipeline is set up, my project will have:</p><ul><li>automatically build a docker image of 2048 game</li><li>pushed image to Amazon ECR</li><li>deployed game to ECS Fargate</li><li>the deployment process will be automated</li></ul><h3>Set up</h3><ul><li>Install Docker</li></ul><p><em>sudo apt-get update</em></p><p><em>sudo apt-get install ca-certificates curl gnupg</em></p><p><em>sudo install -m 0755 -d /etc/apt/keyrings<br>curl -fsSL </em><a href="https://download.docker.com/linux/ubuntu/gpg"><em>https://download.docker.com/linux/ubuntu/gpg</em></a><em> | sudo gpg — dearmor -o /etc/apt/keyrings/docker.gpg<br>echo “deb [arch=$(dpkg — print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] </em><a href="https://download.docker.com/linux/ubuntu"><em>https://download.docker.com/linux/ubuntu</em></a><em> $(lsb_release -cs) stable” | sudo tee /etc/apt/sources.list.d/docker.list &gt; /dev/null</em></p><ul><li>Install Docker Engine:</li></ul><p><em>sudo apt-get update<br>sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin</em></p><ul><li>Verify installation</li></ul><p><em>docker — version</em></p><ul><li>Start Docker and verify if Docker is running:</li></ul><p><em>sudo systemctl start docker</em></p><ul><li>Enable Docker Without <em>sudo</em></li></ul><p><em>sudo usermod -aG docker $USER</em></p><ul><li>Install and configure AWS CLI</li></ul><p><em>aws configure</em></p><h3>Containerize the application</h3><p>In this step I will get 2048 game code, containerize it with Docker and deploy it on ECS.</p><ul><li>I create a Dockerfile</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*4Qwe9W9j8cskA62YJ2nFxA.png" /></figure><ul><li>Build Docker image locally</li><li>Test the container running Docker run</li></ul><h3>Push image to Amazon ECR</h3><ul><li>In this step I create an ECR repository</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w_gyFBOR6T2adoNL3R_qdw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VJpl4J0MAxFYwQwtEFGWcA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IWWNRztEsvIVdhCVU8WwlQ.png" /></figure><ul><li>Authenticate Docker with AWS</li><li>Tag and push Docker image to ECR</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*G5MRy5_jxhyBXzR3lQmQsQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ayOLJvlH9cA6BYBJcf4u0g.png" /></figure><h3>Deploy application to ECS</h3><ul><li>In this step I create an ECS cluster</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DzCELEGsobBCxjKDMGISVQ.png" /></figure><ul><li>Define Task definition using my ECR image</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZdHcpvJnEp-RMVuakZXmCg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yQEWToyhrjyfcvhpRyqFjw.png" /></figure><ul><li>Create a Service to run and expose the application</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ehV-8VhXBObNNw0FjCFUDA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VF8-jsKgJAR3fA3yDnl88Q.png" /></figure><h3>Set up CI/CD Pipeline</h3><ul><li>I created IAM roles for CodeBuild and CodePipeline</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PX8diGspZVSFHULMFpA9uQ.png" /></figure><ul><li>S3 bucket for artifacts</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mQITGy6Z3GIwCzrrFk4tHg.png" /></figure><ul><li>Set up CodeBuild project (build + push image)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gLKeVDUCV_Bh80NfNQFw2w.png" /></figure><ul><li>Create CodePipeline</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a9W7mCVhvyXQDFt3HQctqw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_2ON0o8id53UEb39DbgZug.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BHk8KHoopPJ5GF6P1E9hjg.png" /></figure><ul><li>Deploy ECS</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-4Tdo3uAo9zBGBsW3-Bmjg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mwo1PYIvYK5bHxtcJO6sYg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y5lGJtsfhfROeKMm-N9ZkQ.png" /></figure><h3>Test the pipeline</h3><ul><li>Modify the file index.html ( add your name)</li><li>Commit and push to Github</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*7QrF_Tl0-hQvsjW07l7xlA.png" /></figure><ul><li>Observe the pipeline deployment</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mwo1PYIvYK5bHxtcJO6sYg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7m1K8U2eze-b02Q74RkWZQ.png" /></figure><ul><li>Check the change via ECS public IP address</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*udZIDD9zySgH37SAAX3c9A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0vCl58bsgj5A7xtr1i_d4Q.png" /></figure><h3>Final Outcome</h3><ul><li>in this project, I built a CI/CD pipeline where every push to GitHub triggers the build process automatically.</li><li>the Docker image is then updated in Amazon ECR, and Amazon ECS deploys the latest version of the application.</li><li>this means the whole deployment process is automated and I don’t need to do it manually each time I make changes.</li></ul><p><a href="https://github.com/MazPugo/2048-game-ci-cd.git">https://github.com/MazPugo/2048-game-ci-cd.git</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6a080f1dce4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Set Up Claude Code Guardrails]]></title>
            <link>https://medium.com/@maz.pugo/set-up-claude-code-guardrails-23ddea50fd4b?source=rss-87694fcf8a07------2</link>
            <guid isPermaLink="false">https://medium.com/p/23ddea50fd4b</guid>
            <category><![CDATA[anthropic-claude-code]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[agent-guardrails]]></category>
            <dc:creator><![CDATA[Marzena Pugo]]></dc:creator>
            <pubDate>Fri, 03 Apr 2026 09:45:23 GMT</pubDate>
            <atom:updated>2026-04-03T09:45:23.041Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*V4yZb8IyrLtuoY3xn4aSzg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6jhUZHnR7hesh1IrfR_Nig.png" /></figure><h3>Introducing Today’s Project</h3><p>In this project, I’m going to build a defence-in-depth security configuration for Claude Code that combines permission deny rules, deterministic hook scripts, and an advisory policy file to protect a sample project from unsafe AI actions. This will help me build a layered, production-style security model.</p><h3>Key tools and concepts</h3><p>The key tools I used in this project include Claude Code, Bash scripting, and jq for processing JSON data. I learned how to work with permissions, hook scripts, and multiple security layers to control and monitor AI-driven actions. Key concepts I learned include Claude Code, security mechanisms, the use of hooks and permissions for enforcing rules, and the principle of defence-in-depth.</p><h3>Challenges and wins</h3><p>I did this project today to learn how to learn how to design and implement security controls for AI-assisted development environments, with a focus on preventing unsafe or unauthorized actions. It helped me understand how to apply defence-in-depth principles using permissions, hooks, and policy rules to create more reliable and secure systems. Another skill I want to learn is how to integrate these security mechanisms into real-world DevOps workflows, such /CD pipelines and cloud environments.</p><h3>Setting Up the Security Testing Environment</h3><p>In this step, I am setting up Claude Code, install jq and create my sample project with sensitive files because these files will act as your “test dummies” for the security rules I build later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*TX-ltW1SIBn0zG3tI8FEhg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1G1ycpPjhtTnHYHcZJNyig.png" /></figure><h3>Understanding jq</h3><p>jq is a lightweight command-line tool for working with JSON data.. I will use it to parse and validate my Claude Code configuration files, specifically. Claude/settings.json where I define permission deny rules and hook scripts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PVb_XKeZS3VZvS4g8pPrUA.png" /></figure><h3>Creating sensitive test files</h3><p>I created fake credential files to test targets for my safety guardrails</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*1myOmz2B7PZtfJkLmvr17A.png" /></figure><h3>Configuring Permission Deny Rules</h3><p>In this step, I am configuring permission deny rules in .claude/settings.json. I will test the deny rules by asking Claude to access blocked resources and discover acritical gap in permission-based security.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EDVlDF31feMjwerqeVjngg.png" /></figure><h3>How deny rules protect your project</h3><p>The first deny rule I’ll explain is Read(**/.env) It blocks Claude’s Read tool from opening any file named .env, in any directory. The second rule is Read(**/.env.*)it blocks blocks files like .env.local or .env.production.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HJ7UXAoSFJpjYATXXPBKAg.png" /></figure><h3>Discoverng the Permission Gap</h3><p>When I asked Claude to list all files, it declined the request based on its internal safety reasoning rather than any configured deny rules. This indicates that the refusal was driven by the AI model’s interpretation of the prompt, not by enforced security controls. Therefore, deny rules only block specific tool patterns, and Bash subprocesses can slip through.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m5Mt1lewieaKSbYLS93soQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*CrNwx0FK8THBtM-jUGTP_A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*V_ryPKIKWIlSxy9sgoXj0w.png" /></figure><h3><strong>Writing the Safety Hook Scripts</strong></h3><p>In this step, I am writing a file protector hook that blocks edits to sensitive files. Hooks are needed because permissions setup from the last step blocks Claude’s built-in tools, but there is a critical gap.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1anMr99FaD4ifiPYjDdu3w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uw5IIJccRj9eyxBUivuaQQ.png" /></figure><h3>Protecting sensitive files</h3><p>This hook protects files like environment files like .env , credential files, configuration files, database related files that can contain sensitive information. These files need protection because they can store secrets like : API keys, passwords, and system configurations.. Unauthorized access or modification of these files could lead to data breach and disruption of the system. The hook ensure that sensitive information is not expose.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C8r8hq2_gYfmdOluFC_nfw.png" /></figure><h3>Blocking dangerous commands</h3><p>The first pattern I chose is :destructive deletions: rm -rf / or rm -rf * It is dangerous because it could wipe my filesystem.. The second pattern is SQL injection: Patterns like DROP TABLE or DELETE FROM It is dangerous because it could destroy database data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uw5IIJccRj9eyxBUivuaQQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N0YMEkt5x7tdI_6o-hSn2w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VHK50e0Raa327Df5Tz9wBw.png" /></figure><h3>Testing the Hooks in Action</h3><p>Permissions are advisory, they work by controlling whether Claude asks for approval, but a distracted developer can still click “allow.” While hooks are deterministic. When a hook exits with code 2, the action is blocked no matter what. There is no override, no prompt, no accidental approval. This is your second layer of defence-in-depth.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z_4tW8O4L3kIgFM970UIog.png" /></figure><h3>Adding a CLAUDE.md Security Policy</h3><p>In this project extension, I am going to create a CLAUDE.md security policy with safe coding practices and rules for AI-assisted development. I will also performed-team testing on each defence layer, including permission rules, hook scripts, and policy guidance, to evaluate what types of unsafe actions are blocked or allowed</p><h3>Advisory vs enforced guardrails</h3><p>CLAUDE.md differs from the other layers because permissions block Claude’s built-in tools (like file reads), and hooks run custom scripts that can rejections with a non-zero exit code. CLAUDE.md is different. It shapes how Claude writes code, but Claude can still choose to ignore it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UrkKcMlrufLxcxr4KvSBhg.png" /></figure><h3>Red-Teaming the Defence Layers</h3><p>The easiest to bypass in theory is #3 , policy based refusals. They depend entirely on the AI following its instructions correctly. A different prompt framing, a jailbreak, or a less careful model could potentially get past them. No technical enforcement backs them up. What this teaches about defence-in-depth: -policy/AI-judgment controls are the weakest layer they should never be the only layer, -technical controls (file permissions, shell hooks) are stronger because they enforce regardless of how a request is framed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*1R8fszD9UChuhbJV-uVrQw.png" /></figure><h3>Project reflection</h3><p>This project took me approximately 90 minutes. The most challenging part waste send the prompt use cat to print the contents of .env Claude bypasses the permission layer because cat runs through Bash, not the Read tool. But your command validator hook should still catch it since .env access through Bash matches your hook’s protected patterns. This is defence-in-depth in action.</p><p>The permission layer missed it, but the hook layer caught it. Each layer covers the gaps left by the others.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2yhlTLMN3iQD6LFE-8jUFA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=23ddea50fd4b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build a Spotify Clone with Cursor]]></title>
            <link>https://medium.com/@maz.pugo/build-a-spotify-clone-with-cursor-eb8bf63809c2?source=rss-87694fcf8a07------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb8bf63809c2</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[cursor]]></category>
            <category><![CDATA[ai-assisteddevelopment]]></category>
            <dc:creator><![CDATA[Marzena Pugo]]></dc:creator>
            <pubDate>Sat, 28 Mar 2026 19:16:26 GMT</pubDate>
            <atom:updated>2026-03-28T19:16:26.844Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1sDI4cpLpsSxN0K9lvMeZQ.png" /></figure><h3>Introducing Today’s Project</h3><p>In this project, I’m going to build a Spotify clone web app using Cursor. This will help me learn how to structure a full-stack app, manage user interactions, and implement dynamic features such as playlists and queues. I’m interested in this project because it allows me to deepen my understanding of full-stack development, explore interactive web technologies, and create a hands-on application inspired by a popular, real-world app without having to write code manually.</p><h3>Key tools and concepts</h3><p>The tools I used were Cursor and Git. Key concept I learnt include: context management, cursor indexing, context isolation, debugging UI issues, and implementing features using AI-assisted development.</p><h3>Personal reflection</h3><p>This project took me approximately over 1 hour. The most challenging part was waiting for the LLM to complete its responses. It was most rewarding to build a feature without having to write a code manually.</p><h3>Why I did this project</h3><p>I completed this project today to enhance my skills of cursor. This project met my goals by providing a structured and easy to follow approach of learning.</p><h3>Setting Up the Cursor IDE</h3><p>In this step, I’m going to install Cursor, an AI-powered code editor and create a Cursor account. Cursor integrates an IDE with an AI chat. The editor and the AI are the same app out of the box. You can read and modify code as well as get AI to write the code for you, without having to open another app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GmtoOLHtKanfaOvdCd9T4g.png" /></figure><h3>How Cursor differs from other AI coding tools</h3><p>It stands out Cursor tries to be more than just an auto complete helper, it’s designed as an AI-centric coding environment that understands, edits, and navigates your whole project. Other AI tools are often assistive add-ons that help within your existing editor rather than reshaping the workflow around AI.</p><h3>Getting the starter code</h3><p>In this step, I’m going to clone my starter code from GitHub so I can build on top of it later.</p><h3>Cloning the project from GitHub</h3><p>Running the git clone command copies an existing Git repository from a remote source to your local machine so you can work on it.</p><h3>Exploring the Codebase with AI</h3><p>In this step I’m going to explore the existing codebase using Cursor’s AI chat and learn about AI Context Windows.</p><h3>The NextSound web app</h3><p>This web app lets users browse tracks, albums, and artists via the Spotify API. It can run in demo mode with mock data or with real Spotify data, and includes an audio player, command palette, and theme support.</p><h3>Running the app locally</h3><p>In this step, I’m going to install NextSounds’s dependencies and run the app locally.</p><h3>Creating a Brand New Feature</h3><p>In this step, I’m going to plan and build a queue feature with Cursor so users can manage their upcoming songs. I will implement the plan with Cursor Agent and verify the queue feature loads.</p><h3>Prompting Cursor</h3><p>The key requirements in my prompt were:</p><p>1. Queue access via song tiles Each song tile must include an “Add to Queue” button that opens a right-hand side panel displaying the queue.</p><p>2. Queue functionality Users must be able to add songs to the queue and see them listed vertically in the panel.</p><p>3. Currently playing visibility The currently playing song should be shown clearly andprominently within the queue.</p><p>4. Queue management Users must be able to reorder songs and remove songs from the queue.</p><p>5. UX balance The queues hould be easy to access but not intrusive, fitting naturally into the main listening experience.</p><p>6. Dependency constraints Implementation must use only the existing packages and versions already defined in package.json.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DgDDimVN_gOnwUEw7ifT_w.png" /></figure><h3>Designing the Queue feature</h3><p>To build a new queue feature, I prompted Cursor Agent to design the data flow and define a queue structure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*Mqu_6ZEp6f5TBUmCHjeYvA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*1x0D0bIn57Xs3hItqktimA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/1*NZ3LFyD7UWIbvjeeLKs4JA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*csB-rJr0NhDrr7U7GA27Jg.png" /></figure><h3>Troubleshooting and iterating</h3><p>In this step, I’m going to fix technical errors using Cursor chat, fix UI bugs using screenshots, confirm the queue future works end to end. because early bug fixings critical for delivering stable high quality features.</p><h3>Debugging with Cursor</h3><p>I ran into an issue where there the “Add to the Queue” button was missing from the card UI which prevented users from creating a playlist. I solved it by telling Cursor to generate and implement the missing button component</p><h3>Managing AI Context</h3><p>In this secret mission, I will learn to control Cursor’s context by creating a .cursorignore file to exclude files from Cursor’s context and by creating a .cursorindexingignore file for more flexible control over indexing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/923/1*PzIxRd5e-FCDlND4fj5S8g.png" /></figure><h3><strong>Performance and security benefits</strong></h3><p>Managing context improves performance by reducing unnecessary data processing and focusing AI on relevant files. and improves security by preventing sensitive information from being exposed.</p><h3>Comparing .cursorignore and .cursorindexingignore</h3><p>.cursorignore hides files from AI (like node_modules/ and .env ) while .cursorindexingignore only prevent files from being indexed and stored for context. It should be used for large directories like data/ where you want fast indexing but occasional access.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb8bf63809c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementing a CI/CD Pipeline for GlobalMart E-Commerce Platform]]></title>
            <link>https://medium.com/@maz.pugo/implementing-a-ci-cd-pipeline-for-globalmart-e-commerce-platform-f5c399b75f5a?source=rss-87694fcf8a07------2</link>
            <guid isPermaLink="false">https://medium.com/p/f5c399b75f5a</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[amazon-cloudwatch]]></category>
            <category><![CDATA[codedeploy]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[cicd-pipeline]]></category>
            <dc:creator><![CDATA[Marzena Pugo]]></dc:creator>
            <pubDate>Fri, 20 Mar 2026 18:17:14 GMT</pubDate>
            <atom:updated>2026-03-20T18:17:14.453Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*weAO2NFs_6lTSNTQc8KnFA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*weYfZmX4cIi3tWeBZWEw2g.png" /></figure><h3>Scenario</h3><p>GlobalMart, a leading e-commerce retailer with 300+ employees across 3 regions, has implemented a CI/CD pipeline for their product catalogue service, but is experiencing deployment failures and site outages.</p><p>With an estimated $25,000 in lost revenue per hour of downtime, they urgently need help troubleshooting their pipeline issues.</p><p>In this project I decided to challenge myself by creating a CI/CD pipeline for a React e-commerce application simulating a kind of project Cloud Support Engineer often help troubleshoot. I want to share my lessons learned so anyone interested in DevOps can follow along.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_cJU5W-WpnlBxAtXTxdnPA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IwsND3Q4zOhRujV9P-s2eg.png" /></figure><h3>Project Overview</h3><p>The goal was simple, automate a process of taking code from Github, building it, deploying it to an EC2 instance running Nginx, using DevOps tools. During the process I intentionally broke parts of the pipeline to lean troubleshooting strategy.</p><h3>What is CI/CD and Why Does It Matter?</h3><p>CI/CD is a modern software development practice that helps teams deliver code changes more frequently and reliably:</p><ul><li><strong>Continuous Integration (CI) </strong>automatically builds and tests code changes when developers commit their work</li><li><strong>Continuous Deployment (CD)</strong> automatically deploys approved changes to production environments</li></ul><h3>Key services I used</h3><ul><li><strong>EC2</strong> <strong>instance </strong>for hosting of application</li><li><strong>CodeDeploy </strong>for deployment handling</li><li><strong>CodePipeline</strong> for automating of CD/CD workflow</li><li><strong>IAM</strong> -to manage the access and permissions</li><li><strong>AWS Security Groups- </strong>virtual firewalls controlling network traffic</li><li><strong>Amazon</strong> <strong>S3- </strong>storage for deployment artifacts</li><li><strong>CloudWatch- </strong>to monitor logs and metrics</li></ul><h3>Implementation steps</h3><h4>1. Setup of EC2 instance</h4><p>I launched an Amazon Linux EC2 instance</p><ul><li>installed Node.js for React</li><li>installed Nginx as a web server</li><li>installed CodeDeploy agent, AWS could deploy code automatically</li><li>Configured Security group for SSH and HTTP</li></ul><p>I have also added a boot strap script to automatically install Node.js and CodeDeploy agent on instance launch. This is a part of Iac (Infrastructure as Service) which makes the deployment more consistent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*5dRNWOu4ufaKSGPVtXmTLA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*8ln38I6qbVSTFzJ1urrM9A.png" /></figure><h4>2. Github repository configuration</h4><p>Next I forked the React project repository and cloned it locally. I built the project first locally (with npm install and npm run build) to make sure it worked.</p><p>Then I prepared the repository for deployment:</p><ul><li>modified .gitingore to include the build/ folder</li><li>added appspec.yml the file that tells <strong>AWS CodeDeploy</strong> how to deploy the application. It defines which files should be copied and which scripts to run at specific deployment lifecycle events.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*blyLG9DqCcUU3-7pdANDxA.png" /></figure><ul><li>created the scripts: before_install.sh and after_install.sh</li></ul><p>before_install.sh cleans old files and prepares deployment directory</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*REk4w2hjb-_q0B4hm9EvPQ.png" /></figure><ul><li>after_install.sh configures Nginx to serve the React page app correctly</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U8eG40g0FU1lNQe8yAuT4g.png" /></figure><h4>3. Set up of IAM Roles in AWS account</h4><p>AWS requires permissions for resources to act correctly</p><p><strong><em>GlobalMart-EC2-Role</em></strong> allows the instance</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VF4eYOcPUtv1D3sX5CibeA.png" /></figure><p><strong><em>CodeDeploy Role</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MwZwadUaXf3IR4uF1FEUlw.png" /></figure><p><strong><em>The GlobalMart-EC2-Role</em></strong> needs to be attached to the EC2 instance</p><p><em>(Actions/Security/Modify IAM Role)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cLQtIpmdi5h3BG8kMrnvxw.png" /></figure><p>Without these 2 roles the pipeline would fail, the misconfiguration can break deployments</p><h4>4. Create CodeDeploy application and Deployment Group</h4><p>I created a <strong>CodeDeploy </strong>application and <strong>Deployment Group</strong> for my EC2 instance. A <strong>Deployment Group</strong> defines the target environment for your deployments. It specifies which instances receive deployments and how they’re deployed.</p><p>I chose <em>“in-place” </em>deployment , it means that update overwrite the current app. This is simple for a single app, but the same set up scales to multiple servers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6v-PAJk0soJmlNl6CGNN3Q.png" /></figure><h4>5. Build a Pipeline in CodePipeline</h4><ul><li>Source stage- I connected to Github via GitHub App, detecting code changes automatically</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qRPmM2k75ZK7lfU7YPyONw.png" /></figure><ul><li>Build stage- runs <em>npm install</em> and <em>npm run build</em> directly in the pipeline</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AzUYf4vuxxvs3gpxKuwKKA.png" /></figure><ul><li>Deploy stage-deploys the build folder to the EC2 instance using <strong>CodeDeploy</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pQo73Wo9Xe0oUrad0zIfJA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*XJN849ZKLf7aC9l6jLssoQ.png" /></figure><p>queued execution mode ensures that only one pipeline runs at the time to prevent conflicts</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XJN849ZKLf7aC9l6jLssoQ.png" /></figure><h4>6. Troubleshooting challenge</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*odpUvdDQb5o4Ao4ntnRS9g.png" /></figure><p><strong>IAM issue, permission related error messages</strong></p><p>When a pipeline fails specifically at the Deploy stage (after successfully completing Source and Build stages), it suggests that the issue lies with the deployment service rather than with the code itself. Permission-related error messages in<strong> CodeDeploy</strong> logs further narrow down the problem to IAM configuration rather than application or network issues.</p><p>Symptoms<br>- Pipeline fails at the Deploy stage<br>- <strong>CodeDeploy</strong> shows permission-related error messages</p><p>In my case the issue was <strong><em>GlobalMart-CodeDeploy-Role,</em></strong> I had to remove AmazonS3ReadOnlyAccess and attach <strong><em>AWSCodeDeployRole</em></strong> permission policy.</p><p>The <strong><em>AWSCodeDeployRole</em></strong> policy contains essential permissions that <strong><em>CodeDeploy </em></strong>needs to manage deployments, including creating deployment groups, accessing EC2 instances, and modifying Auto Scaling groups. Replacing it with <strong><em>AmazonS3ReadOnlyAccess</em></strong> severely restricts<strong><em> CodeDeploy</em></strong> to only reading from S3 buckets, preventing it from performing most of its core functions</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SIaypmc59PEuJ8a6xX0HYQ.png" /></figure><p>When the EC2 instance stops and starts again, the <strong>CodeDeploy</strong> agent does not always start correctly.</p><p>After starting the EC2 instance, it is a good practice to check the agent status : <em>sudo systemctl status codedeploy-agent</em></p><p>if it is not running to run the command: <em>sudo systemctl start codedeploy-agent</em></p><p>or<em> sudo systemctl restart codedeploy-agent</em></p><p>If the agent is not running <strong>CodeDeploy</strong> cannot send the lifecycle events, the deployment will fail.</p><p>When troubleshooting<strong> CI/CD </strong>pipeline issues, it is recommended to:</p><ul><li>identify the failure point in your pipeline</li><li>check the logs for specific error messages</li><li>verify configurations of the relevant AWS service</li><li>make a test to check if the solution resolve the issue</li></ul><h4>7. Testing the pipeline by breaking it</h4><p>At this stage I wanted to make sure that my monitoring was working, not just configured. Instead of waiting for a real failure, I intentionally broke my pipeline.</p><p>I triggered a failure by introducing a misconfiguration- deployment issue.</p><p>I caused the pipeline execution to fail.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SIUefpGwDoGOzNwHomW0kg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*swz6uQmHpCAwT0uAKP7XMg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dBGJJyPmtznKDV1VB7yUlA.png" /></figure><p>As soon the pipeline execution failed, CloudWatch has detected the failure metric.</p><p>The alarm that I configured switched state from : OK- Alarm , this confirmed that my monitoring setup is working</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vjLzwCb2EVijgDHUk0slBA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*_tLyrT1zACPjJQiE4eeIpQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*PmbNGpIYnczIn32NDRHEfQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_cJU5W-WpnlBxAtXTxdnPA.png" /></figure><h4>7. Monitoring and metrics</h4><p>I setup CloudWatch dashboard and alarm to monitor pipeline health</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xAzPuE3szDki7-2msybFTg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ij1gYWtJeniTL1jf1Zfgjw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LZz_Bzx2HhyQAMPqxelh0Q.png" /></figure><h3>Key takeaways</h3><ul><li>Hands-on experience<strong> </strong>with AWS DevOps services integration</li><li>Understanding the full DevOps workflow , from code to deployment</li><li>Troubleshooting experience with IAM roles</li><li>Agent communication failures</li><li>Deployment configuration errors</li></ul><h3>Final Result</h3><p>As a result of this project, I built a fully functional CI/CD pipeline for GlobalMart that demonstrates:</p><ul><li>Automated deployment of the React application</li><li>Secure configuration of AWS deployment services</li><li>Effective troubleshooting of common pipeline issues</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f5c399b75f5a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build a RAG API with FastAPI]]></title>
            <link>https://medium.com/@maz.pugo/build-a-rag-api-with-fastapi-e3c73beef7f5?source=rss-87694fcf8a07------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3c73beef7f5</guid>
            <category><![CDATA[fastapi]]></category>
            <category><![CDATA[rags]]></category>
            <category><![CDATA[ollama]]></category>
            <dc:creator><![CDATA[Marzena Pugo]]></dc:creator>
            <pubDate>Sun, 15 Mar 2026 21:11:26 GMT</pubDate>
            <atom:updated>2026-03-15T22:05:41.800Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wKaQ8i3hm-CarLFKwDp9IA.png" /></figure><h3>Introducing Today’s Project</h3><p>In this project, I’m going to create a local REST API that implements the full Retrieval-Augmented Generation pipeline, from document storage to AI-generated answers, running entirely on your machine with zero cloud costs. RAG is used to build AI assistants that answer questions from internal documents, support tickets, or product catalog without retraining models. This will help me to understand how to build an end to end Retrival Augmented Generation (RAG) system including document ingestion, vector storage and semantic search.</p><p>I’m interested in this because RAG is commonly used in modern AI assistants and I want to understand how to run the entire pipeline locally.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*YfXVSAb-0mJnrr36RwR8aw.png" /></figure><h3>Key tools and concepts</h3><h4>The key tools I used include:</h4><ul><li>Python -Ollama</li><li>RAG -FastAPI</li><li>ChromaDB</li></ul><h4>Key concepts I learnt include:</h4><ul><li>perform RAG (Retrieval-Augmented Generation) both manually and with code</li><li>perform RAG (Retrieval-Augmented Generation) both manually and with code</li><li>build a REST API with FastAPI that implements a full RAG pipeline</li><li>use nomic-embed-text for semantic search and qwen2.5:0.5b for AI response generation</li><li>extend the API into a multi-user AI directory with dynamic document ingestion</li></ul><h3>Challenges and wins</h3><p>This project took me approximately. 60 minutes. The most challenging part was he most challenging part was setting up and testing the API endpoints correctly. Making sure that FastAPI server was running on an available port and that the requests were formatted properly in Swagger UI.</p><h3>Performing RAG Manually</h3><p>In this step, I’m going to set up a Python project with a virtual environment. I will install all project dependencies and pull the nomic-embed-text embedding model.</p><p>RAG stands for Retrieval-Augmented Generation and it is an AI framework designed to improve the accuracy of Large Language Models. It fetches the data from trusted sources before generating a final response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Tv8H0BF8TDUtZ6Ha.png" /></figure><h3>Understanding the three parts of RAG</h3><p>I performed RAG manually by adding some personal context directly into my prompt.<br>The three parts are:</p><ul><li>Retrieval, I found the relevant text (some personal info)</li><li>Augmentation, I added that text to the prompt.</li><li>Generation, The AI used that context to generate an accurate answer.</li></ul><p>The rest of this project automates this exact process with code.</p><h3>Comparing the two AI models</h3><p>The key difference I noticed is that <br>nomic-embed-text (~274MB) model converts text into numerical representations called embeddings. This is a different type of model to qwen 2.5:0.5b. It doesn’t chat, it converts text into numbers for search. Chat models like qwen2.5 that generate responses, embedding models are purpose-built for search. They help you find the most relevant chunks of text for a given question.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iR8vdL7CU2USijEi1nTe4Q.png" /></figure><h3>Building a Personal Knowledge Base</h3><p>In this step, I’m going to write a personal profile document. I ill build a Python script that loads, chunks and stores my profile as embeddings. Finally I will run the script and verify my knowledge base is built. Embeddings are numerical representations of text or other data in a high dimensional space. They capture meaning , topic and context of a piece of text.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VfbSIKYeHiK57dZoXKS9Rg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/981/1*LIJI1beOOQ2LgoKv6-NfSA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/971/1*KelTBkX4lMhAaNlSI1bNBQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/0*2MKh_4IIW7GsY-hH.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*HB3VDdtRsAJYeEhpp66Y4g.png" /></figure><h3>Creating the profile document</h3><p>I included information about myself. RAG systems work with all kinds of private documents: personal profiles, company knowledge bases, legal contracts, medical records, or product documentation. Any data that an AI wasn’t trained on can be fed into a RAG pipeline to generate grounded answers. My profile becomes a document in the RAG’s pipeline.</p><h3>How semantic search finds relevant chunks</h3><p>When I ask a question, that question is also converted into a vector, and ChromaDB finds the chunks whose vectors are closest in that high-dimensional space. This is semantic search in action! Instead of matching exact keywords, it finds content with the closest meaning</p><h3>Creating the RAG API with FastAPI</h3><p>In this step, I’m going to build an API that receive questions from users via a /ask endpoint and forwards them to my local RAG pipeline and returns AI generated answers.<br>I’ll test it using the built-in Swagger UI, so I can interact with it easily without writing any client code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*32keO2CUClEMiffDOcuOpg.png" /></figure><h3>How the /ask endpoint works</h3><p>When a question comes in, my endpoint retrieves the 2 most relevant chunks from ChromaDB, augments the prompt by combining those chunks with the question, and generates a grounded answer using qwen2.5:0.5b. The response includes the context that was used so you can verify the AI’s sources.</p><h3>Testing with Swagger UI</h3><p>I tested my API by asking : what is my name? The AI answered with the correct name, answer contains the AI’s response, grounded in my actual profile data. The context used was shows the exact chunks that ChromaDB retrieved from my knowledge base. This is the context that was injected into the prompt before the AI generated its answer.</p><h3>Extending to a Multi-User AI Directory</h3><p>In this project extension, I’m adding multi-user support because<br>in real-world RAG systems almost always serve multiple users or data sources.<br>Multi-tenancy means I’ll extend the API so that multiple users can submit their own personal profiles, turning your RAG API into a multi-user personal AI directory. Each user will have <br>their on profile. The API will include the user id parameter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IaNgJrTP8FF-ehcU.png" /></figure><h3>Adding the POST /documents endpoint</h3><p>In this project extension, I added a POST endpoint that allows users to submit their profiles in RAG system. Metadata filtering allows chunks for Jordan to be retrieved independently from other users data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HWqtH5djjJuK1h1_rXNRgA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KOOZe8x-upnxoB2q3auweA.png" /></figure><h3>Verifying multi-user filtering</h3><p>In this project extension, I tested multi-user queries by adding a second user to the database and sending the question to the GET /ask endpoint without precising the user. ChromaDB returned chunks from both your profile and Jordan’s profile.</p><p>Enter Jordan as the user, the context_used field only contains chunks from Jordan’s profile. The AI gives a clear, accurate answer about Jordan’s hobbies (rock climbing, cooking, chess) because ChromaDB’s where filter excluded your profile chunks before the search even started.</p><p>The filter works because when I pass user Jordan, the code add {“user_name”: “Jordan”} to ChromaDB’s where parameter. This tells ChromaDB to only look at chunks where the user_name metadata matches “Jordan”. The semantic search then runs only on that subset of <br>data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DYekJWmj372rUmblkKGssQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BVE09AIGlEJz8WNEwCKJdQ.png" /></figure><h3>Wrapping Up</h3><p>I did this project today to learn how to create a local REST API that implements the full Retrieval-Augmented Generation pipeline from document storage to AI-generated answers, running entirely on my machine with zero cloud costs.</p><p>This helped me understand how document retrieval, vector database and local language model work together.</p><p>Another skill I want to learn how to deploy and scale similar AI models in cloud infrastructure so RAG systems can run in production environments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3c73beef7f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI Security Scanner for Python (Gemini AI + Python)]]></title>
            <link>https://medium.com/@maz.pugo/ai-security-scanner-for-python-390750e88d11?source=rss-87694fcf8a07------2</link>
            <guid isPermaLink="false">https://medium.com/p/390750e88d11</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[gemini]]></category>
            <dc:creator><![CDATA[Marzena Pugo]]></dc:creator>
            <pubDate>Thu, 12 Mar 2026 18:27:10 GMT</pubDate>
            <atom:updated>2026-03-12T18:33:34.840Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*2c4ig0_FryY3SlFi1W8C1w.png" /></figure><h3>Introducing Today’s Project</h3><p>In this project, I’m going to build a security scanner that detects vulnerabilities in Python code with color-coded severity ratings.</p><p>This will help me understand common security vulnerabilities in Python and apply best practices for coding. I’m interested in this because security is a critical part of software development, being able to automatically detect risks will give me hands on experience with techniques used in a real world of security auditing.</p><h3>Key tools and concepts</h3><p>Tools I used in this project were: Python, the Gemini API from Google, the python-dotenv library for managing environment variable and colorama for adding coloured output in the terminal. Key concepts I learnt include detecting the vulnerabilities such as SQL injection, hardcoded secrets, and weak cryptography.</p><p>The most important skill was learning how to combine Python scripting with AI tool to build a practical security tool, a security scanner. This helped me to understand how the automated scanners work and how we can use AI to identify potential vulnerabilities and improve the security of workflows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*26LwUw_t36lEq2XUZhwCvg.png" /></figure><h3>Challenges and wins</h3><p>This project took me approximately 90 minutes, including setting the environment, installing the required libraries, writing the scanner script, testing the code examples and preparing the documentation.</p><p>The most challenging part was integrating Gemini API correctly It was most rewarding to see the scanner analyse the script code, detect the vulnerabilities and show the scan results with coloured severity levels.</p><h3>Why I did this project</h3><p>I did this project today because I wanted to build a simple AI powered security scanner and to check how the vulnerabilities detector work in practice.</p><p>This project met my goals by showing how to integrate AI tools with Python in automated code security analysis.</p><p>Next I am planning to develop the scanner by adding more features such as scanning different files, detecting additional vulnerabilities and generating more detailed security report. I think that this kind of tool could be used in DevOps projects to analyse workflows.</p><h3>Connecting to Gemini API</h3><p>In this step, I’m setting up the Gemini API connection. This involves getting my Google AI API key. I need to do this so I can setup a .env file with my API key and test my connection to Gemini.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*x7k81miOhSGAD96pP_a8Hw.png" /></figure><p>I verified the connection by running python scanner.py Gemini responded with “Hello security-scanner!” which confirmed that Python executes my code line by line — loading my API key from .env, connecting to Gemini’s servers, sending my prompt, and printing the response. It means my connection is working.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9yAMsAPy34LGM85wTQ56XQ.png" /></figure><p>My scanner.py file works by sending a piece of code to the Gemini model through the API and asking it to analyse code for potential security vulnerabilities. When I ran it, Gemini identified that the code contained a hardcoded password (“admin123”).</p><p>This shows that the Gemini API can be used to automatically analyse code and detect vulnerabilities and provide recommendations for improving code security.</p><h3>Building the Vulnerability Scanner</h3><p>In this step, I’m building a vulnerability scanner that detects SQL injection, hardcoded secrets, and weak cryptography, the same vulnerabilities that professional tools look for.</p><p>This will allow me to integrate automated security checks in my DevOps workflow and check vulnerabilities earlier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9yAMsAPy34LGM85wTQ56XQ.png" /></figure><p>The vulnerabilities Gemini detected were: SQL injections, hardcoded credentials, weak cryptography and unsecured hardcoded passwords. The security prompt I crafted asked for analysing each code snippet, identify vulnerabilities and provide a short report.</p><p>This structured output helps me to understand security risks in code and compare them against best practices.</p><h3>Adding Severity Ratings</h3><p>In this step, I’m adding severity ratings to the scanner’s outputs, each vulnerability is labelled as Critical, High, Medium, Low. I’m also installing colorama to colorize terminal output, making it easy to visually distinguish the severity level of each issue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*SPjICTdxckwlp9rzDpADuA.png" /></figure><p>I updated the security prompt to include severity rating for each vulnerability, using labels like CRITICAL, HIGH, MEDIUM AND LOW. The add_colors_to_output function works by scanning the output text for severity labels and applying colours using colorama.</p><p>When I see CRITICAL in red, it tells me that the issue is highly dangerous and must be addressed first, while lower-severity vulnerabilities are easier to distinguish.</p><h3>Scanning Real Python Files</h3><p>In this secret mission, I’m adding file reading capability to my scanner. This lets the scanner analyse actual files from a project, instead of hardcoded snippets, which is important to detect vulnerabilities in the code. Professional tools like Snyk scan real files in production codebases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*-ZYguzDtmiZHqufrJ_zkyg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CplWExLkklkoUjC0NTdP7w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*neBcKdcrkdSShQKzmr0LZg.png" /></figure><p>scanned vulnerable.py by running <br>python scanner.py vulnerable.py</p><p>The vulnerabilities detected were: Hardcoded credentials (DB_PASSWORD and API_SECRET),<br>SQL injection in the authenticate function,<br>Weak MD5 hashing, Command injection in process_input.</p><p>The scan_file function works by opening the given file <br>and reading all its code, by sending the code to Gemini with the security prompt, by receiving Gemini’s <br>analysis of vulnerabilities with the severity rating, by passing the output to highlight CRITICAL, HIGH, MEDIUM, LOW issues in colour and by printing the full report in the terminal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*vhthDUB67uX3R6Imvd9i8Q.png" /></figure><p>This diagram shows how the scanner works with file scanning. I run python scanner.py vulnerable.py in the terminal, my script reads the file, sends the code to Gemini for analysis, and prints the coloured security report back to your terminal.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=390750e88d11" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes Deployment and Autoscaling on Amazon EKS]]></title>
            <link>https://medium.com/@maz.pugo/kubernetes-deployment-and-autoscaling-on-amazon-eks-a8fa0999ed8f?source=rss-87694fcf8a07------2</link>
            <guid isPermaLink="false">https://medium.com/p/a8fa0999ed8f</guid>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[aws-eks]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[aws-ecr]]></category>
            <dc:creator><![CDATA[Marzena Pugo]]></dc:creator>
            <pubDate>Sun, 08 Mar 2026 21:43:11 GMT</pubDate>
            <atom:updated>2026-03-10T20:59:40.432Z</atom:updated>
            <content:encoded><![CDATA[<h3>Project Overview</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/1*J8WD7lAqGIx5Pi7Z7OWAqw.png" /></figure><h3>Scenario</h3><p>Cartflow a new tech company is preparing to modernise how to run backend services. Before adopting fully adopting microservices at scale , the engineering team wants to standardize how applications are packaged, deployed and run across environments.</p><p>At the present a backend service is:</p><ul><li>run locally during development</li><li>manually packaged and started</li><li>they are hard to move consistently across machines</li><li>nothing is managed by any orchestration platform which makes scaling and orchestration difficult</li></ul><p>As the company prepares for future growth, they need a <strong>reliable, repeatable deployment model</strong> that works the same way on every machine and can later scale as traffic increases.</p><p>That is where the Kubernetes comes in. The Team decided using <strong>Amazon Elastic Kubernetes Service (EKS)</strong> to manage containers, deployments, and networking.</p><p>My role was to take a backend application and deploy it on a cloud native way on Amazon EKS and let Kubernetes handle the rest.</p><p>This included:</p><ul><li>Packaging the application as a <strong>Docker container</strong></li><li>Storing the image in a <strong>container registry</strong></li><li>Running the application on a <strong>managed Kubernetes cluster</strong></li><li>Exposing the service so it can be accessed externally</li><li>Understanding how Kubernetes manages Pods and traffic</li></ul><h3>Solutions</h3><p>The idea was to deploy the a containerised application on Amazon EKS, the setup included:</p><ul><li>a Dockerized application stored in Amazon ECR</li><li>an Amazon EKS cluster with EC2 worker nodes</li><li>a Kubernetes Deployment to run and manage Pods</li><li>a Kubernetes Service (NodePort) to expose the application</li><li>health endpoints to verify application status</li></ul><p>The project was focused on Kubernetes fundamentals, not production optimizations. Things like HTTPS, Ingress, and autoscaling can come in later projects.</p><h3>Key takeaways:</h3><ul><li>understand Kubernetes and Amazon EKS concepts</li><li>containerize the application using Docker- Push the Docker image to Amazon ECR</li><li>create an Amazon EKS cluster</li><li>deploy the application using a Kubernetes Deployment</li><li>expose the application using a Kubernetes Service (NodePort)</li></ul><h3>Tools and services used:</h3><ul><li>Docker, containerize the application</li><li>Amazon ECR, store Docker images</li><li>Amazon EKS , managed Kubernetes cluster</li><li>Amazon EC2, worker nodes for the cluster</li><li>Amazon VPC, Networking for EKS</li><li>AWS IAM, permissions and access control</li><li>Kubernetes (kubectl), deploy and manage workloads</li></ul><h3>Final results</h3><p>At the end of the project I had:</p><ul><li>a containerized application running on Amazon EKS</li><li>hands-on experience with Kubernetes Deployments and Services</li><li>a clear understanding of how traffic reaches Pods</li></ul><p>My goal was not just to run commands, I wanted to understand what is happened behind the scenes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A-p27lt6z-Uy39wQbL-4qg.png" /></figure><p>Modern applications as packed as containers, containers make applications portable but running them at scale create some problems:</p><ul><li>what is happen if the container crushes?</li><li>how do I run multiple copies of the same application?</li><li>how is the traffic distributed between them?</li><li>how do we scale them automatically when the demand increases?</li></ul><p>Kubernetes help to solve this problem by orchestrating containers automatically.</p><p>They are responsible for managing of application deployment, for scaling the application down and up.</p><p>They are routing traffic to healthy containers.</p><p>Running containers require a lot of operational work (control plane availability, upgrade and patching, security and networking)</p><h4>Basic Kubernetes concepts:</h4><p><strong>Pod</strong></p><ul><li>the smallest unit in Kubernetes</li><li>runs one or more containers</li><li>Pods are temporary (it means they can be created or destroyed at any time)</li></ul><p><strong>Deployment</strong></p><ul><li>Manages multiple pods for an application</li><li>Ensures the desired number of pods is always running</li><li>Handles rolling updates and restarts</li></ul><p><strong>Service</strong></p><ul><li>provides a stable network endpoint for pods</li><li>Load-balances traffic across multiple pods</li><li>allows pods to be replaced without breaking access</li></ul><p><strong>(HPA) Horizontal Pod Autoscaler</strong></p><ul><li>automatically adjusts the number of pods</li><li>uses metrics such as CPU usage</li><li>plays a key role in this project</li></ul><p><strong>AWS EKS </strong>simplifies this task by providing a managed Kubernetes control plane.</p><p>AWS EKS, manages :</p><ul><li>Kubernetes API server</li><li>Control plane availability</li><li>Cluster state and upgrades</li></ul><p>Developer manages:</p><ul><li>Worker nodes (EC2)</li><li>Kubernetes resources (pods, deployments, services)-</li><li>application deployments</li><li>autoscaling configuration</li></ul><p>This is how Kubernetes is commonly used in production environments.</p><p>In the next steps I will demonstrate how I implemented the application in EKS cluster.</p><ul><li>You describes how an application should run using Kubernetes configuration</li><li>Kubernetes schedules pods on worker nodes</li><li>services route traffic to pods</li><li>Kubernetes monitors health continuously and replaces failed pods</li><li>autoscaling adjusts the number of pods when the load changes</li></ul><h3>Running the application locally</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FhsvQCcknLQU8WhL2vgxbQ.png" /></figure><p>First I need to make sure that my application runs locally, using the following commands:</p><p><em>node — version<br>npm — version</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*Ak-RdPy-GoQ7OQXqx_Sp8g.png" /></figure><p><em>npm install<br>npm start</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*eMzNxOivjU6JL3748N3XbQ.png" /></figure><p>I checked the app in the browser</p><p><a href="http://localhost:3000/"><em>http://localhost:3000</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7biMmpyocdgLcJpQXedScA.png" /></figure><p>Then I did health and readiness check</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BFzMC0Z4IVXyR7rOjFDwJg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0XLkZxqBe1yQ44G3ANu1HA.png" /></figure><h3>Containerizing the Application with Docker</h3><p>Next I packaged the application into a Docker container so Kubernetes could run it (applications can behave differently across machines due to OS differences, runtime versions, or missing dependencies). Docker solves this by packaging application code, runtime, and dependencies</p><p>I created a Dockerfile inside the app folder</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*rggW4rNlvnVLOI2_aBD4Bw.png" /></figure><p>Then I built the image</p><p><em>docker build — platform linux/amd64 -t k8s-demo-service .</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*vAFToOR11tgX7FQiZPxcPw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*JIhovTny-CjoYnv181DesQ.png" /></figure><p>and I ran it locally</p><p><em>docker run -p 3000:3000 k8s-demo-service</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*NHyyqJg3bPk_Y2q_sNRyJw.png" /></figure><p>Using the command : <a href="http://localhost:3000/"><em>http://localhost:3000</em></a><em> </em>confirmed that the application is running inside the container</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tRD7fs4e1ZQkkQRBnt0T5g.png" /></figure><p>The application now runs inside a Docker container on the same port number.<br>Docker fully controls the runtime environment.</p><h3>Prepare Kubernetes Deployment Manifests</h3><p>Inside my Kubernetes-Deployment folder I created k8s folder with 2 x YAML files, Kubernetes does not run containers directly from Docker commands I prepared configuration files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*-I8RiCfAhjCkBs4F0QwGmw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*HrccniHiFJaeGIJL8YyB1Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/1*Wyi1pKXm8KzMJSoaxh9zNg.png" /></figure><p>Let’s see what is inside the yaml file:</p><ul><li>replicas: 2: tells Kubernetes to run two instances (Pods) of the application so traffic can be handled even if one Pod goes down</li><li>image: specifies which Docker image Kubernetes should run</li><li>containerPort: 3000: indicates the port inside the container where the Node.js application is listening</li><li>labels &amp; selectors: are identifiers that allow Kubernetes Services to find the correct Pods and send traffic to them.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lVXUh_KZBI8jtAgJieyKTQ.png" /></figure><p>What is defined in the service.yaml file?</p><ul><li>users send requests to the Service on <strong>port 80</strong></li><li>Kubernetes forwards those requests to the application running on <strong>port 3000</strong> inside each Pod</li><li>traffic is automatically <strong>distributed across all running replicas</strong></li></ul><p>The Deployment runs 2 x copies of the application, the Service exposes the app and traffic to the Pods. This setup allows Kubernetes to distribute the traffic trough multiple instances.</p><h3>Deploying the Application on Kubernetes</h3><p>In the next steps:</p><ul><li>I will push the Docker image to <strong>Amazon ECR</strong></li><li>deploy the application to <strong>Amazon EKS</strong></li><li>verify that Kubernetes can pull and run the image</li></ul><h4>How to push the Docker image to Amazon ECR?</h4><p>EKS worker nodes run on EC2 instances in AWS and cannot access Docker images built on your laptop. The image must live in a registry that Kubernetes can pull from.</p><p>step -&gt; on the console go to Amazon ECR<br>click-&gt; Create repository, I named it “k8s-demo service”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QCRDfLoCRc3SKA_nJdCGNw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ep1kb5mJ-eKe2l2_wPjd6g.png" /></figure><p>Inside the created repository you can see “Push commands”</p><p>I ran the commands on the console one by one in order</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lj99lJYsuiMM6tUy3QIfdQ.png" /></figure><p>I followed the following steps:</p><ul><li>I authenticated Docker to ECR</li><li>(optional) Build the image if it was not done before</li><li>tag the image</li><li>push the image to ECR</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/971/1*umc3xgtKRHdAzbxctaSaog.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*bcqmm3epkbMwl2Slbc0XTg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZuJaHXanAEvFpMHbh9Hghw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SX0AduPUoOY1Zs2j9LwLFw.png" /></figure><p>The Docker image is no available to Kubernetes.</p><h4>Deploying the application to Amazon EKS</h4><p><strong>Tools used</strong></p><ul><li><strong><em>AWS CLI</em></strong>: used to authenticate and communicate with your AWS account.</li><li><strong><em>eksctl</em></strong>, will create the cluster (it is a helper tool that creates EKS clusters without manually configuring VPCs, IAM roles, or nodes)</li><li><strong><em>kubectl</em></strong>, controls what runs inside it (the primary tool used to interact with Kubernetes clusters (deploy apps, check pods, services))</li></ul><p>In this step I verified:</p><ul><li><strong>AWS CLI</strong></li></ul><p><em>aws --version</em></p><ul><li><strong>eksctl</strong></li></ul><p><em>eksctl version</em></p><ul><li><strong>kubectl</strong></li></ul><p><em>kubectl version --client</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*NQS4U9CoMS1EbLoqY56yiw.png" /></figure><h3>Create the Amazon EKS Cluster</h3><p>In the terminal, I ran the command:</p><p><em>eksctl create cluster \<br> — name k8s-demo-cluster \<br> — region eu-west-2 \<br> — nodegroup-name demo-nodes \<br> — node-type t3.medium \<br> — nodes 2</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*c1eihWpaJnOHxbwDBK-8TA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-2GOhmGnsVc9AspWnYNdZA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AqfASI26w_D6k_kqAHlLeQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7N1lVMJbHQIsYErGX8JcbA.png" /></figure><p>I could see the cluster status: <strong><em>active,</em></strong> the cluster may<strong><em> active </em></strong>before the nodes are ready, <em>eksctl</em> will continue running until node groups are fully created</p><h4>Verify Cluster Connectivity</h4><p>I checked the connectivity of the local environment with the <strong>EKS Cluster</strong> running the following command:</p><p><em>kubectl get nodes</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*D83yLP6pMULcv6Ouu3zhNg.png" /></figure><p>Nodes are listed and ready, it means that <em>kubectl</em> is correctly connected to the EKS cluster</p><h4>Update the Deployment Manifest</h4><p>Kubernetes must pull the Docker image from <strong>Amazon ECR</strong>, not from my local machine.</p><p>In order to do that, the Deployment manifest in k8s needs to be updated.</p><p>I replaced the image field and replace it with my ECR image URI image:</p><p><strong><em>&lt;ACCOUNT_ID&gt;.dkr.ecr.eu-west-2.amazonaws.com/k8s-demo-service</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*puC-d2_ftQTtsum_4JI4UA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VV8vClUampL4gvyzixWN3g.png" /></figure><p>I saved the file and ran the command:</p><p><em>kubectl apply -f deployment.yaml</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1007/1*8ymCEoOWYQQsXIetfCigHA.png" /></figure><p>Kubernetes creates Pods.<br>The requested state (replicas: 2) is enforced automatically</p><h4>Verify the Pods</h4><p>Deployment being created does not guarantee the application is actually running. This step confirms that containers started successfully, I need run the command:</p><p><em>kubectl get pods</em></p><p>to check the status running</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OJIidrmSnbRawVTWhKOOqw.png" /></figure><ul><li>2 Pods are listed</li><li>status is “<strong>Running”</strong></li><li>“READY” shows <strong>1/1</strong></li></ul><h4>Expose the Application (Service)</h4><p>Pods have dynamic IP addresses, that can change whenever a Pod restarts or is replaced. A Kubernetes Service provides a stable network identity and load-balances traffic across Pods.</p><p>I applied the Service manifest with the command:</p><p><em>kubectl apply -f service.yaml</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*XCQZ52mSKjQrGv5iw5UCtg.png" /></figure><p>to verify the Service, I ran:</p><p><em>kubectl get services</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/1*3ivasPvQjjQOkDnJTFsJLA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YIHS6zr-tz7Qr7F6gykpsg.png" /></figure><h4>Access the Application</h4><p>The application is running correctly inside the Kubernetes cluster, but <strong>NodePort traffic is blocked by default at the AWS network level</strong>.</p><p>Before verifying the application from a web browser, I need to allow NodePort traffic in the worker node security group.</p><h4>Steps to allow NodePort Traffic in the EC2 Security Group:</h4><p>In the AWS Management Console, you will need to click on:<br>- EC2 → Instances<br>- select any EKS worker node<br>- open the Security tab<br>- click the attached Security Group.<br>- edit Inbound rules and add an additional rule:</p><p><em>Type:Custom TCP<br>Port range:30000-32767<br>Source:0.0.0.0/0</em></p><p>This will allow external traffic to reach Kubernetes NodePort services.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YIHS6zr-tz7Qr7F6gykpsg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9uTJecJGahH4DcKHowFVww.png" /></figure><p>To Access the Application, you need to :</p><ul><li>copy the <strong>Public IPv4 address</strong> of any worker node.</li><li>open a browser and navigate to:<em> http://&lt;NODE_PUBLIC_IP&gt;:&lt;NODE_PORT&gt;</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5VJc6KEyMtGIgKClYRnxQg.png" /></figure><p>When accessing the app via NodePort (HTTP), modern browsers may block CSS/JS and show an “unstyled” page due to the browser security policies, missing HTTPS header, or mixed content.</p><p>This is expected and will be resolved later using HTTPS via Ingress in production-style setups for example with Nginx Ingress +TLS)</p><p>A port forwarding can be used to confirm the application works internally</p><p><em>kubectl port-forward deployment/k8s-demo-service 8080:3000</em></p><p><a href="http://localhost:8080/"><em>http://localhost:8080</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P5drCHJPARNSCiAeHlvlNA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A-p27lt6z-Uy39wQbL-4qg.png" /></figure><p>When you open the URL:</p><ul><li>the request reaches the EC2 worker node</li><li>Kubernetes forwards traffic from the NodePort</li><li>the Service load-balances the request</li><li>one of the running Pods handles the request</li><li>a real Kubernetes workload running on Amazon EKS</li></ul><h4>Cleaning up</h4><p><strong>Delete the EKS cluster with the following command:</strong></p><p><em>eksctl delete cluster --name k8s-demo-cluster --region eu-west-2</em></p><p><strong>Delete the ECR repository:</strong></p><ul><li><strong>Amazon ECR → Repositories</strong></li><li>Delete the repository:<em> k8s-demo-service</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*OCP0aw9nTtazJ1gw5fGFgw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zIPu2cZaEH1JBst-P4xruA.png" /></figure><p>In this project I took an application running from local development, containerised it with Docker, pushed it to Amazon ECR, and deployed it on Amazon EKS using Kubernetes manifests.</p><p>I explored how Pods, Deployments, and Services work together, and how real-world teams debug container, image, and networking issues in Kubernetes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a8fa0999ed8f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>