<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Minoltan Issack</title>
    <description>The latest articles on DEV Community by Minoltan Issack (@minoltan).</description>
    <link>https://dev.to/minoltan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3235769%2F5f962c85-543b-49f6-96ad-ee703f5a70a8.jpeg</url>
      <title>DEV Community: Minoltan Issack</title>
      <link>https://dev.to/minoltan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/minoltan"/>
    <language>en</language>
    <item>
      <title>4 Ways to Save Your AI Tokens 10x</title>
      <dc:creator>Minoltan Issack</dc:creator>
      <pubDate>Sun, 31 May 2026 02:33:22 +0000</pubDate>
      <link>https://dev.to/minoltan/4-ways-to-save-your-ai-tokens-10x-1cf8</link>
      <guid>https://dev.to/minoltan/4-ways-to-save-your-ai-tokens-10x-1cf8</guid>
      <description>&lt;p&gt;&lt;em&gt;Token management is the silent cost killer in every AI workflow. Here’s how to outsmart it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9h791z7l22huvryfqzdp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9h791z7l22huvryfqzdp.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You’ve built the AI app. The prompts are clever, the outputs look great and then the billing dashboard loads. Token costs are spiraling. If this sounds familiar, you’re not alone. As LLM-powered workflows scale, token consumption becomes the single biggest lever between a profitable AI product and an expensive side project.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In my recent deep-dive, four practical strategies were laid out that can reduce your token usage by up to 10x without sacrificing output quality. This blog walks through each one, explains the underlying mechanics, and gives you a mental architecture for applying them in real production systems.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftdnw4xexohhwzcbk9cwm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftdnw4xexohhwzcbk9cwm.png" width="704" height="153"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  First, What Is a Token Really?
&lt;/h3&gt;

&lt;p&gt;Before optimizing, you need to understand what you’re measuring. A token is not a word, it’s a chunk of text as the model sees it. Roughly speaking, one token ≈ 4 characters in English, or about ¾ of a word. The sentence “The quick brown fox” is approximately 5 tokens.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqmp7n244god4xyp67kh1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqmp7n244god4xyp67kh1.png" width="686" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The critical insight: you’re billed on both input AND output tokens. Your system prompt, the entire conversation history, any retrieved documents (RAG chunks), and the model’s reply all of it counts. This is why large AI workflows can burn through budgets so fast: the context window fills up with tokens you don’t even realize you’re paying for.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“It’s not about writing shorter prompts. It’s about writing smarter ones.”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  1. Prompt Design — Say More With Less
&lt;/h3&gt;

&lt;p&gt;The first and most impactful strategy is also the most underestimated: redesigning your prompts from scratch with token efficiency as a first-class constraint. Most prompts are written for human readability full sentences, polite framing, repeated context. Models don’t need any of that.&lt;/p&gt;

&lt;h4&gt;
  
  
  The Over-Verbose Trap
&lt;/h4&gt;

&lt;p&gt;Here’s what a typical “human-friendly” prompt looks like compared to a token-optimized one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;❌ VERBOSE (approx. 65 tokens)
-----------------------------------------------
Hello! I hope you're doing well. I have a task
for you today. I need you to please summarize
the following article for me in a way that is
easy to understand. Please keep it concise
and make sure to include the main points.
Here is the article: [article text]

✅ OPTIMIZED (approx. 18 tokens)
-----------------------------------------------
Summarize this article. Key points only.
3 bullets max. Be concise.

[article text]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That’s a 72% reduction in prompt overhead before even touching the content. Multiply this across thousands of API calls per day and you’re looking at enormous cost differences.&lt;/p&gt;

&lt;h4&gt;
  
  
  Key Prompt Design Principles
&lt;/h4&gt;

&lt;p&gt;💡 &lt;strong&gt;Prompt Engineering Rules for Token Efficiency&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use imperative instructions&lt;/strong&gt;  — “Summarize in 3 bullets” not “Could you please provide a summary?”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Avoid pleasantries &lt;/strong&gt; — Models ignore them; you still pay for them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Specify output format upfront&lt;/strong&gt;  — “Respond only in JSON” prevents verbose explanations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cut redundant context&lt;/strong&gt;  — Don’t repeat info the model already has from earlier turns.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use structured delimiters &lt;/strong&gt; — XML tags or triple backticks help models parse faster with fewer clarification tokens.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Think of your prompt as a spec sheet, not a letter. Remove anything a machine doesn’t need to perform the task correctly.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Prompt Caching — Pay Once, Reuse Many Times
&lt;/h3&gt;

&lt;p&gt;Prompt caching is one of the most powerful and least talked about token-saving features available in modern LLM APIs (supported by Anthropic Claude, among others). The idea is simple: if a large part of your prompt stays the same across requests, cache it so you don’t pay to re-process it every single time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkrt8lb667d38rsni83u6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkrt8lb667d38rsni83u6.png" width="693" height="412"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  When Should You Cache?
&lt;/h4&gt;

&lt;p&gt;Caching pays off most when you have a large static prefix a system prompt with detailed instructions, a few-shot example block, or a knowledge base document that gets appended to every request. If your system prompt is 500–2000 tokens and you’re making dozens or hundreds of calls per hour, caching delivers immediate savings.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frlpk494tivxl58qv8tsn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frlpk494tivxl58qv8tsn.png" width="690" height="166"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In RAG (Retrieval-Augmented Generation) architectures, this is especially powerful. Instead of inserting 1,000 tokens of retrieved document context into every request, you cache the context once and reference it across multiple queries, a game-changer for document Q&amp;amp;A systems.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Model Selection — Right Tool, Right Job
&lt;/h3&gt;

&lt;p&gt;This is the strategy that sounds obvious but is violated constantly in production: not every task needs your most powerful model. Using a frontier model (like Claude Opus or GPT-4o) for every single request is like hiring a senior architect to hang a picture frame. It works, but the cost-to-value ratio is terrible.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9qp3xmufs4zuxo4f12i5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9qp3xmufs4zuxo4f12i5.png" width="700" height="555"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  The Cascading Model Pattern
&lt;/h4&gt;

&lt;p&gt;A powerful production architecture is the cascading router: a small, cheap model first evaluates the complexity of the incoming request. If it’s simple, it handles it directly. If it’s complex, it escalates to the frontier model. This gives you the economics of small models for the majority of traffic, with frontier quality reserved for the cases that truly need it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc6nedj36ol0tyrkeqbgy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc6nedj36ol0tyrkeqbgy.png" width="691" height="272"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqyn04rc733v18uhcdujv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqyn04rc733v18uhcdujv.png" width="687" height="175"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Output Discipline — Control What Comes Back
&lt;/h3&gt;

&lt;p&gt;Most developers obsess over input tokens. Far fewer think about output tokens the tokens the model generates in its response. This is a major blind spot, because output tokens are typically priced higher than input tokens, and a verbose model can silently drain your budget.&lt;/p&gt;

&lt;p&gt;Without explicit constraints, models tend to be generous they explain their reasoning, offer alternatives, add caveats, summarize what they just said, and generally say more than you asked for. Every one of those extra sentences is a billed token.&lt;/p&gt;

&lt;h4&gt;
  
  
  How to Constrain Output
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;❌ No Output Discipline:
# Result: model explains what JSON is, writes the JSON,
# then summarizes what it wrote. ~300 tokens.
"Extract the key data from this invoice."

✅ With Output Discipline:
# Result: pure JSON, nothing else. ~60 tokens.
"Extract from this invoice. Respond ONLY in valid JSON.
Schema: {vendor, date, amount, line_items[]}
No explanation. No preamble. No markdown."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  The max_tokens Parameter
&lt;/h4&gt;

&lt;p&gt;Beyond prompting, you have a hard lever: the max_tokens parameter in your API call. Setting this aggressively for tasks where you know the output structure forces the model to be concise. For a classification task that returns one of five labels, setting max_tokens: 10 is entirely reasonable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Sentiment classification — output is ONE word&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;anthropic&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;claude-haiku-4-5&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// small model&lt;/span&gt;
  &lt;span class="na"&gt;max_tokens&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// hard cap&lt;/span&gt;
  &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;
    &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`Classify sentiment. Reply ONLY with:
POSITIVE, NEGATIVE, or NEUTRAL.

Text: "&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;userText&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"`&lt;/span&gt;
  &lt;span class="p"&gt;}]&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Output Formats That Save Tokens
&lt;/h4&gt;

&lt;p&gt;Structured output formats tend to be more token-efficient than prose. A comparison:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvkzg6tc9dp5xe6gaietm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvkzg6tc9dp5xe6gaietm.png" width="690" height="268"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Putting It All Together: The Token-Efficient Stack
&lt;/h3&gt;

&lt;p&gt;These four strategies aren’t independent they compound. Here’s how a production-grade, token-efficient AI pipeline looks when all four are applied simultaneously:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzgn38ug6qt3xx7owym44.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzgn38ug6qt3xx7owym44.png" width="691" height="720"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Token Efficiency Is an Engineering Skill, Not a Hack
&lt;/h3&gt;

&lt;p&gt;What I find most compelling about this framework is that it reframes token optimization not as “doing less” but as engineering precision. Just like a good software engineer writes code that’s not just functional but efficient minimal allocations, no unnecessary computations a good AI engineer writes prompts and architectures that extract maximum value from every token.&lt;/p&gt;

&lt;p&gt;The analogy that resonates with me: token management is to AI engineering what database query optimization is to backend engineering. You can build something that works without it. But if you want to build something that scales, you have to think about it from day one.&lt;/p&gt;

&lt;p&gt;As AI models get cheaper over time, some of this becomes less critical. But the habits and patterns you build now precise prompting, smart caching, model routing will translate directly into better system design even as the underlying economics shift.&lt;/p&gt;

&lt;h3&gt;
  
  
  The 4-Point Takeaway
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Write prompts like specs, not letters. Cut pleasantries, redundancy, and verbose context. Every unnecessary word costs money at scale.&lt;/li&gt;
&lt;li&gt;Prompt Caching: Identify the static prefix of your prompts system instructions, few-shot examples, RAG context and cache them. Pay once, reuse hundreds of times.&lt;/li&gt;
&lt;li&gt;Model Selection: Build a routing layer. Route simple tasks (classification, extraction, summarization) to small fast models. Reserve frontier models for tasks where quality is non-negotiable.&lt;/li&gt;
&lt;li&gt;Output Discipline: Tell the model exactly what format you want and set max_tokens aggressively. Output tokens are priced at a premium every verbose explanation is a cost you didn’t ask for.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Token efficiency is not about being cheap it’s about being precise. The best AI engineers are the ones who know exactly what they need from a model, ask for exactly that, and get it back in exactly the right shape. That precision is the craft.&lt;/p&gt;

&lt;p&gt;To stay informed on the latest technical insights and tutorials, connect with me on &lt;a href="https://medium.com/@issackpaul95" rel="noopener noreferrer"&gt;Medium&lt;/a&gt; and &lt;a href="https://www.linkedin.com/in/minoltan/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;. For professional inquiries or technical discussions, please contact me via &lt;a href="http://issackpaul95@gmail.com/" rel="noopener noreferrer"&gt;email&lt;/a&gt;. I welcome the opportunity to engage with fellow professionals and address any questions you may have.&lt;/p&gt;

</description>
      <category>tokenoptimization</category>
      <category>mlops</category>
      <category>promptengineering</category>
      <category>mlm</category>
    </item>
    <item>
      <title>From Prompt Engineering to Context Engineering: The AI Revolution You Need to Know About</title>
      <dc:creator>Minoltan Issack</dc:creator>
      <pubDate>Tue, 26 May 2026 02:19:47 +0000</pubDate>
      <link>https://dev.to/minoltan/from-prompt-engineering-to-context-engineering-the-ai-revolution-you-need-to-know-about-46ol</link>
      <guid>https://dev.to/minoltan/from-prompt-engineering-to-context-engineering-the-ai-revolution-you-need-to-know-about-46ol</guid>
      <description>&lt;p&gt;&lt;em&gt;How the way we talk to AI is fundamentally changing — and why it matters for your future&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Day I Realized Prompts Weren’t Enough
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fix7cs21g0c5el7hj20q5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fix7cs21g0c5el7hj20q5.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the exact moment thousands of developers, data scientists, and AI engineers experienced in 2025. We had gotten really good at prompt engineering — the art of asking AI the right questions in the right way. But something was missing. The AI could reason brilliantly, but it couldn’t &lt;em&gt;see&lt;/em&gt; our world.&lt;/p&gt;

&lt;p&gt;That’s when everything changed. Welcome to the era of &lt;strong&gt;Context Engineering&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Actually Happened? The Shift Nobody Saw Coming
&lt;/h3&gt;

&lt;p&gt;In July 2025, Gartner made a bold declaration: “context engineering is in, and prompt engineering is out,” predicting it will appear in 80% of AI tools by 2028. This wasn’t just another tech buzzword — it was a fundamental shift in how we architect AI systems.&lt;/p&gt;

&lt;p&gt;But what does that actually mean?&lt;/p&gt;

&lt;p&gt;Let me tell you a story.&lt;/p&gt;

&lt;h4&gt;
  
  
  The Restaurant Analogy: Understanding Context Engineering
&lt;/h4&gt;

&lt;p&gt;Imagine you walk into a restaurant and tell the waiter: “I want something delicious.”&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;That’s prompt engineering.&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;You gave an instruction, but the waiter has no context. They don’t know if you’re vegetarian, allergic to nuts, whether you prefer spicy food, if you’re here for a business lunch or a romantic dinner, or even what cuisine you typically enjoy.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftah4cjbs401957385gix.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftah4cjbs401957385gix.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now imagine walking into a restaurant where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The waiter knows your dietary preferences&lt;/li&gt;
&lt;li&gt;They remember what you ordered last time&lt;/li&gt;
&lt;li&gt;They can see the current menu and what’s available in the kitchen&lt;/li&gt;
&lt;li&gt;They understand it’s your anniversary (from your reservation notes)&lt;/li&gt;
&lt;li&gt;They know the budget range you typically work with&lt;/li&gt;
&lt;li&gt;They have access to reviews of dishes from customers with similar tastes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;That’s context engineering.&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Same request, completely different outcome.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Context engineering is the practice of architecting the entire information environment for AI agents — not just the prompt, but memory, tools, retrieval, and state. It’s about giving AI systems the situational awareness they need to act with relevance and precision.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Five Layers of Context: Building the AI’s World
&lt;/h3&gt;

&lt;p&gt;Think of context engineering like building a house for your AI to live in. You’re not just giving it instructions; you’re creating an entire environment. Here’s what goes into that environment:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4l9ak7ls6n7pu0folcc9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4l9ak7ls6n7pu0folcc9.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  1. The Memory Layer — What the AI Remembers
&lt;/h4&gt;

&lt;p&gt;Just like you remember conversations with your friends, AI systems need memory. But not just any memory — structured, organized memory.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Short-term memory&lt;/strong&gt; : What happened in this conversation?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Working memory&lt;/strong&gt; : What am I actively thinking about right now?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Long-term memory&lt;/strong&gt; : What do I know about this user, this company, this domain?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In 2026, hierarchical memory architectures have become a major focus, enabling models to process and remember vast amounts of information over extended interactions through layered memory systems.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. The Knowledge Layer — What the AI Knows
&lt;/h4&gt;

&lt;p&gt;This is where things get interesting. Instead of hoping the AI “knows” something from its training, you explicitly give it access to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your company’s internal documents&lt;/li&gt;
&lt;li&gt;Industry-specific terminology&lt;/li&gt;
&lt;li&gt;Product specifications&lt;/li&gt;
&lt;li&gt;Historical data and patterns&lt;/li&gt;
&lt;li&gt;Regulatory requirements&lt;/li&gt;
&lt;li&gt;Best practices and guidelines&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Think of it as building a custom library for your AI, filled with exactly the books it needs to do its job.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. The Tool Layer — What the AI Can Do
&lt;/h4&gt;

&lt;p&gt;Context isn’t just about information — it’s about capability. Modern AI systems need access to tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Can it query your database?&lt;/li&gt;
&lt;li&gt;Can it send emails or create calendar events?&lt;/li&gt;
&lt;li&gt;Can it fetch real-time data from APIs?&lt;/li&gt;
&lt;li&gt;Can it execute code or run calculations?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Model Context Protocol (MCP), now governed by the Agentic AI Foundation under the Linux Foundation, has become the universal standard for connecting AI agents to enterprise tools, with 97M+ monthly SDK downloads.&lt;/p&gt;

&lt;h4&gt;
  
  
  4. The Rules Layer — What the AI Should and Shouldn’t Do
&lt;/h4&gt;

&lt;p&gt;This is about governance and guardrails:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What data can the AI access?&lt;/li&gt;
&lt;li&gt;What actions require human approval?&lt;/li&gt;
&lt;li&gt;What tone and style should it use?&lt;/li&gt;
&lt;li&gt;What are the security and compliance requirements?&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  5. The State Layer — Where the AI Is Right Now
&lt;/h4&gt;

&lt;p&gt;Context is dynamic. The AI needs to know:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What task is currently being performed?&lt;/li&gt;
&lt;li&gt;What stage of the workflow are we in?&lt;/li&gt;
&lt;li&gt;What just happened, and what comes next?&lt;/li&gt;
&lt;li&gt;What’s the current environment (production, testing, etc.)?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Architecture: How It All Works Together
&lt;/h3&gt;

&lt;p&gt;Let me break down the architecture in a way that makes sense.&lt;/p&gt;

&lt;h4&gt;
  
  
  The Old Way: Prompt Engineering
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5dyy4oqzm2bgx8jwmgwa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5dyy4oqzm2bgx8jwmgwa.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Simple, linear, limited.&lt;/p&gt;

&lt;h4&gt;
  
  
  The New Way: Context Engineering
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fviamo8xio9hi7d0psjs2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fviamo8xio9hi7d0psjs2.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is what Phil Schmid calls “context operations”: Context Offloading (moving information into external systems), Context Reduction (compressing old information), and dynamic context assembly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Real-World Example: The Customer Support Revolution
&lt;/h3&gt;

&lt;p&gt;Let’s see this in action with a real scenario.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;User asks&lt;/strong&gt; : “Why was my order delayed?”&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;With Prompt Engineering:&lt;/strong&gt; AI generates a generic response about possible delivery delays, shipping times, etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;With Context Engineering:&lt;/strong&gt; The AI has access to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Customer Data&lt;/strong&gt; : Order #12345, shipped on May 10, expected May 13&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Logistics Data&lt;/strong&gt; : Weather delay in Memphis distribution center&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Policy Knowledge&lt;/strong&gt; : Standard compensation is 10% discount for delays over 2 days&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tools&lt;/strong&gt; : Can check real-time tracking, issue refunds, send updated ETAs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Company Tone&lt;/strong&gt; : Friendly, empathetic, solution-oriented&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Result&lt;/strong&gt; : “I see your order #12345 was affected by severe weather in our Memphis distribution center. It’s now scheduled to arrive tomorrow, May 14. Since this is beyond our standard delivery window, I’ve applied a 10% discount to your account. Would you like me to send a detailed tracking update to your email?”&lt;/p&gt;

&lt;p&gt;See the difference? Same question, completely different intelligence level.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Four Operations: How to Do Context Engineering Right
&lt;/h3&gt;

&lt;p&gt;Context engineering breaks down into four key operations:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fugo0c9jq7hho5qt8jbdq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fugo0c9jq7hho5qt8jbdq.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Context Offloading
&lt;/h4&gt;

&lt;p&gt;Move information out of prompts into structured external systems — databases, vector stores, knowledge graphs. Don’t stuff everything into a single prompt.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Context Reduction
&lt;/h4&gt;

&lt;p&gt;Compress and summarize information intelligently. Use semantic search to find only what’s relevant. Prevent “context rot” where old, irrelevant information clutters the window.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Context Injection
&lt;/h4&gt;

&lt;p&gt;Dynamically assemble the right context at runtime based on the query. This is where RAG (Retrieval-Augmented Generation) systems shine.&lt;/p&gt;

&lt;h4&gt;
  
  
  4. Context Management
&lt;/h4&gt;

&lt;p&gt;Version control your context. Test it. Govern it. Treat context as a first-class data product, not an afterthought.&lt;/p&gt;

&lt;h3&gt;
  
  
  Common Mistakes: What Not to Do
&lt;/h3&gt;

&lt;p&gt;Let me save you some pain. Here are the mistakes everyone makes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Context Dumping&lt;/strong&gt; : Throwing everything into the prompt and hoping the AI figures it out. This is like giving someone a 500-page manual when they asked for a quick answer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Static Context&lt;/strong&gt; : Using the same context for every query. Context should be dynamic and query-specific.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No Governance&lt;/strong&gt; : Giving the AI access to everything without proper access controls or audit trails.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ignoring Memory&lt;/strong&gt; : Treating every interaction as if it’s the first one. Users expect continuity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Over-Engineering&lt;/strong&gt; : Building complex context systems for simple tasks that don’t need them. Start simple, scale as needed.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The Tools of the Trade
&lt;/h3&gt;

&lt;p&gt;If you’re getting into context engineering, here are the tools you should know:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;LangChain &amp;amp; LlamaIndex&lt;/strong&gt; : For building RAG pipelines and context management systems&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vector Databases&lt;/strong&gt; (Pinecone, Weaviate, Qdrant): For semantic search and knowledge retrieval&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP (Model Context Protocol)&lt;/strong&gt;: The emerging standard for connecting AI to enterprise tools&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prompt Flow &amp;amp; Haystack&lt;/strong&gt; : For orchestrating complex context assembly workflows&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Future: Where We’re Headed
&lt;/h3&gt;

&lt;p&gt;In 2026, the trend is toward “knowledge runtimes” that manage retrieval, verification, reasoning, access control, and audit trails as integrated operations — like how container orchestrators manage application workloads.&lt;/p&gt;

&lt;p&gt;We’re also seeing the emergence of &lt;strong&gt;Cognitive AI&lt;/strong&gt; architectures that formalize human-like memory models with discrete memory modules for short-term, working, and long-term memory.&lt;/p&gt;

&lt;p&gt;The future isn’t about better prompts. It’s about better context architectures.&lt;/p&gt;

&lt;h3&gt;
  
  
  Your Takeaway: What You Should Do Next
&lt;/h3&gt;

&lt;p&gt;Here’s my advice, whether you’re a developer, data scientist, business leader, or curious learner:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Start thinking in systems, not prompts&lt;/strong&gt; : When you interact with AI, ask yourself: “What context does this system need to be truly intelligent?”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Learn the fundamentals&lt;/strong&gt; : Understand RAG, vector databases, embedding models, and semantic search. These are the building blocks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Experiment with context patterns&lt;/strong&gt; : Try different ways of structuring and injecting context. There’s no one-size-fits-all solution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Treat context as infrastructure&lt;/strong&gt; : Organizations that treat context engineering as core infrastructure rather than an afterthought report dramatically different outcomes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stay updated&lt;/strong&gt; : This field is evolving rapidly. Follow developments in MCP, agentic AI frameworks, and enterprise AI architectures.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;What’s your experience with AI systems? Have you hit the limitations of prompt engineering? I’d love to hear your thoughts in the comments below.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If this article helped you understand context engineering, give it a clap 👏 and share it with someone who’s working with AI.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;To stay informed on the latest technical insights and tutorials, connect with me on &lt;a href="https://medium.com/@issackpaul95" rel="noopener noreferrer"&gt;Medium&lt;/a&gt; and &lt;a href="https://www.linkedin.com/in/minoltan/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;. For professional inquiries or technical discussions, please contact me via &lt;a href="http://issackpaul95@gmail.com/" rel="noopener noreferrer"&gt;email&lt;/a&gt;. I welcome the opportunity to engage with fellow professionals and address any questions you may have.&lt;/p&gt;

</description>
      <category>ai2026</category>
      <category>ai</category>
      <category>contextengineering</category>
      <category>promptengineering</category>
    </item>
    <item>
      <title>Why I Stopped Writing API Integrations and Started Using MCP</title>
      <dc:creator>Minoltan Issack</dc:creator>
      <pubDate>Mon, 18 May 2026 02:23:31 +0000</pubDate>
      <link>https://dev.to/minoltan/why-i-stopped-writing-api-integrations-and-started-using-mcp-2m8j</link>
      <guid>https://dev.to/minoltan/why-i-stopped-writing-api-integrations-and-started-using-mcp-2m8j</guid>
      <description>&lt;p&gt;&lt;em&gt;The story of how every developer eventually hits the same wall — and what finally fixes it&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Let’s Start From the Very Beginning
&lt;/h3&gt;

&lt;p&gt;Forget AI for a moment.&lt;/p&gt;

&lt;p&gt;You have a &lt;strong&gt;MySQL database&lt;/strong&gt;. Inside it lives your company’s data — customer records, orders, inventory, whatever. You want to work with that data. So what do you do?&lt;/p&gt;

&lt;p&gt;You open a MySQL client. You connect directly. You run queries. Simple.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxmot94ajzdi9mo754jb0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxmot94ajzdi9mo754jb0.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This works perfectly — &lt;em&gt;as long as you’re the only one who needs the data.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;But then your frontend team needs the same data. Your mobile app needs it. Your analytics dashboard needs it. Your reporting tool needs it.&lt;/p&gt;

&lt;p&gt;Now everyone is connecting directly to MySQL. Credentials are scattered everywhere. If the database schema changes, every single client breaks. There’s no security layer, no rate limiting, no caching.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Direct database connections don’t scale.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The API Layer Enters the Picture
&lt;/h3&gt;

&lt;p&gt;So the smart engineering move is: you put an &lt;strong&gt;API in the middle&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You write a Python (or Node.js) backend. It connects to MySQL. It exposes clean endpoints. Now nobody talks to the database directly — they talk to the API.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo4yulq0uqwom9pr4xopc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo4yulq0uqwom9pr4xopc.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is much better. One database connection. One place to apply security, validation, and business logic. If the database changes, you update the API once and all clients keep working.&lt;/p&gt;

&lt;p&gt;This pattern is so fundamental that every developer learns it early in their career. The API becomes the &lt;strong&gt;single source of truth&lt;/strong&gt; between your data and the world.&lt;/p&gt;

&lt;p&gt;Great. We’ve built solid engineering foundations. Now let’s bring AI into the picture.&lt;/p&gt;

&lt;h3&gt;
  
  
  Adding LLMs to the Mix
&lt;/h3&gt;

&lt;p&gt;It’s 2024. Your company wants an AI assistant. You want it to answer questions about your data — the very data sitting in that MySQL database your API already serves.&lt;/p&gt;

&lt;p&gt;So you think: &lt;em&gt;let me connect my LLM to my API.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You start with one model. Let’s say  &lt;strong&gt;Gemini&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You write a client file. It calls your Python API, gets data, formats it, and sends it to the Gemini API with your API key. The LLM reads the data and responds intelligently.&lt;/p&gt;

&lt;p&gt;It works! Your AI assistant can now answer questions about your customer data.&lt;/p&gt;

&lt;p&gt;You show it to the team. Everyone’s excited.&lt;/p&gt;

&lt;p&gt;Then someone asks: &lt;em&gt;“Can we also try Claude? I heard it’s better for reasoning.”&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  More LLMs, More Clients
&lt;/h3&gt;

&lt;p&gt;Sure. You write another client file. This time for  &lt;strong&gt;Claude&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# claude_client.py
&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;anthropic&lt;/span&gt;

&lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;http://localhost:8000/customers&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;anthropic&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Anthropic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;YOUR_CLAUDE_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;claude-sonnet-4-5&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;max_tokens&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Here is our customer data: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;user_question&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;}]&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then the CTO says: &lt;em&gt;“We should also benchmark against OpenAI.”&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# openai_client.py
&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;OpenAI&lt;/span&gt;

&lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;http://localhost:8000/customers&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;YOUR_OPENAI_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gpt-4o&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Here is our customer data: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\n\n&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;user_question&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;}]&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you have three client files. Each one:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Calls your Python API to fetch data&lt;/li&gt;
&lt;li&gt;Formats the data for that specific LLM&lt;/li&gt;
&lt;li&gt;Sends it to the LLM’s API with that model’s unique syntax&lt;/li&gt;
&lt;li&gt;Parses the response in that model’s unique response format&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Three files. Manageable. You handle it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F51h74u5fj8vkkffcc4hf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F51h74u5fj8vkkffcc4hf.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Things are working. But then your API grows.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Problem Starts Here
&lt;/h3&gt;

&lt;p&gt;Your Python API started simple. One file. A few endpoints.&lt;/p&gt;

&lt;p&gt;But over time, the team adds features. New data sources. New business logic. New modules.&lt;/p&gt;

&lt;p&gt;Six months later, your backend isn’t one file anymore.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It’s 25 Python files.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now here’s the question that should keep you up at night:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Your three LLM clients — Gemini, Claude, OpenAI — which of these 25 files do they know about?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Only the ones you hardcoded into them when you wrote them.&lt;/p&gt;

&lt;p&gt;The customers.py endpoint, maybe orders.py. Whatever you thought to include back then.&lt;/p&gt;

&lt;p&gt;But forecasts.py? campaigns.py? leads.py? The client files have no idea those even exist.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Real Nightmare: Every Client Needs to Be Updated
&lt;/h3&gt;

&lt;p&gt;Let’s say you add a new module — contracts.py. It's important. Your LLM assistant should definitely be able to query it.&lt;/p&gt;

&lt;p&gt;What do you have to do?&lt;/p&gt;

&lt;p&gt;You open gemini_client.py. Add the new endpoint. Test it. Deploy. Then open claude_client.py. Add the same endpoint. Test it. Deploy. Then open openai_client.py. Same thing again.&lt;/p&gt;

&lt;p&gt;Three files updated for one new backend module.&lt;/p&gt;

&lt;p&gt;Now imagine this happening every week. Every sprint. Every time a new Python file gets added to the backend.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;And what if you add a fourth LLM? A fifth?&lt;/strong&gt; Maybe you want to try a local Ollama model. Or a fine-tuned internal model. Every new LLM means another client file that needs to be kept in sync with 25 (and growing) backend files.&lt;/p&gt;

&lt;p&gt;This is the wall every team eventually hits. You started with a clean, sensible architecture — MySQL → API → LLM clients. But as the system grows, the number of connections explodes. You’re writing the same integration logic over and over. You’re updating files constantly. One missed update means your AI gives stale or incomplete answers.&lt;/p&gt;

&lt;p&gt;Let’s visualize how bad this gets:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F02wrrdmj0ac4qm0s4fzk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F02wrrdmj0ac4qm0s4fzk.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each client knows a &lt;em&gt;different subset&lt;/em&gt; of your backend. They’re out of sync with each other. They’re all out of date with the actual backend. And every new LLM you add starts at zero — it knows nothing until you manually wire it up.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is called the N × M problem.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;N&lt;/strong&gt; = number of LLM clients (Gemini, Claude, OpenAI, Ollama, your custom model…)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;M&lt;/strong&gt; = number of backend modules (25 Python files, growing…)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;N × M&lt;/strong&gt; = the total number of integrations you have to write and maintain&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;3 LLMs × 25 files = &lt;strong&gt;75 custom integration points&lt;/strong&gt; to maintain. And that number only goes up.&lt;/p&gt;

&lt;p&gt;There has to be a better way.&lt;/p&gt;

&lt;h3&gt;
  
  
  What If There Was One Standard?
&lt;/h3&gt;

&lt;p&gt;Step back and think about what all these clients are actually doing. They’re all:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Discovering what data/tools are available&lt;/li&gt;
&lt;li&gt;Fetching or invoking those capabilities&lt;/li&gt;
&lt;li&gt;Passing results back to an LLM&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The &lt;em&gt;logic&lt;/em&gt; is identical. Only the &lt;em&gt;format&lt;/em&gt; differs — because each LLM has its own proprietary way of describing tools and functions.&lt;/p&gt;

&lt;p&gt;What if we created &lt;strong&gt;one universal standard&lt;/strong&gt; for describing capabilities — and any LLM that speaks that standard could automatically discover and use all 25 of your backend modules?&lt;/p&gt;

&lt;p&gt;What if, when you added contracts.py, you only had to register it in &lt;strong&gt;one place&lt;/strong&gt;  — and all your LLM clients instantly knew about it?&lt;/p&gt;

&lt;p&gt;That’s the idea behind &lt;strong&gt;Model Context Protocol (MCP)&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Enter MCP: One Standard to Connect Them All
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;MCP (Model Context Protocol)&lt;/strong&gt; was introduced by Anthropic in November 2024. The concept is elegant: instead of each LLM client talking directly to your backend in its own custom way, you put a &lt;strong&gt;standardized server&lt;/strong&gt; in the middle.&lt;/p&gt;

&lt;p&gt;Your backend exposes its capabilities through the MCP Server. Every LLM client — whether it’s Claude, Gemini, OpenAI, or a local Ollama model — speaks to that one server in the same universal language.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzct4ab6slg48fgqp2tr0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzct4ab6slg48fgqp2tr0.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now when you add contracts.py:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You register it &lt;strong&gt;once&lt;/strong&gt; in the MCP Server&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;All LLM clients&lt;/strong&gt; automatically discover and use it&lt;/li&gt;
&lt;li&gt;Zero updates to any client file&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you add a brand new LLM — Llama, Mistral, whatever comes next:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The new client just connects to the existing MCP Server&lt;/li&gt;
&lt;li&gt;It &lt;strong&gt;immediately&lt;/strong&gt; has access to all 25 modules&lt;/li&gt;
&lt;li&gt;Zero integration code to write&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The N × M problem collapses to &lt;strong&gt;N + M&lt;/strong&gt;. You maintain your backend modules (M) separately and your LLM clients (N) separately. The MCP Server is the bridge that connects them all.&lt;/p&gt;

&lt;h3&gt;
  
  
  How MCP is Structured: The Three Players
&lt;/h3&gt;

&lt;p&gt;MCP defines exactly three roles in every interaction:&lt;/p&gt;

&lt;h4&gt;
  
  
  The Host
&lt;/h4&gt;

&lt;p&gt;The AI application your user interacts with. Claude Desktop, VS Code with Copilot, Cursor, or your own custom chatbot. The Host contains the LLM and manages the conversation.&lt;/p&gt;

&lt;h4&gt;
  
  
  The Client
&lt;/h4&gt;

&lt;p&gt;Lives inside the Host. Acts as the translator — converts the LLM’s requests into the MCP protocol format (JSON-RPC 2.0), sends them to the Server, and brings responses back. Each Client has a 1:1 connection with one MCP Server, but a Host can run multiple Clients simultaneously.&lt;/p&gt;

&lt;h4&gt;
  
  
  The Server
&lt;/h4&gt;

&lt;p&gt;This is what you build. It wraps your backend capabilities — your 25 Python files — and exposes them through three standardized primitives: &lt;strong&gt;Resources&lt;/strong&gt; , &lt;strong&gt;Tools&lt;/strong&gt; , and  &lt;strong&gt;Prompts&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwqn12y9dmlkgkad1yxeo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwqn12y9dmlkgkad1yxeo.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Three Primitives: Resources, Tools, and Prompts
&lt;/h3&gt;

&lt;p&gt;This is the core design of MCP — and the mental model is beautifully simple.&lt;/p&gt;

&lt;h4&gt;
  
  
  Resources — Read This
&lt;/h4&gt;

&lt;p&gt;Resources give the LLM &lt;strong&gt;read-only access to data&lt;/strong&gt;. No side effects. No changes. Just information retrieval.&lt;/p&gt;

&lt;p&gt;Going back to our story: your customers.py and reports.py modules — if an LLM just needs to &lt;em&gt;read&lt;/em&gt; customer data to answer a question, you'd expose those as Resources.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nd"&gt;@server.resource&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;customers/list&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_customers&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Resource&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fetch_all_customers&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;Resource&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Resources are perfect for RAG-style workflows. Instead of dumping your entire database into the prompt upfront, you expose data as addressable resources the LLM can fetch on demand — much more efficient.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Resources = Query, never modify&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  Tools — Do This
&lt;/h4&gt;

&lt;p&gt;Tools are functions the LLM can &lt;strong&gt;invoke to take real actions&lt;/strong&gt;. This is where MCP becomes truly powerful for agentic use cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a new order in the database&lt;/li&gt;
&lt;li&gt;Send an email notification&lt;/li&gt;
&lt;li&gt;Update an inventory count&lt;/li&gt;
&lt;li&gt;Generate and export a report&lt;/li&gt;
&lt;li&gt;Trigger a shipping webhook&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each Tool has a typed JSON Schema so the LLM knows exactly what arguments to pass. The LLM decides when a Tool is needed, emits a structured call, and the MCP Client routes it to the Server for execution.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nd"&gt;@server.tool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;create_order&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;create_order&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;customer_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;ToolResult&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;order&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;db&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;insert_order&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;customer_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;ToolResult&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Order &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; created successfully&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Tools = Take action, produce side effects&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  Prompts — Use This Template
&lt;/h4&gt;

&lt;p&gt;Prompts are reusable, parameterized templates that standardize common LLM workflows. Users select them explicitly.&lt;/p&gt;

&lt;p&gt;For example: a “generate monthly sales report” prompt that takes month and year as parameters and assembles the perfect system message for that task — every time, consistently.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Prompts = Standardize, make repeatable&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The golden rule: &lt;strong&gt;Resources query. Tools act. Prompts standardize.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Back to Our Story: The Before and After
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Before MCP&lt;/strong&gt;  — what our system looked like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg1wofjhl39elwer7ylcv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg1wofjhl39elwer7ylcv.png" width="703" height="224"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;After MCP&lt;/strong&gt;  — what it looks like now:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Funvs0nuul2mu510u1i25.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Funvs0nuul2mu510u1i25.png" width="703" height="224"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The architecture went from a tangled web of N × M custom connections to a clean hub-and-spoke model. Your backend team works on the MCP Server. Your AI/client team works on the LLM integrations. They no longer need to constantly sync up every time something changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  A Quick Example: How It Feels in Practice
&lt;/h3&gt;

&lt;p&gt;Here’s the kind of conversation that becomes possible once everything is connected through MCP:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;User:&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;“Show me all customers who placed orders last month but haven’t received their shipment yet, then draft a follow-up email for each of them.”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Without MCP, you’d need to manually wire orders.py, customers.py, shipping.py, and a notification tool into whichever LLM client you're using.&lt;/p&gt;

&lt;p&gt;With MCP, the LLM:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Calls the orders &lt;strong&gt;Resource&lt;/strong&gt; → gets last month's orders&lt;/li&gt;
&lt;li&gt;Calls the customers &lt;strong&gt;Resource&lt;/strong&gt; → gets customer details&lt;/li&gt;
&lt;li&gt;Calls the shipping &lt;strong&gt;Resource&lt;/strong&gt; → checks shipment status&lt;/li&gt;
&lt;li&gt;Filters the unshipped ones&lt;/li&gt;
&lt;li&gt;Calls the draft_email &lt;strong&gt;Tool&lt;/strong&gt; → generates personalized follow-ups&lt;/li&gt;
&lt;li&gt;Reports back to you with a summary&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All of this using standardized MCP calls. No custom glue code. And if tomorrow you want to run this same workflow with Claude instead of Gemini? Just point Claude’s client at the same MCP Server. Done.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Bigger Picture
&lt;/h3&gt;

&lt;p&gt;MCP was introduced by Anthropic in November 2024 and was inspired by the &lt;strong&gt;Language Server Protocol (LSP)&lt;/strong&gt; — the standard that lets code editors like VS Code support dozens of programming languages without each language needing its own custom editor plugin.&lt;/p&gt;

&lt;p&gt;MCP does the same thing for AI: instead of every LLM needing a custom plugin for every tool, there’s one protocol that all of them speak.&lt;/p&gt;

&lt;p&gt;Since its release, it has been adopted by OpenAI, Google DeepMind, and a rapidly growing ecosystem of developer tools. In December 2025, Anthropic donated the protocol to the Linux Foundation, making it vendor-neutral and community-governed. Today (May 2026), there are 200+ community-built MCP servers for tools like GitHub, Slack, PostgreSQL, Stripe, Figma, and Docker.&lt;/p&gt;

&lt;p&gt;It has moved from “interesting Anthropic experiment” to the &lt;strong&gt;de facto infrastructure standard&lt;/strong&gt; for agentic AI systems.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where to Start
&lt;/h3&gt;

&lt;p&gt;If this story resonates with you and you’re ready to stop writing N × M integrations:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Browse the MCP server registry&lt;/strong&gt; at modelcontextprotocol.io — there's likely already a server for the tools you use&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Install Claude Desktop&lt;/strong&gt; and connect a community MCP server to experience it as a user first&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build a simple MCP server&lt;/strong&gt; using the Python SDK (pip install mcp) — wrap one of your existing API endpoints&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Connect it to your preferred LLM client&lt;/strong&gt;  — the same server will work with Claude, GPT, or any local model&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The documentation is clean, the SDKs are mature, and the community is extremely active.&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Thoughts
&lt;/h3&gt;

&lt;p&gt;The journey from a MySQL direct connection → REST API → LLM client → MCP isn’t just a technical evolution. It’s a story that every developer who works with AI will live through.&lt;/p&gt;

&lt;p&gt;You’ll start simple. You’ll add more LLMs. You’ll add more backend modules. And one day you’ll look at your codebase and realize you’re maintaining 75 custom integration points just to keep three AI clients in sync with a growing backend.&lt;/p&gt;

&lt;p&gt;That’s the moment MCP starts making complete sense.&lt;/p&gt;

&lt;p&gt;It’s not a fancy new concept. It’s the same lesson we already learned with APIs — you don’t let every client talk directly to the database. You put a standard interface in the middle.&lt;/p&gt;

&lt;p&gt;MCP is that standard interface. But for AI.&lt;/p&gt;

&lt;p&gt;To stay informed on the latest technical insights and tutorials, connect with me on &lt;a href="https://medium.com/@issackpaul95" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/minoltan/" rel="noopener noreferrer"&gt;LinkedIn,&lt;/a&gt; and &lt;a href="https://dev.to/minoltan"&gt;Dev.to&lt;/a&gt;. For professional inquiries or technical discussions, please contact me via &lt;a href="http://issackpaul95@gmail.com/" rel="noopener noreferrer"&gt;email&lt;/a&gt;. I welcome the opportunity to engage with fellow professionals and address any questions you may have.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>modelcontextprotocol</category>
      <category>mcps</category>
      <category>mcpserver</category>
    </item>
    <item>
      <title>Why RAG is the Must-Have AI Skill in 2026: 11 Types Explained!</title>
      <dc:creator>Minoltan Issack</dc:creator>
      <pubDate>Tue, 12 May 2026 02:23:49 +0000</pubDate>
      <link>https://dev.to/minoltan/why-rag-is-the-must-have-ai-skill-in-2026-11-types-explained-4pga</link>
      <guid>https://dev.to/minoltan/why-rag-is-the-must-have-ai-skill-in-2026-11-types-explained-4pga</guid>
      <description>&lt;p&gt;If you’ve built an AI chatbot or LLM-powered application recently, you’ve probably hit this wall:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2ka2g79rarm9wojhanqv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2ka2g79rarm9wojhanqv.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s ask question in chatgpt, “Hey what is my company policy?”, it simply replies, “I don’ know or give some generic answers of common company policies”&lt;/p&gt;

&lt;p&gt;Your model gives beautiful, fluent answers… that are completely wrong. Or outdated. Or hallucinated.&lt;/p&gt;

&lt;p&gt;Welcome to the &lt;strong&gt;context problem&lt;/strong&gt;  — and why Retrieval-Augmented Generation (RAG) has become the most critical architecture pattern in modern AI.&lt;/p&gt;

&lt;p&gt;In this deep dive, we’ll explore the &lt;strong&gt;11 types of RAG systems&lt;/strong&gt; that are transforming how AI accesses, processes, and generates information. Whether you’re building customer support bots, enterprise search systems, or AI assistants, understanding these architectures isn’t optional anymore — it’s essential.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Problem: Why LLMs Alone Aren’t Enough
&lt;/h3&gt;

&lt;p&gt;Large Language Models are incredible. GPT-4, Claude, Gemini — they can write code, explain concepts, and hold conversations that feel eerily human.&lt;/p&gt;

&lt;p&gt;But they have three fundamental limitations:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Knowledge Cutoff&lt;/strong&gt; : They only know what they were trained on. Ask GPT-4 about something from last week? Blank stare.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Hallucination&lt;/strong&gt; : When they don’t know something, they confidently make it up. Your legal chatbot citing non-existent case law? That’s hallucination.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. No Access to Private Data&lt;/strong&gt; : Your company’s internal documents, customer records, proprietary research — the model has never seen any of it.&lt;/p&gt;

&lt;p&gt;This is where RAG comes in.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Is RAG?
&lt;/h3&gt;

&lt;p&gt;Retrieval-Augmented Generation is deceptively simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Instead of asking the LLM to answer from memory, you give it a search engine.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here’s the flow:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0uwzcppxjj7yfhrz0aw1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0uwzcppxjj7yfhrz0aw1.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The magic? The LLM doesn’t need to “know” your financials. It just needs to read and synthesize what the retriever found.&lt;/p&gt;

&lt;p&gt;Think of it like this: &lt;strong&gt;The LLM is the smart analyst. The retriever is their research assistant.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why RAG Matters in 2026
&lt;/h3&gt;

&lt;p&gt;The RAG landscape has evolved dramatically. What worked in 2024 — basic vector search and prompt stuffing — is now considered “naive RAG.”&lt;/p&gt;

&lt;p&gt;Here’s what changed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hybrid retrieval&lt;/strong&gt; (combining semantic + keyword search) is now table stakes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real-time data integration&lt;/strong&gt; has moved from nice-to-have to mandatory&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-modal RAG&lt;/strong&gt; (text + images + code) is becoming mainstream&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agentic RAG&lt;/strong&gt; (where the model controls its own retrieval) is production-ready&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In 2026, naive RAG is seen as a prototype at best and a liability at worst. The bottleneck has shifted from generation quality to retrieval precision.&lt;/p&gt;

&lt;p&gt;If your retriever pulls three irrelevant paragraphs and misses the one critical sentence, even the best LLM will hallucinate.&lt;/p&gt;

&lt;p&gt;Let’s dive into the 11 RAG architectures you need to know.&lt;/p&gt;

&lt;h3&gt;
  
  
  Type 1: Naive RAG — The Foundation
&lt;/h3&gt;

&lt;h4&gt;
  
  
  What It Is
&lt;/h4&gt;

&lt;p&gt;The “Hello World” of RAG. The simplest possible implementation — embed your documents, store them, search by similarity, and feed results to an LLM.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pipeline:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fctpq93bs0amlgo928pog.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fctpq93bs0amlgo928pog.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;How it works:&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Convert your documents into embeddings (vector representations)&lt;/li&gt;
&lt;li&gt;Store them in a vector database (Pinecone, Weaviate, Chroma)&lt;/li&gt;
&lt;li&gt;When a query comes in, convert it to an embedding&lt;/li&gt;
&lt;li&gt;Find the K most similar documents (cosine similarity)&lt;/li&gt;
&lt;li&gt;Jam those documents into the LLM prompt&lt;/li&gt;
&lt;li&gt;Generate answer&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Why It Works
&lt;/h4&gt;

&lt;p&gt;Embeddings capture the &lt;em&gt;meaning&lt;/em&gt; of text, not just keywords. So when a user asks “How do I cancel my subscription?”, it can match documents that say “terminate your account” — even though the words are different. It’s fast, easy to set up, and effective for straightforward use cases.&lt;/p&gt;

&lt;h4&gt;
  
  
  When to Use It
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Proof of concepts&lt;/strong&gt; and quick demos&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Small, homogeneous datasets&lt;/strong&gt; (e.g., product documentation)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Low-stakes applications&lt;/strong&gt; where occasional errors are acceptable&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Real-World Example
&lt;/h4&gt;

&lt;p&gt;A customer support chatbot that searches FAQs to answer common questions like “How do I reset my password?” Works well when questions match FAQ phrasing, fails when they don’t.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Limitation:&lt;/strong&gt; If a user asks to compare Q3 2025 revenue vs. Q3 2024, vector search might return the wrong year’s data because the semantic distance between “2024” and “2025” is negligible to an embedding model. One wrong digit, one wrong answer.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Type 2: Advanced RAG with Re-Ranking
&lt;/h3&gt;

&lt;h4&gt;
  
  
  What It Is
&lt;/h4&gt;

&lt;p&gt;Naive RAG with a second-stage precision filter. It casts a wide net first, then deeply scores each result to keep only the most relevant ones before sending them to the LLM.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pipeline:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnuqcx9afmzx3kmedxpiw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnuqcx9afmzx3kmedxpiw.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;How it works:&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;First pass:&lt;/strong&gt; Cast a wide net with vector search — retrieve 50 candidates&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Second pass:&lt;/strong&gt; Run each candidate through a cross-encoder model that scores how well it actually answers the query&lt;/li&gt;
&lt;li&gt;Keep only the top 5 highest-scoring results&lt;/li&gt;
&lt;li&gt;Feed these to the LLM for answer generation&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Why It Works
&lt;/h4&gt;

&lt;p&gt;Vector search is fast but approximate — it finds documents that are &lt;em&gt;conceptually close&lt;/em&gt;, not necessarily the most &lt;em&gt;precisely relevant&lt;/em&gt;. Cross-encoders are slower but far more accurate because they evaluate the query and document together as a pair, not separately. The two-stage approach gives you the best of both: &lt;strong&gt;speed from vector search, precision from re-ranking&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  When to Use It
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;High-precision requirements (legal, medical, financial)&lt;/li&gt;
&lt;li&gt;Queries that need exact matches (product codes, policy numbers, citations)&lt;/li&gt;
&lt;li&gt;When retrieval quality directly impacts business outcomes&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Real-World Example
&lt;/h4&gt;

&lt;p&gt;A legal research tool where missing a relevant case citation could cost millions. The re-ranker ensures that when the model says “no relevant cases found,” it’s actually true — not just a gap in the initial retrieval pass.&lt;/p&gt;

&lt;h3&gt;
  
  
  Type 3: Hybrid Search RAG
&lt;/h3&gt;

&lt;h4&gt;
  
  
  What It Is
&lt;/h4&gt;

&lt;p&gt;A retrieval system that runs two search methods in parallel — semantic (neural) search and keyword (BM25) search — then merges the results for better overall coverage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pipeline:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcsez2sapwbz3k2xmjhp9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcsez2sapwbz3k2xmjhp9.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;How it works:&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Semantic search:&lt;/strong&gt; Embeds the query and finds conceptually similar documents&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keyword search (BM25):&lt;/strong&gt; Finds documents with exact term matches&lt;/li&gt;
&lt;li&gt;Both results are merged using &lt;strong&gt;Reciprocal Rank Fusion (RRF)&lt;/strong&gt; — a scoring formula that combines rankings from both methods&lt;/li&gt;
&lt;li&gt;The unified top results are sent to the LLM&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Why It Works
&lt;/h4&gt;

&lt;p&gt;Each search method has a blind spot:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Semantic search&lt;/strong&gt; understands intent but can miss exact terms. Query: &lt;em&gt;“reducing operational costs”&lt;/em&gt; → finds documents about “efficiency improvements” ✅&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keyword search&lt;/strong&gt; catches specifics but misses meaning. Query: &lt;em&gt;“Product Code XJ-2847B”&lt;/em&gt; → finds exact matches for that code ✅&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Hybrid search covers both, making it reliable across a wide range of query types.&lt;/p&gt;

&lt;h4&gt;
  
  
  When to Use It
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Enterprise search with mixed content (technical docs + marketing + internal wikis)&lt;/li&gt;
&lt;li&gt;E-commerce (searches for product names, SKUs, specifications)&lt;/li&gt;
&lt;li&gt;Regulatory/compliance (exact citations matter)&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Real-World Example
&lt;/h4&gt;

&lt;p&gt;An internal company search tool that needs to handle both &lt;em&gt;“documents about our machine learning strategy”&lt;/em&gt; (conceptual) and &lt;em&gt;“the Q3–2025 ML roadmap deck”&lt;/em&gt; (exact). Hybrid search handles both gracefully in a single pipeline.&lt;/p&gt;

&lt;h3&gt;
  
  
  Type 4: Query Decomposition RAG
&lt;/h3&gt;

&lt;h4&gt;
  
  
  What It Is
&lt;/h4&gt;

&lt;p&gt;A RAG approach that breaks complex, multi-part questions into smaller, focused sub-queries — retrieves for each one separately — then synthesizes everything into a complete answer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pipeline:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffklw9162ba0cg9mfvb7v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffklw9162ba0cg9mfvb7v.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;How it works:&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;The complex question is sent to an LLM with instructions to decompose it&lt;/li&gt;
&lt;li&gt;The LLM identifies and generates atomic sub-questions&lt;/li&gt;
&lt;li&gt;Documents are retrieved in parallel for each sub-question&lt;/li&gt;
&lt;li&gt;All retrieved context is combined and passed to the LLM&lt;/li&gt;
&lt;li&gt;A comprehensive, synthesized answer is generated&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Why It Works
&lt;/h4&gt;

&lt;p&gt;LLMs struggle when a single retrieval pass has to serve multiple information needs at once. A complex question like &lt;em&gt;“Compare Q3 2025 revenue to Q3 2024 and explain the growth drivers”&lt;/em&gt; is actually three separate questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What was Q3 2025 revenue?&lt;/li&gt;
&lt;li&gt;What was Q3 2024 revenue?&lt;/li&gt;
&lt;li&gt;What drove the growth?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Decomposition makes each information need explicit, so retrieval is precise for each one.&lt;/p&gt;

&lt;h4&gt;
  
  
  When to Use It
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Complex analytical questions&lt;/li&gt;
&lt;li&gt;Comparative queries (X vs. Y, before vs. after)&lt;/li&gt;
&lt;li&gt;Multi-step reasoning tasks&lt;/li&gt;
&lt;li&gt;Research and investigation workflows&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Real-World Example
&lt;/h4&gt;

&lt;p&gt;A business intelligence assistant answering executive questions like: &lt;em&gt;“What were our top 3 products by revenue last quarter, how do they compare to the previous year, and what are the emerging trends in each category?”&lt;/em&gt; Without decomposition, the retriever grabs random snippets. With decomposition, each part gets its own precise retrieval pass.&lt;/p&gt;

&lt;h3&gt;
  
  
  Type 5: Step-Back Prompting RAG
&lt;/h3&gt;

&lt;h4&gt;
  
  
  What It Is
&lt;/h4&gt;

&lt;p&gt;A RAG technique that first answers a broader, more general version of the user’s question, then retrieves for both the general and specific versions — giving the LLM both the “why” and the “what.”&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pipeline:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F08kd0r7e3zskh9osf16s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F08kd0r7e3zskh9osf16s.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;How it works:&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;User asks a specific question (e.g., &lt;em&gt;“Why did Q4 2024 sales in the Northeast region drop?”&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;The system generates a step-back question: &lt;em&gt;“What factors generally affect regional sales performance?”&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Retrieval runs for &lt;strong&gt;both&lt;/strong&gt; the original and the step-back question&lt;/li&gt;
&lt;li&gt;General context provides conceptual grounding; specific context provides the data&lt;/li&gt;
&lt;li&gt;The LLM generates an answer that’s informed by both&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Why It Works
&lt;/h4&gt;

&lt;p&gt;Sometimes a specific question is too narrow — the retriever finds the data but the LLM lacks the conceptual framework to interpret it correctly. Step-back prompting solves this by giving the model both &lt;strong&gt;principles&lt;/strong&gt; (from the general question) and &lt;strong&gt;specifics&lt;/strong&gt; (from the original question), leading to better-reasoned answers.&lt;/p&gt;

&lt;h4&gt;
  
  
  When to Use It
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Root cause analysis (“Why did X happen?”)&lt;/li&gt;
&lt;li&gt;“Why” questions that need both principles and specifics&lt;/li&gt;
&lt;li&gt;Educational and explanatory applications&lt;/li&gt;
&lt;li&gt;Troubleshooting systems&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Real-World Example
&lt;/h4&gt;

&lt;p&gt;A technical support system answering: &lt;em&gt;“Why is my API request failing with error 429?”&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Step-back question: &lt;em&gt;“What causes rate limiting errors in APIs?”&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Combined retrieval finds both the rate limit policy AND the user’s specific usage pattern&lt;/li&gt;
&lt;li&gt;Answer: &lt;em&gt;“You hit the 1,000 req/hour limit. Your account made 1,247 requests in the last hour. Consider implementing exponential backoff.”&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without the step-back, the answer might just quote a policy number with no explanation of why it applies.&lt;/p&gt;

&lt;h3&gt;
  
  
  Type 6: HyDE (Hypothetical Document Embeddings) RAG
&lt;/h3&gt;

&lt;h4&gt;
  
  
  What It Is
&lt;/h4&gt;

&lt;p&gt;Instead of searching with the raw user query, HyDE first generates a hypothetical ideal answer and uses &lt;em&gt;that&lt;/em&gt; to search the knowledge base — dramatically improving retrieval accuracy for vague or conversational queries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pipeline:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq33cftn8j2ruy1wfs1fx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq33cftn8j2ruy1wfs1fx.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;How it works:&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;User asks: &lt;em&gt;“What is the company’s remote work policy?”&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;The LLM generates a hypothetical answer: &lt;em&gt;“The company allows employees to work remotely 3 days per week, requires in-office presence on Tuesdays and Thursdays…”&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;This hypothetical answer is embedded as a vector&lt;/li&gt;
&lt;li&gt;The knowledge base is searched for documents similar to the hypothetical answer&lt;/li&gt;
&lt;li&gt;The &lt;em&gt;real&lt;/em&gt; retrieved documents are used to generate the actual, accurate answer&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Why It Works
&lt;/h4&gt;

&lt;p&gt;Queries and documents live in different “spaces” in an embedding model. Queries are short, casual, and vague. Documents are long, formal, and specific. Searching query-to-document has a natural mismatch.&lt;/p&gt;

&lt;p&gt;HyDE bridges this gap: by generating a document-like text from the query, you’re searching in &lt;strong&gt;document space&lt;/strong&gt;  — and finding much closer matches.&lt;/p&gt;

&lt;h4&gt;
  
  
  When to Use It
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Open-ended questions where query phrasing doesn’t match document phrasing&lt;/li&gt;
&lt;li&gt;Conversational interfaces with casual language&lt;/li&gt;
&lt;li&gt;Cross-lingual search (generate hypothesis in the target language)&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Real-World Example
&lt;/h4&gt;

&lt;p&gt;An HR chatbot where an employee asks: &lt;em&gt;“Can I work from the beach?”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The actual policy document says: &lt;em&gt;“Remote Work Policy: Employees may work from any location within their country of employment…”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Standard search fails because “work from the beach” doesn’t match “remote work policy.” HyDE generates a hypothetical policy-style answer, finds the real policy, and gives the correct response.&lt;/p&gt;

&lt;h3&gt;
  
  
  Type 7: Agentic RAG
&lt;/h3&gt;

&lt;h4&gt;
  
  
  What It Is
&lt;/h4&gt;

&lt;p&gt;RAG where the LLM is in control of the retrieval loop. Instead of a fixed one-shot search, the model decides &lt;em&gt;when&lt;/em&gt; to search, &lt;em&gt;what&lt;/em&gt; to search for, and &lt;em&gt;whether it has enough information&lt;/em&gt; to answer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pipeline:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbwoffxddxdve0esqdcov.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbwoffxddxdve0esqdcov.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;How it works:&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;The agent receives the user’s question&lt;/li&gt;
&lt;li&gt;It evaluates: &lt;em&gt;“Do I have enough context to answer this?”&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;If not, it decides: &lt;em&gt;“What should I search for?”&lt;/em&gt; and retrieves&lt;/li&gt;
&lt;li&gt;It reviews what it found and decides whether to search again or proceed&lt;/li&gt;
&lt;li&gt;This loop repeats until the agent is satisfied or hits a max iteration limit&lt;/li&gt;
&lt;li&gt;A final, comprehensive answer is generated&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Why It Works
&lt;/h4&gt;

&lt;p&gt;Traditional RAG is a one-shot process: search once, generate once. Agentic RAG is &lt;strong&gt;iterative and self-directed&lt;/strong&gt;. The model can refine its search based on what it finds, pull from multiple sources, recognize when it’s missing information, and stop early when the first retrieval was sufficient. This mirrors how a human researcher actually works.&lt;/p&gt;

&lt;h4&gt;
  
  
  When to Use It
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Complex research questions requiring multiple information sources&lt;/li&gt;
&lt;li&gt;Ambiguous queries that need multi-step investigation&lt;/li&gt;
&lt;li&gt;Exploratory search where the answer path isn’t clear upfront&lt;/li&gt;
&lt;li&gt;High-value decisions where accuracy is critical&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Real-World Example
&lt;/h4&gt;

&lt;p&gt;A financial analyst assistant answering: &lt;em&gt;“Should we invest in renewable energy stocks given current policy trends?”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Agent’s thought process:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Search: “renewable energy policy 2026” → Retrieves recent legislation&lt;/li&gt;
&lt;li&gt;Evaluate: “Need market data” → Search: “renewable energy stock performance”&lt;/li&gt;
&lt;li&gt;Evaluate: “Need risk factors” → Search: “renewable energy investment risks”&lt;/li&gt;
&lt;li&gt;Evaluate: “Sufficient context” → Generate comprehensive answer&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Standard RAG would have answered with just the first search result.&lt;/p&gt;

&lt;h3&gt;
  
  
  Type 8: Multi-Modal RAG
&lt;/h3&gt;

&lt;h4&gt;
  
  
  What It Is
&lt;/h4&gt;

&lt;p&gt;RAG extended beyond text to handle images, diagrams, tables, charts, and other visual content — so the system can retrieve and reason over the full richness of real-world documents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pipeline:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fco7nchjqomiqqfpp6n7q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fco7nchjqomiqqfpp6n7q.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;How it works:&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Documents are indexed along with their visual elements (charts, diagrams, photos)&lt;/li&gt;
&lt;li&gt;Multi-modal embeddings (CLIP, ImageBind) represent both text and images in a shared vector space&lt;/li&gt;
&lt;li&gt;When a user queries about a chart or diagram, the relevant image is retrieved alongside text&lt;/li&gt;
&lt;li&gt;Both text and image are passed to a multi-modal LLM (GPT-4V, Gemini)&lt;/li&gt;
&lt;li&gt;The LLM generates an answer grounded in both visual and textual context&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Why It Works
&lt;/h4&gt;

&lt;p&gt;Real-world knowledge isn’t just text. Architecture diagrams, product photos, medical scans, financial charts, code screenshots —  &lt;strong&gt;text-only RAG is blind to all of this&lt;/strong&gt;. Multi-modal embeddings allow the system to understand and retrieve visual content with the same precision as text, and multi-modal LLMs can reason over what they “see.”&lt;/p&gt;

&lt;h4&gt;
  
  
  When to Use It
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Technical documentation with diagrams and schematics&lt;/li&gt;
&lt;li&gt;E-commerce with product images&lt;/li&gt;
&lt;li&gt;Medical or scientific applications with imagery&lt;/li&gt;
&lt;li&gt;Education with visual learning materials&lt;/li&gt;
&lt;li&gt;Design and creative workflows&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Real-World Example
&lt;/h4&gt;

&lt;p&gt;An engineering documentation assistant receives the query: &lt;em&gt;“Show me the wiring diagram for the hydraulic pump system.”&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Retrieves: The PDF page with both the explanatory text AND the actual wiring diagram&lt;/li&gt;
&lt;li&gt;The multi-modal LLM can see the diagram and explain: &lt;em&gt;“The main pump connects to the reservoir through valve V-12, as shown in the upper-right quadrant of the diagram…”&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Text-only RAG would try to describe a diagram it never saw — useless for visual troubleshooting.Type 9: Corrective RAG (CRAG) — Self-Correcting Retrieval&lt;/p&gt;

&lt;h4&gt;
  
  
  What It Is
&lt;/h4&gt;

&lt;p&gt;RAG with a built-in quality control system. CRAG evaluates the retrieved documents &lt;em&gt;before&lt;/em&gt; generating an answer, and takes corrective action — including falling back to a web search — when retrieval quality is poor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pipeline:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F74w6psj2tz6uhf8f8d15.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F74w6psj2tz6uhf8f8d15.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;How it works:&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Standard retrieval pulls candidate documents&lt;/li&gt;
&lt;li&gt;A lightweight retrieval evaluator (typically T5-large) scores each document&lt;/li&gt;
&lt;li&gt;Based on confidence scores, trigger one of three actions:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Correct&lt;/strong&gt; (confidence &amp;gt; threshold): Use retrieved docs directly&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ambiguous&lt;/strong&gt; (medium confidence): Refine with web search&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Incorrect&lt;/strong&gt; (low confidence): Discard and search web instead&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Apply decompose-then-recompose to filter irrelevant parts&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Generate answer from corrected context&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Why It Works
&lt;/h4&gt;

&lt;p&gt;Standard RAG has a dangerous blind spot: it blindly trusts whatever the retriever returns. If the retriever pulls three irrelevant documents, standard RAG will confidently hallucinate based on bad context. CRAG adds &lt;strong&gt;self-awareness&lt;/strong&gt;  — the system knows when its own retrieval has failed and can correct course before it’s too late.&lt;/p&gt;

&lt;h4&gt;
  
  
  When to Use It
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;High-stakes applications where hallucination is unacceptable (medical, legal, financial)&lt;/li&gt;
&lt;li&gt;Dynamic knowledge domains where the knowledge base can become outdated&lt;/li&gt;
&lt;li&gt;Production systems that prioritize reliability over raw speed&lt;/li&gt;
&lt;li&gt;Compliance-heavy industries requiring explainable, auditable decisions&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Real-World Example
&lt;/h4&gt;

&lt;p&gt;A medical diagnosis assistant is asked: &lt;em&gt;“What are the latest treatment protocols for acute lymphoblastic leukemia in children under 5?”&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Without CRAG:&lt;/strong&gt; Retrieves general ALL treatment docs from 2023 → Generates an answer that misses new 2025 protocols → Dangerous, outdated advice&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;With CRAG:&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Retrieves 2023 docs&lt;/li&gt;
&lt;li&gt;Evaluator detects a temporal mismatch (query asks for “latest”)&lt;/li&gt;
&lt;li&gt;Triggers “Ambiguous” → Web search finds 2025 clinical guidelines&lt;/li&gt;
&lt;li&gt;Combines: general protocol + recent updates → Accurate, current answer&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Type 10: Graph-RAG — Reasoning Over Relationships
&lt;/h3&gt;

&lt;h4&gt;
  
  
  What It Is
&lt;/h4&gt;

&lt;p&gt;RAG that uses a &lt;strong&gt;knowledge graph&lt;/strong&gt; instead of (or alongside) vector embeddings. Rather than retrieving isolated document chunks, Graph-RAG traverses the &lt;em&gt;relationships&lt;/em&gt; between entities to answer questions that require connecting multiple facts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pipeline:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgj2l3vkewcri00tmdmnl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgj2l3vkewcri00tmdmnl.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;How it works:&lt;/strong&gt;
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Indexing&lt;/strong&gt; : Extract entities and relationships from documents → Build knowledge graph&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Community detection&lt;/strong&gt; : Use Leiden algorithm to identify hierarchical communities&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Summarization&lt;/strong&gt; : Generate summaries at each community level&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Query&lt;/strong&gt; : Extract entities from user question&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Traversal&lt;/strong&gt; : Navigate graph structure to find connected information&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Synthesis&lt;/strong&gt; : LLM generates answer from graph-structured context&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Why It Works
&lt;/h4&gt;

&lt;p&gt;Vector embeddings excel at semantic similarity but are &lt;strong&gt;blind to relationships&lt;/strong&gt;. When asked &lt;em&gt;“How did COVID-19 impact supply chains in the semiconductor industry?”&lt;/em&gt;, vector search retrieves documents about COVID, semiconductors, and supply chains — but misses the &lt;em&gt;connections&lt;/em&gt; between them. Graph-RAG encodes the entire chain: COVID → factory closures → chip shortage → auto industry, enabling true multi-hop reasoning. industry)&lt;/p&gt;

&lt;h4&gt;
  
  
  When to Use It
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Multi-hop questions that require connecting facts across documents&lt;/li&gt;
&lt;li&gt;Relationship-heavy domains (financial networks, biological pathways, social graphs)&lt;/li&gt;
&lt;li&gt;Enterprise knowledge management with interconnected systems&lt;/li&gt;
&lt;li&gt;Compliance and regulation (tracing policy impacts across departments)&lt;/li&gt;
&lt;li&gt;Legal research (case law precedents and citation chains)&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Real-World Example
&lt;/h4&gt;

&lt;p&gt;A pharmaceutical research assistant is asked: &lt;em&gt;“Which drugs targeting protein X have shown efficacy in disease Y, and are any currently in Phase 3 trials?”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Vector RAG would retrieve separate documents about the drug, the protein, and the disease. Graph-RAG traverses the relationship chain — drug → targets → protein → implicated in → disease → trial status — and surfaces the exact answer in one connected pass.&lt;/p&gt;

&lt;h3&gt;
  
  
  Type 11: Adaptive RAG — Dynamic Complexity Routing
&lt;/h3&gt;

&lt;h3&gt;
  
  
  What It Is
&lt;/h3&gt;

&lt;p&gt;RAG that &lt;strong&gt;automatically selects the right retrieval strategy&lt;/strong&gt; based on the complexity of each query — routing simple questions to fast paths and complex questions to deeper pipelines, instead of applying the same approach to everything.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pipeline:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fltv2zc8bru699shzojq8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fltv2zc8bru699shzojq8.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  How It Works
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;A query arrives&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;classifier model&lt;/strong&gt; analyzes the query and assigns a complexity level&lt;/li&gt;
&lt;li&gt;The query is routed to the appropriate pipeline:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Simple (single-hop):&lt;/strong&gt; Answer directly from LLM knowledge — no retrieval needed&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Medium (factual):&lt;/strong&gt; Standard vector RAG — one retrieval pass&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Complex (multi-hop):&lt;/strong&gt; Advanced pipeline — agentic, graph, or multi-step RAG&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;The selected pipeline executes and generates the answer&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Why It Works
&lt;/h4&gt;

&lt;p&gt;Not all queries need deep retrieval. In production systems, query complexity typically breaks down as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;40–50%:&lt;/strong&gt; Simple (answerable from model knowledge)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;30–40%:&lt;/strong&gt; Medium (needs single-hop retrieval)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;10–20%:&lt;/strong&gt; Complex (needs multi-hop reasoning)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Applying heavy retrieval to every query wastes compute, adds latency, and increases cost by 3–10x unnecessarily. Adaptive RAG &lt;strong&gt;matches compute to complexity&lt;/strong&gt;  — fast when possible, thorough when required.&lt;/p&gt;

&lt;h4&gt;
  
  
  When to Use It
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;High-volume production systems where latency and cost matter&lt;/li&gt;
&lt;li&gt;Mixed-use assistants that handle both casual and deep analytical queries&lt;/li&gt;
&lt;li&gt;Systems with variable query types (customer support + research + reporting)&lt;/li&gt;
&lt;li&gt;Any application where speed and accuracy must both be optimized&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Real-World Example
&lt;/h4&gt;

&lt;p&gt;A company-wide AI assistant handles three queries in sequence:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;“What does RAG stand for?”&lt;/em&gt; → &lt;strong&gt;Simple path&lt;/strong&gt; → LLM answers directly from training knowledge. Zero retrieval cost.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;“What was our company revenue in Q3 2025?”&lt;/em&gt; → &lt;strong&gt;Medium path&lt;/strong&gt; → Single vector search retrieves the financial report. Fast and precise.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;“How did our Q3 2025 revenue compare to competitors, and what market trends explain the difference?”&lt;/em&gt; → &lt;strong&gt;Complex path&lt;/strong&gt; → Agentic multi-step retrieval across internal data, market reports, and news sources.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All three queries get the right level of effort — no more, no less.&lt;/p&gt;

&lt;h3&gt;
  
  
  Choosing the Right RAG Architecture
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7mr0khfrbi1ehs749zzr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7mr0khfrbi1ehs749zzr.png" width="714" height="514"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What’s your biggest RAG challenge?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Are you struggling with retrieval quality, dealing with multi-modal content, or trying to scale to millions of documents? Drop a comment — I read and respond to every one.&lt;/p&gt;

&lt;p&gt;If this guide helped you, share it with your team. RAG is becoming table stakes for AI applications, and the teams that master it early have a massive competitive advantage.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This guide is based on the latest RAG research and production patterns as of May 2026.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;To stay informed on the latest technical insights and tutorials, connect with me on &lt;a href="https://medium.com/@issackpaul95" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/minoltan/" rel="noopener noreferrer"&gt;LinkedIn,&lt;/a&gt; and &lt;a href="https://dev.to/minoltan"&gt;Dev.to&lt;/a&gt;. For professional inquiries or technical discussions, please contact me via &lt;a href="http://issackpaul95@gmail.com/" rel="noopener noreferrer"&gt;email&lt;/a&gt;. I welcome the opportunity to engage with fellow professionals and address any questions you may have.&lt;/p&gt;

</description>
      <category>llm</category>
      <category>rags</category>
      <category>agenticrag</category>
      <category>ragtype</category>
    </item>
    <item>
      <title>Why Companies Will Stop Asking “Do You Know AI?” and Start Asking This Instead</title>
      <dc:creator>Minoltan Issack</dc:creator>
      <pubDate>Sun, 10 May 2026 09:28:46 +0000</pubDate>
      <link>https://dev.to/minoltan/why-companies-will-stop-asking-do-you-know-ai-and-start-asking-this-instead-327k</link>
      <guid>https://dev.to/minoltan/why-companies-will-stop-asking-do-you-know-ai-and-start-asking-this-instead-327k</guid>
      <description>&lt;p&gt;In just six months, the standard interview question won’t be “Can you use ChatGPT?” or “Do you know AI?” Instead, senior architects and hiring managers will look you in the eye and ask: “Can you architect an integrated system using MCP, RAG, and Agents?”&lt;/p&gt;

&lt;p&gt;The IT job market is shifting from “AI users” to “AI architects.” If you want to stay relevant, you need to understand how these three pillars fit together. Let’s break it down through a simple story.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The Bridge Builder: Model Context Protocol (MCP)
&lt;/h2&gt;

&lt;p&gt;Imagine you have a brilliant consultant (the AI) sitting in a locked room. He’s smart, but he can’t see your emails, he can’t check your local files, and he certainly can’t see your Slack messages.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8epb7somqi6uzioqu2ap.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8epb7somqi6uzioqu2ap.png" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;MCP is the “Universal Connector.” It is an open standard that allows AI models (like Claude) to securely sit on your “Host” (your computer or VS Code) and talk to “Servers” (your local files, Google Drive, or Slack).&lt;/p&gt;

&lt;p&gt;The Architecture:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Host: Where you give input (e.g., Claude Desktop, VS Code).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Client: The middleman inside the host that manages connections.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Server: The program that actually “knows” how to fetch data from a specific tool (e.g., a Google Drive Server).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. The Expert Librarian: Retrieval-Augmented Generation (RAG)
&lt;/h2&gt;

&lt;p&gt;Now that our consultant has a bridge to the outside world, he needs to be an expert on your specific business. If an employee asks, “How many vacation days do I have left?” the AI can’t guess. It needs to look at the company handbook.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkt6iglebzffhqyfftvep.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkt6iglebzffhqyfftvep.png" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;RAG is the “Librarian.” Instead of retraining a massive AI model (which is expensive), you give it a specific document. The AI “retrieves” the exact paragraph needed and “generates” an answer based only on that trusted data.&lt;/p&gt;

&lt;p&gt;The Architecture:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Ingestion: Your PDF/Doc is broken into small “chunks.”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Embedding: These chunks are turned into numbers (vectors) so the machine understands them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Retrieval: When you ask a question, the system finds the most relevant “chunk” and gives it to the AI.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. The Decision Maker: AI Agents
&lt;/h2&gt;

&lt;p&gt;A bridge (MCP) and a library (RAG) are great, but someone needs to do the work. Imagine you say: “Prepare a sales report from my local files and email it to the CEO.”&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzif94rrxolndh7vbgtr5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzif94rrxolndh7vbgtr5.png" alt=" " width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The AI Agent is the “Manager.” It doesn’t just answer, it acts. It thinks: “First, I need to use the MCP bridge to get the data. Then, I’ll use RAG to understand the company’s reporting style. Finally, I’ll trigger the email tool to send it.”&lt;/p&gt;

&lt;p&gt;The Architecture:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Perception: Receives the user’s goal.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Brain (LLM): Decides which tools (MCP/RAG) to call and in what order.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Action: Executes the tasks end-to-end.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Big Picture: How They Fit Together
&lt;/h2&gt;

&lt;p&gt;The future isn’t about choosing one, it’s about the Unified AI System.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F03cl0tv2ngh9vo9xzx9l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F03cl0tv2ngh9vo9xzx9l.png" alt=" " width="800" height="76"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;MCP provides the Connection to your world.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;RAG provides the Knowledge from your data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Agents provide the Execution to get things done.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;The era of simply “chatting” with AI is ending. We are entering the era of building systems that work for us. Whether you are a developer or a business lead, understanding this hierarchy — Connect (MCP), Inform (RAG), and Execute (Agents) — is the key to the next decade of your career.&lt;/p&gt;




&lt;p&gt;To stay informed on the latest technical insights and tutorials, connect with me on &lt;a href="https://medium.com/@issackpaul95" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/minoltan/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; and &lt;a href="https://dev.to/minoltan"&gt;Dev.to&lt;/a&gt;. For professional inquiries or technical discussions, please contact me via &lt;a href="http://issackpaul95@gmail.com/" rel="noopener noreferrer"&gt;email&lt;/a&gt;. I welcome the opportunity to engage with fellow professionals and address any questions you may have.&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>rag</category>
      <category>agents</category>
      <category>ai</category>
    </item>
    <item>
      <title>Understanding RAG: The Architecture That’s Revolutionizing AI Responses</title>
      <dc:creator>Minoltan Issack</dc:creator>
      <pubDate>Sun, 10 May 2026 08:51:14 +0000</pubDate>
      <link>https://dev.to/minoltan/understanding-rag-the-architecture-thats-revolutionizing-ai-responses-2330</link>
      <guid>https://dev.to/minoltan/understanding-rag-the-architecture-thats-revolutionizing-ai-responses-2330</guid>
      <description>&lt;p&gt;&lt;em&gt;How Retrieval-Augmented Generation Combines the Best of Search and AI&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Imagine you have a super-smart friend who has read every book in the world but hasn’t left the house in three years. If you ask him about a movie that came out last week, he might make up a story just to sound helpful — we call this a “hallucination.”&lt;/p&gt;

&lt;p&gt;This happens because traditional AI has a &lt;strong&gt;knowledge cutoff&lt;/strong&gt; ; it only knows what it learned during its original training.&lt;/p&gt;

&lt;p&gt;Now, imagine giving that same friend a high-speed internet connection and a library card. Before he answers your question, he quickly looks up the latest facts, finds the right page, and then explains it to you. That is &lt;strong&gt;Retrieval-Augmented Generation (RAG)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of guessing from memory, the AI “retrieves” fresh data from your documents or the web and “augments” its answer with real, verified facts. It turns a guessing game into an open-book exam, giving you answers you can actually trust.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7jds894j2t3vhiswc8ea.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7jds894j2t3vhiswc8ea.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is RAG?
&lt;/h3&gt;

&lt;p&gt;Retrieval-Augmented Generation is a technique that enhances Large Language Models by connecting them to external knowledge sources. Instead of relying solely on the information learned during training, RAG systems can retrieve relevant information from external databases, documents, or APIs in real-time and use that context to generate more accurate responses.&lt;/p&gt;

&lt;p&gt;Think of it this way: A traditional LLM is like a brilliant professor who memorized everything years ago but hasn’t read any new research. A RAG system is like that same professor, but now they can quickly consult a library of the latest papers before answering your question.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Do We Need RAG?
&lt;/h3&gt;

&lt;p&gt;Traditional LLMs face several critical challenges:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fci9urt1e41080n0uciw4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fci9urt1e41080n0uciw4.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;RAG solves these problems by grounding AI responses in retrievable, verifiable external data.&lt;/p&gt;

&lt;h3&gt;
  
  
  The RAG Architecture: A Deep Dive
&lt;/h3&gt;

&lt;p&gt;The RAG architecture consists of three main phases: &lt;strong&gt;Data Ingestion&lt;/strong&gt; , &lt;strong&gt;Query Processing&lt;/strong&gt; , and &lt;strong&gt;Response Generation&lt;/strong&gt;. Let’s break down each component.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8z4ckaeb7z6ldja3jg66.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8z4ckaeb7z6ldja3jg66.png" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Phase 1: Data Ingestion Pipeline (Offline Process)
&lt;/h3&gt;

&lt;p&gt;This happens before any user queries arrive — it’s the preparation phase.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkpq67ocoydedixl0uuqf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkpq67ocoydedixl0uuqf.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Step 1: Data Collection&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The system ingests data from various sources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PDF documents, Word files, Web pages, APIs, Databases, Internal documentation, Research papers&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Step 2: Text Chunking
&lt;/h4&gt;

&lt;p&gt;Large documents are split into smaller, manageable chunks (typically 200–1000 tokens). Why? Because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It’s more efficient to search through smaller pieces&lt;/li&gt;
&lt;li&gt;LLMs have context window limits&lt;/li&gt;
&lt;li&gt;Smaller chunks provide more precise retrieval&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, a 50-page manual might be split into 200 chunks, each representing a specific section or concept.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 3: Embedding Generation
&lt;/h4&gt;

&lt;p&gt;This is where the magic happens. An &lt;strong&gt;embedding model&lt;/strong&gt; (like OpenAI’s text-embedding-3, Cohere’s embeddings, or open-source models like Sentence-BERT) converts each text chunk into a &lt;strong&gt;vector&lt;/strong&gt;  — essentially a list of numbers (typically 384 to 1536 dimensions).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What are embeddings?&lt;/strong&gt; Embeddings are numerical representations that capture the semantic meaning of text. Similar concepts have similar vector representations, even if they use different words.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For example:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“The customer wants a refund”&lt;/li&gt;
&lt;li&gt;“User requesting money back”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These two sentences would have very similar embedding vectors because they express the same concept, even though they use different words.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 4: Vector Storage
&lt;/h4&gt;

&lt;p&gt;These embeddings are stored in a &lt;strong&gt;vector database&lt;/strong&gt; (like Pinecone, Weaviate, ChromaDB, or FAISS) that’s optimized for fast similarity searches. The database indexes these vectors so it can quickly find the most similar ones when queried.&lt;/p&gt;

&lt;h3&gt;
  
  
  Phase 2: Query Processing (Runtime)
&lt;/h3&gt;

&lt;p&gt;This happens when a user asks a question.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5vsunt7wftvbg610uzbe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5vsunt7wftvbg610uzbe.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 1: User Query
&lt;/h4&gt;

&lt;p&gt;A user submits a question: &lt;em&gt;“What is your refund policy for defective products?”&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 2: Query Embedding
&lt;/h4&gt;

&lt;p&gt;The exact same embedding model used during ingestion now converts the user’s query into a vector with the same dimensions.&lt;/p&gt;

&lt;p&gt;This consistency is crucial — you must use the same embedding model for both ingestion and queries to ensure the vector spaces align.&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 3: Similarity Search
&lt;/h4&gt;

&lt;p&gt;The system performs a &lt;strong&gt;semantic similarity search&lt;/strong&gt; in the vector database. It compares the query vector against all stored vectors using mathematical distance metrics like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cosine similarity&lt;/strong&gt; : Measures the angle between vectors&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Euclidean distance&lt;/strong&gt; : Measures the straight-line distance&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dot product&lt;/strong&gt; : Measures vector alignment&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The database returns the top K most similar chunks (typically 3–10 chunks).&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 4: Context Retrieval
&lt;/h4&gt;

&lt;p&gt;The system retrieves the actual text content associated with the top matching vectors. These become the “retrieved context” that will augment the prompt.&lt;/p&gt;

&lt;h3&gt;
  
  
  Phase 3: Response Generation
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7w56zj3jhx11hx14oazc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7w56zj3jhx11hx14oazc.png" width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Step 1: Prompt Augmentation
&lt;/h4&gt;

&lt;p&gt;The system constructs an enhanced prompt that combines:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The retrieved context (relevant chunks from the knowledge base)&lt;/li&gt;
&lt;li&gt;The user’s original query&lt;/li&gt;
&lt;li&gt;Instructions for the LLM&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Example augmented prompt:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Context:
[Chunk 1]: "Our refund policy states that defective products can be returned within 30 days..."
[Chunk 2]: "To process a refund for defective items, customers must provide proof of purchase..."
[Chunk 3]: "Shipping costs for defective product returns are covered by the company..."

User Question: What is your refund policy for defective products?

Instructions: Answer the user's question based solely on the provided context. If the context doesn't contain the information, say so.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Step 2: LLM Generation
&lt;/h4&gt;

&lt;p&gt;The augmented prompt is sent to an LLM (GPT-4, Claude, Llama, Gemini, etc.). The model generates a response that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Is grounded in the retrieved facts&lt;/li&gt;
&lt;li&gt;Directly answers the user’s question&lt;/li&gt;
&lt;li&gt;Uses natural, conversational language&lt;/li&gt;
&lt;li&gt;Can cite specific sources&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Step 3: Response Delivery
&lt;/h4&gt;

&lt;p&gt;The final response is returned to the user, often with source citations showing which documents the information came from.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Components Explained
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Embedding Models
&lt;/h4&gt;

&lt;p&gt;These are specialized neural networks trained to convert text into meaningful numerical representations. Popular options include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;OpenAI Embeddings&lt;/strong&gt; : text-embedding-3-small, text-embedding-3-large&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cohere Embeddings&lt;/strong&gt; : embed-english-v3.0&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open Source&lt;/strong&gt; : Sentence-Transformers, BGE, E5&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The quality of your embeddings directly impacts retrieval accuracy.&lt;/p&gt;

&lt;h4&gt;
  
  
  Vector Databases
&lt;/h4&gt;

&lt;p&gt;Specialized databases optimized for storing and searching high-dimensional vectors:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pinecone&lt;/strong&gt; : Managed, cloud-native&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Weaviate&lt;/strong&gt; : Open-source, feature-rich&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ChromaDB&lt;/strong&gt; : Developer-friendly, embeddable&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FAISS&lt;/strong&gt; : Facebook’s library, ultra-fast&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Milvus&lt;/strong&gt; : Scalable, enterprise-grade&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These databases use algorithms like HNSW (Hierarchical Navigable Small World) or IVF (Inverted File Index) for approximate nearest neighbor search.&lt;/p&gt;

&lt;h4&gt;
  
  
  Chunking Strategies
&lt;/h4&gt;

&lt;p&gt;How you split your documents matters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fixed-size chunking&lt;/strong&gt; : Split every N tokens&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sentence-based&lt;/strong&gt; : Split at sentence boundaries&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Semantic chunking&lt;/strong&gt; : Split based on topic changes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Overlapping chunks&lt;/strong&gt; : Include overlap to preserve context&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Best Practices for Implementing RAG
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Start with quality data&lt;/strong&gt; : Clean, well-structured documents produce better results&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Choose the right chunk size&lt;/strong&gt; : Test different sizes (256, 512, 1024 tokens)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use the same embedding model&lt;/strong&gt; : Consistency between ingestion and query is crucial&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implement monitoring&lt;/strong&gt; : Track retrieval quality and response accuracy&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add metadata filtering&lt;/strong&gt; : Filter by date, source, category before semantic search&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test different retrieval strategies&lt;/strong&gt; : Top-K, threshold-based, MMR (Maximum Marginal Relevance)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optimize for your use case&lt;/strong&gt; : Customer support needs different tuning than research applications&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Popular RAG Frameworks and Tools
&lt;/h3&gt;

&lt;p&gt;Several frameworks make RAG implementation easier:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;LangChain&lt;/strong&gt; : Popular Python/JavaScript framework with extensive RAG support&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LlamaIndex&lt;/strong&gt; : Specialized in data ingestion and indexing for RAG&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Haystack&lt;/strong&gt; : Production-ready framework from Deepset&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Semantic Kernel&lt;/strong&gt; : Microsoft’s framework for AI orchestration&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AutoGen&lt;/strong&gt; : Multi-agent framework with RAG capabilities&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Retrieval-Augmented Generation represents a fundamental shift in how we build AI applications. By combining the natural language capabilities of LLMs with the precision of information retrieval, RAG delivers responses that are accurate, current, and grounded in verifiable sources.&lt;/p&gt;

&lt;p&gt;Whether you’re building a customer support chatbot, a research assistant, or an internal knowledge management system, understanding RAG architecture is essential. The pattern is elegant: convert everything to vectors, search for similar vectors, and augment your prompts with retrieved context.&lt;/p&gt;

&lt;p&gt;As AI continues to integrate into more applications, RAG will likely become the standard approach for any system that needs to provide factual, up-to-date, and domain-specific information. The architecture is proven, the tools are mature, and the results speak for themselves.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The question isn’t whether to use RAG — it’s how to implement it most effectively for your specific use case.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To stay informed on the latest technical insights and tutorials, connect with me on &lt;a href="https://medium.com/@issackpaul95" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/minoltan/" rel="noopener noreferrer"&gt;LinkedIn,&lt;/a&gt; and &lt;a href="https://dev.to/minoltan"&gt;Dev.to&lt;/a&gt;. For professional inquiries or technical discussions, please contact me via &lt;a href="http://issackpaul95@gmail.com/" rel="noopener noreferrer"&gt;email&lt;/a&gt;. I welcome the opportunity to engage with fellow professionals and address any questions you may have.&lt;/p&gt;

</description>
      <category>rags</category>
      <category>llm</category>
      <category>retrievalaugmentedge</category>
      <category>vectordatabase</category>
    </item>
    <item>
      <title>AWS Cloud Practitioner Questions | Security &amp; Encryption</title>
      <dc:creator>Minoltan Issack</dc:creator>
      <pubDate>Tue, 14 Apr 2026 11:26:56 +0000</pubDate>
      <link>https://dev.to/minoltan/aws-cloud-practitioner-questions-security-encryption-311n</link>
      <guid>https://dev.to/minoltan/aws-cloud-practitioner-questions-security-encryption-311n</guid>
      <description>&lt;h2&gt;
  
  
  Question 1:
&lt;/h2&gt;

&lt;p&gt;To enable In-flight Encryption (In-Transit Encryption), we need to have ........................&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgam2lpdjd3uv5t4awpby.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgam2lpdjd3uv5t4awpby.png" alt=" " width="777" height="205"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2)&amp;nbsp;:&lt;/strong&gt; The correct answer, "an HTTPS endpoint with an SSL certificate," is right because HTTPS encrypts data in transit, ensuring security. HTTPS cannot be used without an SSL certificate, which verifies the server's identity. Other options are incorrect if they lack encryption or proper security measures. SSL certificates are essential for establishing trust and secure communication. This ensures data integrity and confidentiality during transmission.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 2:
&lt;/h2&gt;

&lt;p&gt;Server-Side Encryption means that the data is sent encrypted to the server.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fswjgjfp6pbam1012bz4u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fswjgjfp6pbam1012bz4u.png" alt=" " width="781" height="139"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2)&amp;nbsp;:&lt;/strong&gt; Server-Side Encryption means the data is encrypted by the server after it's received, not while it's being sent. The statement is false because encryption during transmission is handled by protocols like TLS, known as in-flight encryption. Server-Side Encryption specifically refers to encrypting stored data, ensuring it is protected at rest. Other options that suggest encryption during transfer would refer to client-side or in-transit encryption, not server-side. This distinction helps ensure data security both in transit and at rest.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 3:
&lt;/h2&gt;

&lt;p&gt;In Server-Side Encryption, where do the encryption and decryption happen?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg16jzbkk16aoyakf12ms.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg16jzbkk16aoyakf12ms.png" alt=" " width="780" height="274"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (1):&lt;/strong&gt; The correct answer, "Both Encryption and Decryption happen on the server," is right because server-side encryption manages encryption keys and processes on the server side, meaning the server handles both tasks. The other options are incorrect because they involve the client performing encryption or decryption, which isn't the case with server-side encryption. In server-side encryption, the user doesn't have access to the keys, so they cannot encrypt or decrypt data themselves. This setup ensures secure handling of data by the server.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 4:
&lt;/h2&gt;

&lt;p&gt;In Client-Side Encryption, the server must know our encryption scheme before we can upload the data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fax1wtsyejsayqggvj754.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fax1wtsyejsayqggvj754.png" alt=" " width="785" height="144"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (1):&lt;/strong&gt; In client-side encryption, the server acts as a "blind" storage provider and does not need to know the encryption scheme or keys to store the data. The data is fully encrypted before it leaves your device, ensuring the server only manages opaque blobs of information without any insight into the underlying cryptographic methods.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 5:
&lt;/h2&gt;

&lt;p&gt;You need to create KMS Keys in AWS KMS before you are able to use the encryption features for EBS, S3, RDS&amp;nbsp;…&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffrmdrcjli2mpj85mgupu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffrmdrcjli2mpj85mgupu.png" alt=" " width="785" height="144"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2)&amp;nbsp;:&lt;/strong&gt; AWS provides managed keys that can be used for encryption without creating your own KMS keys. You only need to create custom keys if you have specific security requirements. The other options are incorrect because creating your own keys is optional, not mandatory, to enable encryption for services like EBS, S3, or RDS. AWS Managed Keys simplify the process and are ready to use. Therefore, creating KMS keys in advance is not a required step.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 6:
&lt;/h2&gt;

&lt;p&gt;AWS KMS supports both symmetric and asymmetric KMS keys.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6n8xmuofiezhe27cqmzt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6n8xmuofiezhe27cqmzt.png" alt=" " width="785" height="144"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (1):&lt;/strong&gt; AWS KMS supports both symmetric and asymmetric keys. Symmetric keys are used for encryption and decryption with a single key. Asymmetric keys involve a key pair (RSA or ECC) used for encryption/decryption or signing/verification. The other option, "False," is incorrect because KMS indeed supports both types of keys. This allows flexible cryptographic operations for different security needs.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 7:
&lt;/h2&gt;

&lt;p&gt;When you enable Automatic Rotation on your KMS Key, the backing key is rotated every&amp;nbsp;……………&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F09s4x0v2yf65cld5xvc5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F09s4x0v2yf65cld5xvc5.png" alt=" " width="781" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2)&amp;nbsp;:&lt;/strong&gt; Automatic Rotation is enabled on a KMS key, it rotates every 12 months by default. The "90 days" option is incorrect because AWS does not rotate keys that frequently by default. The other options, "2 years" and "3 years," are incorrect because they exceed the standard rotation period set by AWS, which is one year. This rotation frequency balances security and operational consistency.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 8:
&lt;/h2&gt;

&lt;p&gt;You have an AMI that has an encrypted EBS snapshot using KMS CMK. You want to share this AMI with another AWS account. You have shared the AMI with the desired AWS account, but the other AWS account still can't use it. How would you solve this problem?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fru0q9zrjqquc5ifq4mxl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fru0q9zrjqquc5ifq4mxl.png" alt=" " width="788" height="209"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2)&amp;nbsp;:&lt;/strong&gt; KMS keys are customer-managed or AWS-managed, and sharing the AMI alone does not grant access to the encryption key. The other accounts must also have permission to use the CMK to access the encrypted snapshot. The first option, "logout and login," is incorrect because credential refresh doesn't resolve key sharing issues. The third option, "you can't share an encrypted AMI," is incorrect because encrypted AMIs can be shared if the CMK permissions are properly configured. Sharing the CMK ensures the other account can decrypt and use the AMI.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 9:
&lt;/h2&gt;

&lt;p&gt;You have created a Customer-managed CMK in KMS that you use to encrypt both S3 buckets and EBS snapshots. Your company policy mandates that your encryption keys be rotated every 6 months. What should you do?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnblsm8xx98gztqp9n0ui.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnblsm8xx98gztqp9n0ui.png" alt=" " width="786" height="252"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (1):&lt;/strong&gt; AWS KMS supports automatic key rotation every year. However, since your policy requires rotation every 6 months, you need to manually rotate the key or create a new one, as automatic rotation is annual. Using AWS Managed Keys isn't suitable because their rotation is automatic but on a quarterly basis, and they don't allow custom retention periods. Manually creating and rotating keys gives control over the exact 6-month schedule. The other options do not meet the specific 6-month rotation requirement.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 10:
&lt;/h2&gt;

&lt;p&gt;What should you use to control access to your KMS CMKs?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F15pokonmbyycf12nuzf9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F15pokonmbyycf12nuzf9.png" alt=" " width="786" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (1)&amp;nbsp;:&lt;/strong&gt; They directly define and control access permissions for each CMK. "KMS IAM Policy" is incorrect because IAM policies manage permissions at the user or role level, not specific to each key. "AWS GuardDuty" is incorrect as it is a security threat detection service, not an access control tool. "KMS Access Control List (KMS ACL)" is incorrect because KMS does not support ACLs for controlling access. Key policies are the primary method for managing access to KMS CMKs.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 11:
&lt;/h2&gt;

&lt;p&gt;You have a Lambda function used to process some data in the database. You would like to give your Lambda function access to the database password. Which of the following options is the most secure?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fed6coqexssyz0vc9wq3j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fed6coqexssyz0vc9wq3j.png" alt=" " width="775" height="210"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (3):&lt;/strong&gt; It keeps the sensitive data secure while allowing the Lambda to access it securely during execution. Embedding the password in the code is insecure because it can be easily exposed if the code is accessed. Having it as plaintext environment variable is also insecure as it's visible in plain text within environment settings. Encrypting it and decrypting at runtime ensures the password remains protected at rest and only accessible in memory during execution. This approach balances security and accessibility effectively.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 12:
&lt;/h2&gt;

&lt;p&gt;You have a secret value that you use for encryption purposes, and you want to store and track the values of this secret over time. Which AWS service should you use?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk9cp1fe5cpqjyjn6twkb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk9cp1fe5cpqjyjn6twkb.png" alt=" " width="783" height="213"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2):&lt;/strong&gt; It allows secure storage of secrets with built-in version tracking, enabling you to see historical values. "AWS KMS" can rotate encryption keys but doesn't track or store different secret values over time. "Amazon S3" offers versioning and encryption but is not specifically designed for secret management or audit tracking of secret values. SSM Parameter Store provides dedicated secret management with version history, making it the best fit.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 13:
&lt;/h2&gt;

&lt;p&gt;Your user-facing website is a high-risk target for DDoS attacks and you would like to get 24/7 support in case they happen and AWS bill reimbursement for the incurred costs during the attack. What AWS service should you use?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzu0hwjz3zx5urs6clcft.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzu0hwjz3zx5urs6clcft.png" alt=" " width="774" height="277"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2):&lt;/strong&gt; It provides 24/7 support for DDoS attacks and offers cost reimbursement assistance through AWS's DDoS Response Team. "AWS WAF" helps protect web applications from common web exploits but does not offer 24/7 support or billing reimbursement. "AWS Shield" provides basic DDoS protection but lacks the dedicated support and cost reimbursement features of Shield Advanced. "AWS DDoS OpsTeam" is not a service but a support team; the appropriate service is AWS Shield Advanced.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 14:
&lt;/h2&gt;

&lt;p&gt;You would like to externally maintain the configuration values of your main database, to be picked up at runtime by your application. What's the best place to store them to maintain control and version history?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ydkoku6rdafmxqb5x64.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ydkoku6rdafmxqb5x64.png" alt=" " width="774" height="277"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (4):&lt;/strong&gt; It securely stores configuration values with version control, making it easy to update and track changes at runtime. "Amazon DynamoDB" is a NoSQL database suitable for application data but isn't mainly designed for configuration management or versioning. "Amazon S3" can store files and version data, but it's less ideal for sensitive configuration values due to lack of built-in secret management features. "Amazon EBS" provides block storage for EC2 instances and is not suitable for managing or versioning configuration data externally.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 15:
&lt;/h2&gt;

&lt;p&gt;AWS GuardDuty scans the following data sources, EXCEPT&amp;nbsp;…………….&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Furo37zcyi0au05hbojxe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Furo37zcyi0au05hbojxe.png" alt=" " width="789" height="281"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (4):&lt;/strong&gt; AWS GuardDuty does not directly scan CloudWatch Logs data sources; it primarily analyzes other specific logs. "CloudTrail Logs" are monitored because they record API activity for security analysis. "VPC Flow Logs" document network traffic, which GuardDuty analyzes for suspicious activity. "DNS Logs" are also scanned since they help detect malicious domain requests. GuardDuty focuses on certain data sources, and CloudWatch Logs are not one of them.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 16:
&lt;/h2&gt;

&lt;p&gt;You have a website hosted on a fleet of EC2 instances fronted by an Application Load Balancer. What should you use to protect your website from common web application attacks (e.g., SQL Injection)?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc49xg5tdzna04ulupj8a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc49xg5tdzna04ulupj8a.png" alt=" " width="774" height="277"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2):&lt;/strong&gt; It allows you to create custom rules to block common web application attacks like SQL Injection and Cross-Site Scripting. "AWS Shield" provides protection against DDoS attacks but does not specifically target application-layer threats. "AWS Security Hub" is a centralized security management service and does not directly protect against web attacks. "AWS GuardDuty" detects malicious activity but is focused on threat detection rather than web application protection.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 17:
&lt;/h2&gt;

&lt;p&gt;You would like to analyze OS vulnerabilities from within EC2 instances. You need these analyses to occur weekly and provide you with concrete recommendations in case vulnerabilities are found. Which AWS service should you use?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzqr0hliir6t4pig876nc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzqr0hliir6t4pig876nc.png" alt=" " width="774" height="277"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (3)&amp;nbsp;:&lt;/strong&gt; It automatically analyzes EC2 instances for security vulnerabilities and provides detailed findings and recommendations. "AWS Shield" focuses on protecting against DDoS attacks and does not analyze OS vulnerabilities. "Amazon GuardDuty" detects threats and malicious activity but does not perform vulnerability assessments. "AWS Config" monitors configuration compliance but does not provide detailed vulnerability analysis or recommendations.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 18:
&lt;/h2&gt;

&lt;p&gt;What is the most suitable AWS service for storing RDS DB passwords which also provides you automatic rotation?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0j5u8tfidn59khe8euul.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0j5u8tfidn59khe8euul.png" alt=" " width="779" height="202"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (1)&amp;nbsp;:&lt;/strong&gt; It securely stores database passwords and provides automatic rotation, reducing manual management. "AWS KMS" is a key management service and does not store or rotate passwords directly. "AWS SSM Parameter Store" can store passwords but lacks built-in automatic rotation features. Secrets Manager is specifically designed for secret management and automated credential rotation.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 19:
&lt;/h2&gt;

&lt;p&gt;Which AWS service allows you to centrally manage EC2 Security Groups and AWS Shield Advanced across all AWS accounts in your AWS Organization?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffzkzmtfitcqo6lny2jfc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffzkzmtfitcqo6lny2jfc.png" alt=" " width="784" height="273"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (4):&lt;/strong&gt; It centrally manages security policies across multiple AWS accounts, including Security Groups and Shield Advanced. "AWS GuardDuty" detects security threats but does not handle centralized management of security groups or Shield. "AWS Config" monitors resource compliance, but it does not manage security policies across accounts. It tracks changes but doesn't enforce security rules centrally.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 20:
&lt;/h2&gt;

&lt;p&gt;Which AWS service helps you protect your sensitive data stored in S3 buckets?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fson9syuige9r1ygj9gfp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fson9syuige9r1ygj9gfp.png" alt=" " width="784" height="273"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer(3) :&lt;/strong&gt; It uses machine learning to identify and protect sensitive data in S3 buckets. "AWS KMS" is a key management service that encrypts data but does not identify or classify sensitive information in S3. "Amazon GuardDuty" detects security threats but doesn't specifically protect or identify sensitive data. "Amazon Shield" focuses on DDoS protection and does not manage or analyze data stored in S3.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 21:
&lt;/h2&gt;

&lt;p&gt;An online-payment company is using AWS to host its infrastructure. The frontend is created using VueJS and is hosted on an S3 bucket and the backend is developed using PHP and is hosted on EC2 instances in an Auto Scaling Group. As their customers are worldwide, they use both CloudFront and Aurora Global database to implement multi-region deployments to provide the lowest latency and provide availability, and resiliency. A new feature required which gives customers the ability to store data encrypted on the database and this data must not be disclosed even by the company admins. The data should be encrypted on the client side and stored in an encrypted format. What do you recommend to implement this?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1uat6otnx3w7aqr39ouq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1uat6otnx3w7aqr39ouq.png" alt=" " width="784" height="273"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (1)&amp;nbsp;:&lt;/strong&gt; Lambda is not designed for client-side encryption of database data. "Using Aurora Client-side Encryption and CloudHSM" is incorrect because while CloudHSM provides hardware security, it is not specifically integrated for client-side encryption in this context. "Using Lambda Client-side Encryption and CloudHSM" is incorrect because Lambda alone doesn't handle client-side encryption for databases, and CloudHSM is not tailored for this use case.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 22:
&lt;/h2&gt;

&lt;p&gt;You have an S3 bucket that is encrypted with SSE-KMS. You have been tasked to replicate the objects to a target bucket in the same AWS region but with a different KMS Key. You have configured the S3 replication, the target bucket, and the target KMS key and it is still not working. What is missing to make the S3 replication work?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffcpsost8fhnk2izbz9of.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffcpsost8fhnk2izbz9of.png" alt=" " width="785" height="291"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (3):&lt;/strong&gt; You need to configure permissions for both the source KMS key (kms:Decrypt) and the target KMS key (kms:Encrypt) so that S3 replication can access and use them properly. The other options are incorrect because replication is supported, no support ticket is needed, and the source and target keys do not have to be the same. Proper permissions are necessary for encryption and decryption during replication.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 23:
&lt;/h2&gt;

&lt;p&gt;You have generated a public certificate using LetsEncrypt and uploaded it to the ACM so you can use and attach to an Application Load Balancer that forwards traffic to EC2 instances. As this certificate is generated outside of AWS, it does not support the automatic renewal feature. How would you be notified 30 days before this certificate expires so you can manually generate a new one?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fde26snpb7heq05wz38wy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fde26snpb7heq05wz38wy.png" alt=" " width="785" height="316"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2)&amp;nbsp;:&lt;/strong&gt; allows you to receive notifications 30 days before the certificate expires. Linking ACM to a third-party provider like Let's Encrypt does not provide automated notifications from AWS. Using monthly expiration events or CloudWatch alarms won't give you the timely warning needed 30 days in advance. EventBridge is suitable for scheduled, daily checks, ensuring proactive renewal alerts.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 24:
&lt;/h2&gt;

&lt;p&gt;You have created the main Edge-Optimized API Gateway in us-west-2 AWS region. This main Edge-Optimized API Gateway forwards traffic to the second level API Gateway in ap-southeast-1. You want to secure the main API Gateway by attaching an ACM certificate to it. Which AWS region are you going to create the ACM certificate in?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fukhwsfj4379uvzq5zjqa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fukhwsfj4379uvzq5zjqa.png" alt=" " width="782" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (1)&amp;nbsp;:&lt;/strong&gt; ACM certificates for CloudFront distributions must be created in the us-east-1 region, as AWS only supports CloudFront-related certificates there. "us-west-2" is incorrect because ACM certificates in this region cannot be used directly with CloudFront or Edge-Optimized API Gateway. "ap-southeast-1" is incorrect since it's not the region for ACM certificates used with CloudFront. "Both us-east-1 and us-west-2" is incorrect because only us-east-1 supports ACM certificates for CloudFront distributions.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 25:
&lt;/h2&gt;

&lt;p&gt;You are managing an AWS Organization with multiple AWS accounts. Each account has a separate application with different resources. You want an easy way to manage Security Groups and WAF Rules across those accounts as there was a security incident the last week and you want to tighten up your resources. Which AWS service can help you to do so?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5nwt60wffonf3txrpr8k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5nwt60wffonf3txrpr8k.png" alt=" " width="782" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (4)&amp;nbsp;:&lt;/strong&gt; AWS Firewall Manager allows centralized management of security policies, such as Security Groups and WAF rules, across multiple AWS accounts in an organization. It simplifies enforcement and updates, especially after security incidents.&lt;br&gt;
Others are incorrect because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AWS GuardDuty is primarily for threat detection, not policy management.&lt;/li&gt;
&lt;li&gt;Amazon Shield provides DDoS protection but doesn't manage Security Groups or WAF rules.&lt;/li&gt;
&lt;li&gt;Amazon Inspector assesses security vulnerabilities but doesn't handle centralized rule management.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;To stay informed on the latest technical insights and tutorials, connect with me on &lt;a href="https://medium.com/@issackpaul95" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/minoltan/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;, and &lt;a href="https://dev.to/minoltan"&gt;Dev.to&lt;/a&gt;. For professional inquiries or technical discussions, please contact me via &lt;a href="//issackpaul95@gmail.com"&gt;email&lt;/a&gt;. I welcome the opportunity to engage with fellow professionals and address any questions you may have. All blogs in this series will be optimized, fine-tuned, developed, and updated in a timely manner to reflect the latest AWS changes, exam updates, and real-world best practices.&lt;/p&gt;

</description>
      <category>cloudpractitioner</category>
      <category>aws</category>
      <category>awssecurity</category>
      <category>awsexam</category>
    </item>
    <item>
      <title>AWS Cloud Practitioner Questions | RDS, Aurora, &amp; ElastiCache</title>
      <dc:creator>Minoltan Issack</dc:creator>
      <pubDate>Sun, 12 Apr 2026 08:11:16 +0000</pubDate>
      <link>https://dev.to/minoltan/aws-cloud-practitioner-questions-rds-aurora-elasticache-2a0g</link>
      <guid>https://dev.to/minoltan/aws-cloud-practitioner-questions-rds-aurora-elasticache-2a0g</guid>
      <description>&lt;h2&gt;
  
  
  Question 1:
&lt;/h2&gt;

&lt;p&gt;Amazon RDS supports the following databases, EXCEPT:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frvm3du0ql3y227htob4o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frvm3du0ql3y227htob4o.png" alt=" " width="783" height="271"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (1):&lt;/strong&gt; Amazon RDS does not support MongoDB. Instead, RDS supports other databases such as MySQL, MariaDB, and Microsoft SQL Server. This helps you understand which databases are compatible with Amazon RDS and clarifies that MongoDB is not included in this managed service.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 2:
&lt;/h2&gt;

&lt;p&gt;You're planning for a new solution that requires a MySQL database that must be available even in case of a disaster in one of the Availability Zones. What should you use?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmh3xmzpjs9s8ixwpy4m2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmh3xmzpjs9s8ixwpy4m2.png" alt=" " width="784" height="208"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer: (3)&lt;/strong&gt; Multi-AZ deployments in Amazon RDS automatically create a synchronous standby replica of your database in a different Availability Zone. This setup provides high availability and durability, ensuring that if one AZ experiences a failure or disaster, the database remains available in the other AZ without manual intervention. In contrast, Read Replicas are mainly used for scaling read operations rather than disaster recovery, as they are asynchronous and may not provide immediate failover support in case of an AZ failure. Enabling Multi-AZ is the recommended approach for disaster recovery within a single region to ensure continuous availability.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 3:
&lt;/h2&gt;

&lt;p&gt;We have an RDS database that struggles to keep up with the demand of requests from our website. Our million users mostly read news, and we don't post news very often. Which solution is NOT adapted to this problem?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4dkfzdmouvpv0ymwuxf5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4dkfzdmouvpv0ymwuxf5.png" alt=" " width="784" height="208"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer: (2)&lt;/strong&gt; "RDS Multi-AZ" provides high availability and automatic failover in case of an Availability Zone failure. It ensures durability but does not improve read performance. "Read Replicas" are designed for scaling read operations, not for disaster recovery. "ElastiCache" improves read speed by caching data, not by providing database failover. Therefore, Multi-AZ is correct for high availability, while the others focus on scaling and caching.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 4:
&lt;/h2&gt;

&lt;p&gt;You have set up read replicas on your RDS database, but users are complaining that upon updating their social media posts, they do not see their updated posts right away. What is a possible cause for this?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1iesgwd28ppiquo40su4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1iesgwd28ppiquo40su4.png" alt=" " width="784" height="228"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2)&amp;nbsp;:&lt;/strong&gt; Read Replicas use asynchronous replication, which can cause delays, leading to eventual consistency, so users might not see their updates immediately. Multi-AZ provides high availability and automatic failover but doesn't improve read scalability. ElastiCache speeds up read access by caching data but does not handle database replication or failover. Therefore, for ensuring data consistency, Read Replicas' asynchronous nature makes them less immediate. The other options serve different purposes like high availability or caching.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 5:
&lt;/h2&gt;

&lt;p&gt;Which RDS (NOT Aurora) feature when used does not require you to change the SQL connection string?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjck8ubm55mnwh0kuq1po.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjck8ubm55mnwh0kuq1po.png" alt=" " width="779" height="144"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (1):&lt;/strong&gt; Multi-AZ maintains the same connection string because it automatically handles failover to the standby replica without requiring connection string changes. In contrast, Read Replicas have their own endpoints and DNS names, so applications need to be updated to connect to them directly. Multi-AZ provides high availability but not read scaling. Read Replicas support read scalability but require configuration changes in the application. Therefore, Multi-AZ does not require changes to the connection string.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 6:
&lt;/h2&gt;

&lt;p&gt;Your application running on a fleet of EC2 instances managed by an Auto Scaling Group behind an Application Load Balancer. Users have to constantly log back in and you don't want to enable Sticky Sessions on your ALB as you fear it will overload some EC2 instances. What should you do?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faf9nck6i6qu4fq10974q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faf9nck6i6qu4fq10974q.png" alt=" " width="780" height="273"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (3):&lt;/strong&gt; Storing session data in ElastiCache allows multiple EC2 instances to access user sessions quickly and efficiently, supporting stateless application design. RDS could store session data but offers lower performance compared to ElastiCache, which is optimized for fast access. Using your own load balancer doesn't address session management and can lead to complexity. EBS volumes are not suitable for shared session storage across instances due to limitations and performance concerns. Therefore, ElastiCache is the best choice for managing user sessions without sticky sessions.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 7:
&lt;/h2&gt;

&lt;p&gt;An analytics application is currently performing its queries against your main production RDS database. These queries run at any time of the day and slow down the RDS database which impacts your users' experience. What should you do to improve the users' experience?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F00lso99lqto3wqn68axj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F00lso99lqto3wqn68axj.png" alt=" " width="783" height="210"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (1):&lt;/strong&gt; Setting up a Read Replica allows analytics queries to run independently, so they won't slow down the main database. Multi-AZ is mainly for high availability and automatic failover, not for offloading read workloads. Running queries at night limits real-time performance and doesn't address ongoing query impacts during the day. Read Replicas improve performance by distributing read traffic, making the user experience better. The other options do not effectively handle the problem of heavy, ongoing query load.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 8:
&lt;/h2&gt;

&lt;p&gt;You would like to ensure you have a replica of your database available in another AWS Region if a disaster happens to your main AWS Region. Which database do you recommend to implement this easily?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3c3d36ziaq6kv4rcny5k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3c3d36ziaq6kv4rcny5k.png" alt=" " width="783" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (4):&lt;/strong&gt; Aurora Global Database is designed for disaster recovery across regions by allowing replicas in multiple AWS regions. RDS Read Replicas are limited to the same region and don't support cross-region disaster recovery. RDS Multi-AZ is for high availability within a single region and does not provide cross-region replication. Aurora Read Replicas are regional but do not have the global multi-region capability. Aurora Global Database is the best option for multi-region disaster recovery.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 9:
&lt;/h2&gt;

&lt;p&gt;How can you enhance the security of your ElastiCache Redis Cluster by allowing users to access your ElastiCache Redis Cluster using their IAM Identities (e.g., Users, Roles)?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcuzqvyn2q84kihsol5ut.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcuzqvyn2q84kihsol5ut.png" alt=" " width="784" height="213"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2):&lt;/strong&gt; Using IAM Authentication allows users to securely access ElastiCache Redis with their IAM identities, enabling fine-grained access control and auditability. Redis Authentication relies on a password, which is less integrated with AWS identity management. Security Groups control network traffic but do not handle user authentication directly. IAM Authentication is specifically designed for integrating AWS user identities with ElastiCache for better security. The other options do not provide direct IAM-based user access control.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 10:
&lt;/h2&gt;

&lt;p&gt;Your company has a production Node.js application that is using RDS MySQL 5.6 as its database. A new application programmed in Java will perform some heavy analytics workload to create a dashboard on a regular hourly basis. What is the most cost-effective solution you can implement to minimize disruption for the main application?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fip72ty2pxy9lop0bgw4h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fip72ty2pxy9lop0bgw4h.png" alt=" " width="784" height="213"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2):&lt;/strong&gt; Creating a Read Replica in a different AZ allows the analytics workload to run without affecting the main database's performance. This minimizes disruption for the primary application while handling heavy analytics separately. Enabling Multi-AZ only provides high availability and automatic failover, not workload separation. Running analytics on the source database could slow down the main application and cause performance issues. Using a cross-AZ Read Replica is the most cost-effective and suitable solution for this scenario.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 11:
&lt;/h2&gt;

&lt;p&gt;You would like to create a disaster recovery strategy for your RDS PostgreSQL database so that in case of a regional outage the database can be quickly made available for both read and write workloads in another AWS Region. The DR database must be highly available. What do you recommend?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9oli0nwhmvvsnza7rlxw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9oli0nwhmvvsnza7rlxw.png" alt=" " width="778" height="279"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2):&lt;/strong&gt; Creating a read replica in a different region provides a backup that can be quickly promoted during a regional outage, ensuring high availability. Enabling Multi-AZ on the main database improves local availability but does not protect against regional failures. Creating a read replica in the same region with Multi-AZ doesn't provide cross-region disaster recovery. The "Enable Multi-Region" option does not exist in RDS; cross-region replication must be set up manually. The correct approach is to create a read replica in the target region for effective disaster recovery.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 12:
&lt;/h2&gt;

&lt;p&gt;You have migrated the MySQL database from on-premises to RDS. You have a lot of applications and developers interacting with your database. Each developer has an IAM user in the company's AWS account. What is a suitable approach to give access to developers to the MySQL RDS DB instance instead of creating a DB user for each one?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbc5bem3zj2ru7ltzwdod.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbc5bem3zj2ru7ltzwdod.png" alt=" " width="778" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (3):&lt;/strong&gt; Enabling IAM Database Authentication allows developers to access the RDS MySQL instance using their IAM credentials, simplifying user management. It eliminates the need to create individual database users and passwords for each developer. By default, IAM users do not have direct access to RDS databases without this feature enabled. Using Amazon Cognito is primarily for user authentication in mobile or web applications, not for direct database access. The correct choice streamlines access control while maintaining security via IAM.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 13:
&lt;/h2&gt;

&lt;p&gt;Which of the following statement is true regarding replication in both RDS Read Replicas and Multi-AZ?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz5ux8wsia72ksnv51lcz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz5ux8wsia72ksnv51lcz.png" alt=" " width="779" height="277"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2):&lt;/strong&gt; Read Replicas use asynchronous replication, which allows data to be copied to the replica with a slight delay, suitable for scaling and offloading read traffic. Multi-AZ deployments use synchronous replication, ensuring data is written to both the primary and standby instances simultaneously for high availability. The other options incorrectly state both use asynchronous or synchronous replication, which is not accurate. Synchronous replication in Multi-AZ provides data consistency during failover. Therefore, the correct answer accurately reflects the different replication methods used.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 14:
&lt;/h2&gt;

&lt;p&gt;How do you encrypt an unencrypted RDS DB instance?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5526uxcnff3s4e4358c1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5526uxcnff3s4e4358c1.png" alt=" " width="779" height="246"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (3):&lt;/strong&gt; The correct method involves creating a snapshot, copying it with encryption enabled, and restoring the instance from this encrypted snapshot, as encryption cannot be directly enabled on an existing unencrypted RDS instance. The first option, encrypting directly from the console without snapshotting, is not possible because RDS does not support on-the-fly encryption of running instances. The second option, stopping the database before snapshotting, is unnecessary; snapshots can be created while the database is running. Restoring from an encrypted snapshot applies encryption to the new instance, which is the correct approach. This process ensures data encryption without downtime or complex configurations.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 15:
&lt;/h2&gt;

&lt;p&gt;For your RDS database, you can have up to ............ Read Replicas.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkbpeddhppzvxx0ujs1tz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkbpeddhppzvxx0ujs1tz.png" alt=" " width="787" height="214"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2):&lt;/strong&gt; The correct answer is 15, which is the maximum number of Read Replicas allowed for an RDS database, providing scalable read capacity. The choice of 5 is too low and limits scalability unnecessarily. The option of 7 is also below the maximum limit, so it does not represent the highest possible replicas. The limit is set to 15 for most database engines, allowing significant read scaling. Therefore, 15 is the correct maximum number allowed by AWS.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 16:
&lt;/h2&gt;

&lt;p&gt;Which RDS database technology does NOT support IAM Database Authentication?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvkrsechnl4o9ts6gcocf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvkrsechnl4o9ts6gcocf.png" alt=" " width="787" height="214"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2):&lt;/strong&gt; Oracle does not support IAM Database Authentication, so it cannot leverage AWS IAM for database access. PostgreSQL and MySQL, on the other hand, do support IAM authentication, enabling secure, centralized access management through IAM roles. The other options, "PostgreSQL" and "MySQL," support IAM, making them incorrect choices for this question. Oracle's architecture and authentication methods differ, which is why it does not integrate with IAM-based authentication. Therefore, Oracle is the correct answer as it does not support IAM Database Authentication.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 17:
&lt;/h2&gt;

&lt;p&gt;You have an un-encrypted RDS DB instance and you want to create Read Replicas. Can you configure the RDS Read Replicas to be encrypted?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhjvif5m1x4r2tit96yu7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhjvif5m1x4r2tit96yu7.png" alt=" " width="778" height="149"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (1):&lt;/strong&gt; You cannot create encrypted Read Replicas from an un-encrypted RDS DB instance because encryption must be enabled at the source instance before replication. AWS does not allow converting or encrypting a Read Replica after it has been created from an unencrypted source. To have an encrypted Read Replica, you must first encrypt the source database through snapshot and restore procedures. This restriction ensures data at rest remains encrypted and secure. Therefore, the correct answer is "No."&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 18:
&lt;/h2&gt;

&lt;p&gt;An application running in production is using an Aurora Cluster as its database. Your development team would like to run a version of the application in a scaled-down application with the ability to perform some heavy workload on a need-basis. Most of the time, the application will be unused. Your CIO has tasked you with helping the team to achieve this while minimizing costs. What do you suggest?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg3qcui1lzay8w2c46x48.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg3qcui1lzay8w2c46x48.png" alt=" " width="781" height="276"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (3):&lt;/strong&gt; Aurora Serverless automatically scales capacity up or down based on workload, making it cost-effective for infrequent and variable usage, which matches the team's needs. Using a global database is more suited for multi-region replication and not cost-efficient for small, infrequent workloads. An RDS database or running Aurora on EC2 would require maintaining resources constantly, increasing costs when the app is unused. Shutting down EC2 instances only addresses compute, not the database cost, and is less flexible than Aurora Serverless. Therefore, Aurora Serverless best minimizes costs while handling variable workloads.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 19:
&lt;/h2&gt;

&lt;p&gt;How many Aurora Read Replicas can you have in a single Aurora DB Cluster?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr3ppj8ghvbf52jjqm10v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr3ppj8ghvbf52jjqm10v.png" alt=" " width="781" height="208"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (3):&lt;/strong&gt; Aurora natively supports both MySQL and PostgreSQL, making it compatible with those database engines. Aurora does not support MariaDB, Oracle, or MS SQL Server directly; these are separate from Aurora's supported engines. MariaDB is similar but not officially supported as an Aurora engine. Oracle and MS SQL Server are proprietary databases and are not compatible with Aurora. Therefore, "MySQL and PostgreSQL" is the correct answer, supporting Aurora's capabilities.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 20:
&lt;/h2&gt;

&lt;p&gt;Amazon Aurora supports both&amp;nbsp;…………………….. databases.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftm6m4hc1j5kip36337t7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftm6m4hc1j5kip36337t7.png" alt=" " width="781" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2):&lt;/strong&gt; Aurora supports only MySQL and PostgreSQL engines, making it compatible with both. MariaDB is not supported by Aurora, so you can't use it directly. Oracle and MS SQL Server are proprietary databases with different architectures, so they are not compatible with Aurora. Aurora is designed to work specifically with MySQL and PostgreSQL for seamless integration. Therefore, "MySQL and PostgreSQL" is correct because only these two are supported by Aurora.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 21:
&lt;/h2&gt;

&lt;p&gt;You work as a Solutions Architect for a gaming company. One of the games mandates that players are ranked in real-time based on their score. Your boss asked you to design then implement an effective and highly available solution to create a gaming leaderboard. What should you use?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwdlfgng2dinktrw5xfeb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwdlfgng2dinktrw5xfeb.png" alt=" " width="781" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (4):&lt;/strong&gt; ElastiCache for Redis with Sorted Sets is ideal for real-time ranking because it allows fast, in-memory updates and retrievals of ordered data, making leaderboards highly responsive and available. RDS for MySQL can store data, but it's slower for real-time updates and querying, which is critical for gaming leaderboards. Amazon Aurora provides high availability but isn't optimized for the ultra-low latency and real-time ranking needed here. ElastiCache for Memcached offers fast caching but lacks built-in support for ordered data types like Sorted Sets. Therefore, Redis Sorted Sets are the best fit for creating a highly available, real-time gaming leaderboard.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 22:
&lt;/h2&gt;

&lt;p&gt;You need full customization of an Oracle Database on AWS. You would like to benefit from using the AWS services. What do you recommend?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3sbider7w09k5fmdie77.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3sbider7w09k5fmdie77.png" alt=" " width="782" height="212"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2):&lt;/strong&gt; RDS Custom for Oracle provides full customization options on AWS, allowing more control over the database environment, including access to the underlying OS and configurations. RDS for Oracle offers managed service with limited customization, suitable for standardized use cases but not full control. Deploying Oracle on EC2 gives complete customization but requires managing the infrastructure and maintenance yourself, which is less optimized than RDS Custom. RDS Custom strikes a balance by providing control while reducing administrative overhead. Therefore, RDS Custom for Oracle is the best choice for full customization with managed AWS services.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 23:
&lt;/h2&gt;

&lt;p&gt;You need to store long-term backups for your Aurora database for disaster recovery and audit purposes. What do you recommend?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbvwbxk26pqd6x147iftd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbvwbxk26pqd6x147iftd.png" alt=" " width="782" height="212"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2):&lt;/strong&gt; Perform On Demand Backups allows you to manually create backups that can be stored for as long as needed for disaster recovery and audits. Automated Backups have a maximum retention period of 35 days, which is insufficient for long-term storage. Aurora Database Cloning creates copies of the database but does not serve as a long-term backup solution. On Demand Backups give you control over backup retention duration beyond the automated retention period. Therefore, performing on-demand backups is best for long-term storage needs.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 24:
&lt;/h2&gt;

&lt;p&gt;Your development team would like to perform a suite of read and write tests against your production Aurora database because they need access to production data as soon as possible. What do you advise?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F30dr452if5fvdi8v3hc7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F30dr452if5fvdi8v3hc7.png" alt=" " width="779" height="273"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (4):&lt;/strong&gt; Using Aurora Cloning creates a fast, separate copy of the database for testing without impacting production. Creating a Read Replica allows read-only access but isn't suitable for write testing or immediate data access. Testing directly against the production database risks affecting live users and data integrity. Making a DB Snapshot and restoring it is slower and unnecessary when cloning provides a quicker, safer option. Therefore, Aurora Cloning is the best choice for testing without affecting production performance or data.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 25:
&lt;/h2&gt;

&lt;p&gt;You have 100 EC2 instances connected to your RDS database and you see that upon a maintenance of the database, all your applications take a lot of time to reconnect to RDS, due to poor application logic. How do you improve this?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4i2nf6pmphcwss4u5xvj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4i2nf6pmphcwss4u5xvj.png" alt=" " width="779" height="273"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (4):&lt;/strong&gt; Using RDS Proxy helps manage database connections efficiently, reducing connection time during failovers or maintenance. Fixing all the applications is impractical and time-consuming. Disabling Multi-AZ removes high availability features, risking longer downtime during failover. Enabling Multi-AZ improves availability but doesn't address connection interruptions during maintenance. Therefore, RDS Proxy is best for maintaining persistent connections and minimizing disruption.&lt;/p&gt;




&lt;p&gt;To stay informed on the latest technical insights and tutorials, connect with me on &lt;a href="https://medium.com/@issackpaul95" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/minoltan/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;, and &lt;a href="https://dev.to/minoltan"&gt;Dev.to&lt;/a&gt;. For professional inquiries or technical discussions, please contact me via &lt;a href="//issackpaul95@gmail.com"&gt;email&lt;/a&gt;. I welcome the opportunity to engage with fellow professionals and address any questions you may have. All blogs in this series will be optimized, fine-tuned, developed, and updated in a timely manner to reflect the latest AWS changes, exam updates, and real-world best practices.&lt;/p&gt;

</description>
      <category>rds</category>
      <category>aurora</category>
      <category>elasticcache</category>
      <category>aws</category>
    </item>
    <item>
      <title>AWS Cloud Practitioner Questions | IAM Advanced</title>
      <dc:creator>Minoltan Issack</dc:creator>
      <pubDate>Sun, 22 Mar 2026 06:01:39 +0000</pubDate>
      <link>https://dev.to/minoltan/aws-cloud-practitioner-questions-iam-advanced-3lgg</link>
      <guid>https://dev.to/minoltan/aws-cloud-practitioner-questions-iam-advanced-3lgg</guid>
      <description>&lt;h2&gt;
  
  
  Question 1:
&lt;/h2&gt;

&lt;p&gt;You have strong regulatory requirements to only allow fully internally audited AWS services in production. You still want to allow your teams to experiment in a development environment while services are being audited. How can you best set this up?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq51f27nvexouxiypxept.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq51f27nvexouxiypxept.png" alt=" " width="784" height="294"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (3):&lt;/strong&gt; By creating an AWS Organization with separate Organizational Units (OUs) for Prod and Dev, and applying a Service Control Policy (SCP) on the Prod OU, you effectively enforce compliance in your production environment while allowing flexibility for experimentation in development. This setup aligns with your regulatory requirements by ensuring only vetted services are accessible in production.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 2:
&lt;/h2&gt;

&lt;p&gt;You are managing the AWS account for your company, and you want to give one of the developers access to read files from an S3 bucket. You have updated the bucket policy to this, but he still can't access the files in the bucket. What is the problem?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;

    &lt;/span&gt;&lt;span class="nl"&gt;"Version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2012-10-17"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;

    &lt;/span&gt;&lt;span class="nl"&gt;"Statement"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt;

        &lt;/span&gt;&lt;span class="nl"&gt;"Sid"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"AllowsRead"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;

        &lt;/span&gt;&lt;span class="nl"&gt;"Effect"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Allow"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;

        &lt;/span&gt;&lt;span class="nl"&gt;"Principal"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;

            &lt;/span&gt;&lt;span class="nl"&gt;"AWS"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"arn:aws:iam::123456789012:user/Dave"&lt;/span&gt;&lt;span class="w"&gt;

        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;

        &lt;/span&gt;&lt;span class="nl"&gt;"Action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"s3:GetObject"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;

        &lt;/span&gt;&lt;span class="nl"&gt;"Resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"arn:aws:s3:::static-files-bucket-xxx"&lt;/span&gt;&lt;span class="w"&gt;

     &lt;/span&gt;&lt;span class="p"&gt;}]&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3vxdzywzbic76xb06l7o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3vxdzywzbic76xb06l7o.png" alt=" " width="786" height="235"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (3):&lt;/strong&gt; The permission specified in the bucket policy only grants access to the bucket itself, not to the objects within it. By changing the resource to "arn:aws:s3:::static-files-bucket-xxx/*," you allow access to the individual files, which is necessary for object-level permissions.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 3:
&lt;/h2&gt;

&lt;p&gt;You have 5 AWS Accounts that you manage using AWS Organizations. You want to restrict access to certain AWS services in each account. How should you do that?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuu52qlrbbhhkyap3lpj5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuu52qlrbbhhkyap3lpj5.png" alt=" " width="783" height="213"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2):&lt;/strong&gt; By selecting "Using AWS Organizations SCP," you correctly identified the most effective way to restrict access to specific AWS services across multiple accounts, as Service Control Policies provide a centralized method for managing permissions within your organization. This aligns with your goal of implementing governance and compliance measures across your AWS accounts effectively.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 4:
&lt;/h2&gt;

&lt;p&gt;Which of the following IAM condition key you can use only to allow API calls to a specified AWS region?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9x4lmkaiy5zg38pyptwp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9x4lmkaiy5zg38pyptwp.png" alt=" " width="783" height="279"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (4):&lt;/strong&gt; It specifically allows or denies API calls based on the region specified in the request, aligning perfectly with the requirement of controlling access to a specified AWS region. This understanding helps you effectively manage permissions and enforce regional restrictions in your AWS environment.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 5:
&lt;/h2&gt;

&lt;p&gt;When configuring permissions for EventBridge to configure a Lambda function as a target you should use ………………….. but when you want to configure a Kinesis Data Streams as a target you should use&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd90xw25vcshsh8l5kpxb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd90xw25vcshsh8l5kpxb.png" alt=" " width="783" height="279"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2):&lt;/strong&gt; Using a resource-based policy for EventBridge allows you to define permissions directly on the Lambda function, while an identity-based policy is appropriate for Kinesis Data Streams, as it manages permissions based on the IAM role or user accessing the service. This distinction is key for correctly configuring permissions in AWS.&lt;/p&gt;




&lt;p&gt;To stay informed on the latest technical insights and tutorials, connect with me on &lt;a href="https://medium.com/@issackpaul95" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/minoltan/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;, and &lt;a href="https://dev.to/minoltan"&gt;Dev.to&lt;/a&gt;. For professional inquiries or technical discussions, please contact me via &lt;a href="//issackpaul95@gmail.com"&gt;email&lt;/a&gt;. I welcome the opportunity to engage with fellow professionals and address any questions you may have. All blogs in this series will be optimized, fine-tuned, developed, and updated in a timely manner to reflect the latest AWS changes, exam updates, and real-world best practices.&lt;/p&gt;

</description>
      <category>iam</category>
      <category>aws</category>
      <category>serverless</category>
      <category>cloudpractitioner</category>
    </item>
    <item>
      <title>AWS Cloud Practitioner Questions | Networking &amp; VPC</title>
      <dc:creator>Minoltan Issack</dc:creator>
      <pubDate>Sat, 21 Feb 2026 10:35:24 +0000</pubDate>
      <link>https://dev.to/minoltan/aws-cloud-practitioner-questions-networking-vpc-285g</link>
      <guid>https://dev.to/minoltan/aws-cloud-practitioner-questions-networking-vpc-285g</guid>
      <description>&lt;h2&gt;
  
  
  Question 1:
&lt;/h2&gt;

&lt;p&gt;What does this CIDR 10.0.4.0/28 correspond to?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmi19y1jsxec5pa73yy13.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmi19y1jsxec5pa73yy13.png" alt=" " width="783" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (1):&lt;/strong&gt; CIDR notation "/28" indicates a subnet with 16 available IP addresses, ranging from the starting address 10.0.4.0 to 10.0.4.15, as only the last four bits change in this subnet. Great job understanding how CIDR notation works!&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 2:
&lt;/h2&gt;

&lt;p&gt;You have a corporate network of size 10.0.0.0/8 and a satellite office of size 192.168.0.0/16. Which CIDR is acceptable for your AWS VPC if you plan on connecting your networks later on?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw34heuk4g5m1khnskrme.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw34heuk4g5m1khnskrme.png" alt=" " width="783" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2):&lt;/strong&gt; It fits within the private IP address range and does not overlap with your existing networks, which is essential for proper routing and connectivity in your AWS VPC. This choice also adheres to the maximum CIDR size requirement in AWS, ensuring effective network management.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to get the answer: A Step-by-Step Guide
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Identify the "Taken"&amp;nbsp;Space&lt;/strong&gt;&lt;br&gt;
First, look at the private IP ranges already in use. According to RFC 1918, there are three main blocks reserved for private networks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;10.0.0.0/8: (Used by your Corporate Network)&lt;/li&gt;
&lt;li&gt;172.16.0.0/12: (Available)&lt;/li&gt;
&lt;li&gt;192.168.0.0/16: (Used by your Satellite Office)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Apply the Rule of Non-Overlap&lt;/strong&gt;&lt;br&gt;
If you choose a VPC range that sits inside the 10.x.x.x or 192.168.x.x space, your routers won't know where to send a packet.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Example: If your VPC is 10.0.1.0/24 and your Corporate network is 10.0.0.0/8, the Corporate network contains the VPC range. When a computer in the office tries to talk to the VPC, it might think that IP address is just down the hall in the office rather than across the VPN/Direct Connect to AWS.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;3. Select from the Remaining Private&amp;nbsp;Space&lt;/strong&gt;&lt;br&gt;
Since the 10.x and 192.168.x blocks are occupied, the 172.16.0.0/12 block is your rest candidate, but a common choice is 172.16.0.0/16, which provides 65,536 IP addresses - plenty for most VPC needs.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note&amp;nbsp;: A /12 is significantly larger than a /16. In networking, the smaller the prefix number, the larger the network. A /12 contains sixteen /16 networks. AWS simply won't let you type 172.16.0.0/12 into the console.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Question 3:
&lt;/h2&gt;

&lt;p&gt;You plan on creating a subnet and want it to have at least capacity for 28 EC2 instances. What's the minimum size you need to have for your subnet?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx56ewp96lcwm6xhhwovc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx56ewp96lcwm6xhhwovc.png" alt=" " width="783" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (3):&lt;/strong&gt; The minimum size you need is a ** /26 **. While a /27 provides 32 total addresses, once AWS takes its 5 reserved IPs, you are left with only 27 usable slots. Since you need 28, you must move up to the next binary step, which is a /26.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Calculation&lt;/strong&gt;&lt;br&gt;
If you need 28 instances, your total IP requirement is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;28 (for your EC2 instances)&lt;/li&gt;
&lt;li&gt;+ 5 (AWS Reserved IPs)&lt;/li&gt;
&lt;li&gt;= 33 Total IP addresses required.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, we look at CIDR notation (which works in powers of 2) to find the smallest block that fits at least 33 addresses:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fczwsrd5at10h3o2hjzcf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fczwsrd5at10h3o2hjzcf.png" alt=" " width="540" height="159"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 4:
&lt;/h2&gt;

&lt;p&gt;Security Groups operate at the ................. level while NACLs operate at the ................. level.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdd5zmtgy9tqec2hq45an.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdd5zmtgy9tqec2hq45an.png" alt=" " width="795" height="141"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (1):&lt;/strong&gt; Security Groups operate at the instance level while NACLs operate at the subnet level.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 5:
&lt;/h2&gt;

&lt;p&gt;You have attached an Internet Gateway to your VPC, but your EC2 instances still don't have access to the internet. What is NOT a possible issue?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhjxvv6fc006bl5vtayys.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhjxvv6fc006bl5vtayys.png" alt=" " width="799" height="283"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (3):&lt;/strong&gt; Security groups in AWS are stateful, meaning that if an outgoing request is allowed, the corresponding inbound response will also be allowed, making this option not applicable to your EC2 instances' internet access issue. Keep up the great work understanding security groups!&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 6:
&lt;/h2&gt;

&lt;p&gt;You would like to provide Internet access to your EC2 instances in private subnets with IPv4 while making sure this solution requires the least amount of administration and scales seamlessly. What should you use?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftqvzzq0yoyf0nt6l9chx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftqvzzq0yoyf0nt6l9chx.png" alt=" " width="800" height="219"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (3):&lt;/strong&gt; It is the best option for providing seamless internet access to your EC2 instances in private subnets while minimizing administrative overhead, as it automatically scales with your traffic demands. This choice aligns perfectly with your goal of efficient and hassle-free network management.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the other answers are&amp;nbsp;wrong:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Egress-Only Internet Gateway&amp;nbsp;(EOIGW)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Flaw: Egress-Only IGWs are strictly for IPv6 traffic.&lt;/li&gt;
&lt;li&gt;Why it fails here: Your question specifically asks for IPv4 access. IPv4 and IPv6 use entirely different protocols for "hiding" private instances. An EOIGW cannot translate IPv4 addresses.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. NAT Instances&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Flaw: These are DIY (Do-It-Yourself) virtual machines.
Why it fails here: * High Administration: You are responsible for managing the EC2 instance, patching the OS, and configuring the NAT software (like iptables).&lt;/li&gt;
&lt;li&gt;Poor Scaling: If your traffic exceeds the instance's bandwidth, you have to manually upgrade the instance size (vertical scaling) or set up a complex fleet (horizontal scaling). It does not scale "seamlessly" like a NAT Gateway does.&lt;/li&gt;
&lt;li&gt;Single Point of Failure: Unless you set up a high-availability script, if that one instance crashes, your entire private subnet loses internet access.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Question 7:
&lt;/h2&gt;

&lt;p&gt;VPC Peering has been enabled between VPC A and VPC B, and the route tables have been updated for VPC A. But, the EC2 instances cannot communicate. What is the likely issue?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F54ldycvi0acafq721mc7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F54ldycvi0acafq721mc7.png" alt=" " width="793" height="278"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2):&lt;/strong&gt; In VPC Peering, both VPCs need updated route tables to allow communication between them; neglecting VPC B's route table can block traffic. This understanding highlights the importance of proper configuration in networking setups on AWS.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 8:
&lt;/h2&gt;

&lt;p&gt;You have set up a Direct Connect connection between your corporate data center and your VPC A in your AWS account. You need to access VPC B in another AWS region from your corporate datacenter as well. What should you do?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsgeh7baffcvridcgb8gw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsgeh7baffcvridcgb8gw.png" alt=" " width="793" height="278"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (3):&lt;/strong&gt; It enables you to access multiple VPCs across different regions from your corporate data center, providing a seamless connection. This choice effectively aligns with the objective of optimizing network connectivity in multi-region architectures.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 9:
&lt;/h2&gt;

&lt;p&gt;When using VPC Endpoints, what are the only two AWS services that have a Gateway Endpoint available?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxakt7en21td2agyvnp7d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxakt7en21td2agyvnp7d.png" alt=" " width="791" height="210"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (3):&lt;/strong&gt; These are the only AWS services that support a Gateway Endpoint, which allows private connections to your VPC without using public IPs. This understanding is crucial for efficiently managing secure connections in your AWS architecture.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 10:
&lt;/h2&gt;

&lt;p&gt;AWS reserves 5 IP addresses each time you create a new subnet in a VPC. When you create a subnet with CIDR 10.0.0.0/24, the following IP addresses are reserved, EXCEPT ....................&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqj6uogqgxyzpll356ekx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqj6uogqgxyzpll356ekx.png" alt=" " width="789" height="283"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Answer (4):&lt;/strong&gt; AWS reserves the first four IP addresses (10.0.0.0 to 10.0.0.3) in a subnet for specific functions, meaning 10.0.0.4 is the first usable address and not reserved. This understanding is key when managing IP addresses within your VPC's subnets.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Reserved List for 10.0.0.0/24&lt;/strong&gt;&lt;br&gt;
For this specific subnet, the reserved addresses are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;10.0.0.0: Network address.&lt;/li&gt;
&lt;li&gt;10.0.0.1: Reserved by AWS for the VPC router.&lt;/li&gt;
&lt;li&gt;10.0.0.2: Reserved by AWS for mapping to Amazon Provided DNS.&lt;/li&gt;
&lt;li&gt;10.0.0.3: Reserved by AWS for future use.&lt;/li&gt;
&lt;li&gt;10.0.0.255: Network broadcast address (AWS does not support broadcast, but it reserves this address anyway).&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Question 11:
&lt;/h2&gt;

&lt;p&gt;You have 3 VPCs A, B, and C. You want to establish a VPC Peering connection between all the 3 VPCs. What should you do?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh5iprsukna7um9bwf7st.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh5iprsukna7um9bwf7st.png" alt=" " width="785" height="162"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2):&lt;/strong&gt; Because VPC Peering does not support transitive relationships, meaning each VPC must be directly peered with every other VPC to enable communication. This understanding is crucial for establishing effective connections among multiple VPCs in your AWS environment.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 12:
&lt;/h2&gt;

&lt;p&gt;How can you capture information about IP traffic inside your VPCs?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb4f8nzl88vo5x8vvzsz1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb4f8nzl88vo5x8vvzsz1.png" alt=" " width="785" height="203"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (1):&lt;/strong&gt; Because this feature allows you to capture and analyze IP traffic data for network interfaces in your VPC, essential for monitoring network activity and auditing connections. Understanding this capability aligns with your learning objective of effectively managing and securing your AWS network infrastructure.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 13:
&lt;/h2&gt;

&lt;p&gt;If you want a 500 Mbps Direct Connect connection between your corporate datacenter to AWS, you would choose a .................. connection.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi485joyjnep49nljzalm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi485joyjnep49nljzalm.png" alt=" " width="790" height="151"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2):&lt;/strong&gt; It supports connections specifically at 500 Mbps, making it the appropriate choice for establishing your desired Direct Connect connection to AWS. This understanding aligns well with your learning about optimizing network performance within your AWS architecture.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz2e85vkbysl1acl2mdtz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz2e85vkbysl1acl2mdtz.png" alt=" " width="559" height="185"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 14:
&lt;/h2&gt;

&lt;p&gt;When you set up an AWS Site-to-Site VPN connection between your corporate on-premises datacenter and VPCs in AWS Cloud, what are the two major components you want to configure for this connection?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Finrscj44z1docmey1d7u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Finrscj44z1docmey1d7u.png" alt=" " width="784" height="284"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (4):&lt;/strong&gt; Because these are the essential components needed to establish a Site-to-Site VPN connection between your on-premises datacenter and the AWS Cloud. This understanding aligns with your goal of mastering AWS networking and ensuring secure communication between environments.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 15:
&lt;/h2&gt;

&lt;p&gt;Your company has several on-premises sites across the USA. These sites are currently linked using private connections, but your private connections provider has been recently quite unstable, making your IT architecture partially offline. You would like to create a backup connection that will use the public Internet to link your on-premises sites, that you can failover in case of issues with your provider. What do you recommend?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzj7i2gtttss2ldvzk3gr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzj7i2gtttss2ldvzk3gr.png" alt=" " width="784" height="284"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (2):&lt;/strong&gt; It allows you to establish secure communications between multiple on-premises sites over the public Internet using a hub-and-spoke model. This solution aligns perfectly with your objective of ensuring reliable backup connectivity for your environments during potential outages.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 16:
&lt;/h2&gt;

&lt;p&gt;You need to set up a dedicated connection between your on-premises corporate datacenter and AWS Cloud. This connection must be private, consistent, and traffic must not travel through the Internet. Which AWS service should you use?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0w2gkgicf0ywpypjbr8f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0w2gkgicf0ywpypjbr8f.png" alt=" " width="784" height="284"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (3):&lt;/strong&gt; It provides a dedicated, private connection between your on-premises datacenter and AWS, ensuring consistent performance without passing through the public Internet. This aligns perfectly with your goal of establishing a reliable and secure network infrastructure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrong Choices
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. AWS Site-to-Site VPN&lt;/strong&gt;&lt;br&gt;
Think of this as the "Fast and Affordable" alternative to Direct Connect. It creates an encrypted tunnel between your on-premises data center and your AWS VPC using the Public Internet.&lt;br&gt;
&lt;strong&gt;2. AWS PrivateLink&lt;/strong&gt;&lt;br&gt;
PrivateLink is fundamentally different. It isn't a "network-to-network" connection; it is a "Service-to-Service" connection. It allows you to expose a specific service (like a database or a third-party API) to another VPC or on-premises network without ever using an Internet Gateway, NAT Gateway, or Peering.&lt;br&gt;
&lt;strong&gt;4. Amazon EventBridge&lt;/strong&gt;&lt;br&gt;
EventBridge is often a "distractor" answer when you are asked about establishing a network connection. The reason EventBridge is not the answer for a "dedicated connection" or "private network link" is a matter of Layer and Purpose.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 17:
&lt;/h2&gt;

&lt;p&gt;Using a Direct Connect connection, you can access both public and private AWS resources.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi263bne3daevnio32vmn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi263bne3daevnio32vmn.png" alt=" " width="785" height="141"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (1):&lt;/strong&gt; You can indeed access both public resources, like AWS S3 buckets, and private resources, such as EC2 instances in a Virtual Private Cloud (VPC). This understanding reinforces your knowledge of how to optimize secure connectivity to AWS resources.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 18:
&lt;/h2&gt;

&lt;p&gt;You want to scale up an AWS Site-to-Site VPN connection throughput, established between your on-premises data and AWS Cloud, beyond a single IPsec tunnel's maximum limit of 1.25 Gbps. What should you do?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feq5wnem3hmy74sm7unkk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feq5wnem3hmy74sm7unkk.png" alt=" " width="782" height="206"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (3):&lt;/strong&gt; It allows you to scale multiple Site-to-Site VPN connections and aggregate traffic efficiently, overcoming the 1.25 Gbps limit of a single IPsec tunnel. This choice showcases your understanding of how Transit Gateway can enhance connectivity and performance in AWS networking.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 19:
&lt;/h2&gt;

&lt;p&gt;You have a VPC in your AWS account that runs in a dual-stack mode. You are continuously trying to launch an EC2 instance, but it fails. After further investigation, you have found that you are no longer have IPv4 addresses available. What should you do?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8722ld77zne3aakpdvyq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8722ld77zne3aakpdvyq.png" alt=" " width="782" height="206"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (3):&lt;/strong&gt; You chose the appropriate solution to increase the number of available IPv4 addresses, allowing you to launch your EC2 instance successfully. This action directly addresses the issue of address depletion in your VPC while maintaining your current network configuration.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 20:
&lt;/h2&gt;

&lt;p&gt;A web application backend is hosted on EC2 instances in private subnets fronted by an Application Load Balancer in public subnets. There is a requirement to give some of the developers access to the backend EC2 instances but without exposing the backend EC2 instances to the Internet. You have created a bastion host EC2 instance in the public subnet and configured the backend EC2 instances Security Group to allow traffic from the bastion host. Which of the following is the best configuration for bastion host Security Group to make it secure?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft0r22e8gbv97v87lw2bx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft0r22e8gbv97v87lw2bx.png" alt=" " width="783" height="272"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Answer (2):&lt;/strong&gt; Ensured that SSH access to the bastion host is secure, allowing developers to manage backend EC2 instances without exposing them to the internet. This configuration supports your learning objective of implementing secure access to resources in AWS environments.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 21:
&lt;/h2&gt;

&lt;p&gt;A company has set up a Direct Connect connection between their corporate data center to AWS. There is a requirement to prepare a cost-effective secure backup connection in case there are issues with this Direct Connect connection. What is the most cost effective and secure solution you recommend?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6jy69w3qt6gz3y83r0q0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6jy69w3qt6gz3y83r0q0.png" alt=" " width="786" height="214"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (3):&lt;/strong&gt; By selecting "Setup a Site-to-Site VPN connection as a backup," you chose a cost-effective solution that provides a secure alternative in case the primary Direct Connect connection fails. This approach ensures continuous connectivity while balancing security and cost, aligning well with the goal of maintaining reliable access to AWS resources.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 22:
&lt;/h2&gt;

&lt;p&gt;Which AWS service allows you to protect and control traffic in your VPC from layer 3 to layer 7?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjum6gmm3of241z7rg8of.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjum6gmm3of241z7rg8of.png" alt=" " width="792" height="271"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (1):&lt;/strong&gt; The service designed to protect and control traffic in your VPC across multiple layers, ensuring robust security for your cloud resources. This aligns with your learning objective of understanding traffic management and security within AWS environments.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frrkyh35ava9ejfs0ss0v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frrkyh35ava9ejfs0ss0v.png" alt=" " width="662" height="188"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 23:
&lt;/h2&gt;

&lt;p&gt;A web application hosted on a fleet of EC2 instances managed by an Auto Scaling Group. You are exposing this application through an Application Load Balancer. Both the EC2 instances and the ALB are deployed on a VPC with the following CIDR 192.168.0.0/18. How do you configure the EC2 instances' security group to ensure only the ALB can access them on port 80?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F90q6y44o4xoaijwe5434.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F90q6y44o4xoaijwe5434.png" alt=" " width="786" height="272"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer (3):&lt;/strong&gt; By choosing "Add an Inbound Rule with port 80 and ALB's Security Group as the source," you ensured that only the Application Load Balancer can communicate with your EC2 instances, significantly enhancing your security posture. This aligns with your learning objective of understanding VPC traffic management and the importance of using security groups for precise access control.&lt;/p&gt;




&lt;p&gt;To stay informed on the latest technical insights and tutorials, connect with me on &lt;a href="https://medium.com/@issackpaul95" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/minoltan/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;, and &lt;a href="https://dev.to/minoltan"&gt;Dev.to&lt;/a&gt;. For professional inquiries or technical discussions, please contact me via &lt;a href="//issackpaul95@gmail.com"&gt;email&lt;/a&gt;. I welcome the opportunity to engage with fellow professionals and address any questions you may have. All blogs in this series will be optimized, fine-tuned, developed, and updated in a timely manner to reflect the latest AWS changes, exam updates, and real-world best practices.&lt;/p&gt;

</description>
      <category>vpc</category>
      <category>aws</category>
      <category>networking</category>
      <category>loadbalancer</category>
    </item>
    <item>
      <title>AWS Cloud Practitioner Questions | High availability &amp; Scalability</title>
      <dc:creator>Minoltan Issack</dc:creator>
      <pubDate>Wed, 11 Feb 2026 09:59:53 +0000</pubDate>
      <link>https://dev.to/minoltan/aws-cloud-practitioner-questions-high-availability-scalability-4oi2</link>
      <guid>https://dev.to/minoltan/aws-cloud-practitioner-questions-high-availability-scalability-4oi2</guid>
      <description>&lt;h2&gt;
  
  
  Question 1:
&lt;/h2&gt;

&lt;p&gt;Scaling an EC2 instance from r4.large to r4.4xlarge is called .....................&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff545vpoar2wyt6dnfhkm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff545vpoar2wyt6dnfhkm.png" alt=" " width="789" height="166"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Correct Answer: (2)&lt;/strong&gt; Scaling an EC2 instance from a smaller size (r4.large) to a larger one (r4.4xlarge) is an example of upgrading the resources of a single instance, which defines vertical scalability. This concept focuses on increasing the capacity of existing hardware rather than adding more instances.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 2:
&lt;/h2&gt;

&lt;p&gt;Running an application on an Auto Scaling Group that scales the number of EC2 instances in and out is called .....................&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuoifsc1lgo3cokl9wurn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuoifsc1lgo3cokl9wurn.png" alt=" " width="789" height="155"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Correct Answer: (1)&lt;/strong&gt; Running an application on an Auto Scaling Group involves adding or removing instances to handle changes in demand, which perfectly exemplifies the concept of horizontally scaling by increasing capacity through multiple instances rather than upgrading a single instance's resources.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 3:
&lt;/h2&gt;

&lt;p&gt;Elastic Load Balancers provide a .......................&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffdp850q37qzejlfknwkg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffdp850q37qzejlfknwkg.png" alt=" " width="788" height="212"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Correct Answer: (2)&lt;/strong&gt; Elastic Load Balancers provide a constant endpoint for your application, allowing you to manage changes in the underlying infrastructure without affecting how your users connect to your services. This ensures reliability and accessibility, aligning with best practices in application scalability.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 4:
&lt;/h2&gt;

&lt;p&gt;You are running a website on 10 EC2 instances fronted by an Elastic Load Balancer. Your users are complaining about the fact that the website always asks them to re-authenticate when they are moving between website pages. You are puzzled because it's working just fine on your machine and in the Dev environment with 1 EC2 instance. What could be the reason?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7otbmofguqeo7rkd5vdh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7otbmofguqeo7rkd5vdh.png" alt=" " width="788" height="219"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Correct Answer: (3)&lt;/strong&gt; Sticky Sessions enabled on the Elastic Load Balancer, user requests may be routed to different EC2 instances, causing loss of session data and prompting re-authentication. This feature ensures that users are consistently directed to the same instance, maintaining their session state as they navigate the website.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 5:
&lt;/h2&gt;

&lt;p&gt;You are using an Application Load Balancer to distribute traffic to your website hosted on EC2 instances. It turns out that your website only sees traffic coming from private IPv4 addresses which are in fact your Application Load Balancer's IP addresses. What should you do to get the IP address of clients connected to your website?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fypa1w6hgto8c3u3aivpw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fypa1w6hgto8c3u3aivpw.png" alt=" " width="787" height="290"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Correct Answer: (2)&lt;/strong&gt; To get the client IP address from the X-Forwarded-For header" is correct because the Application Load Balancer (ALB) uses this header to forward the original client's IP address to your EC2 instances, enabling accurate tracking of user traffic. This capability is essential for effective logging, analytics, and security measures on your site.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 6:
&lt;/h2&gt;

&lt;p&gt;You hosted an application on a set of EC2 instances fronted by an Elastic Load Balancer. A week later, users begin complaining that sometimes the application just doesn't work. You investigate the issue and found that some EC2 instances crash from time to time. What should you do to protect users from connecting to the EC2 instances that are crashing?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnznpdr19tznp4gmdrypv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnznpdr19tznp4gmdrypv.png" alt=" " width="793" height="263"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Correct Answer: (1)&lt;/strong&gt; This feature allows the Elastic Load Balancer to automatically monitor the health of your EC2 instances. By doing so, it prevents routing traffic to any instances that are unhealthy or crashed, ensuring a better experience for your users.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 7:
&lt;/h2&gt;

&lt;p&gt;You are working as a Solutions Architect for a company and you are required to design an architecture for a high-performance, low-latency application that will receive millions of requests per second. Which type of Elastic Load Balancer should you choose?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fci3n842rlrcc5qpjtcfs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fci3n842rlrcc5qpjtcfs.png" alt=" " width="778" height="146"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Correct Answer: (2)&lt;/strong&gt; It is designed to handle millions of requests per second, delivering the highest performance and lowest latency, making it ideal for high-performance applications. This choice aligns with the objective of optimizing application efficiency in demanding environments.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 8:
&lt;/h2&gt;

&lt;p&gt;Application Load Balancers support the following protocols, EXCEPT:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7frpkhwulh5706ruam9v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7frpkhwulh5706ruam9v.png" alt=" " width="785" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Correct Answer: (3)&lt;/strong&gt; Application Load Balancers are specifically designed to support application-layer protocols such as HTTP, HTTPS, and WebSocket, but do not support transport-layer protocols like TCP. This distinction is crucial for understanding how different load balancers operate based on the protocols they manage.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 9:
&lt;/h2&gt;

&lt;p&gt;Application Load Balancers can route traffic to different Target Groups based on the following, EXCEPT:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frxkz79jxh9zvu9n5c234.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frxkz79jxh9zvu9n5c234.png" alt=" " width="785" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Correct Answer: (1)&lt;/strong&gt; Application Load Balancers do not route traffic based on geographic location; instead, they can route based on criteria like URL Path and Hostname. This distinction helps clarify how ALBs function in managing traffic efficiently.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 10:
&lt;/h2&gt;

&lt;p&gt;Registered targets in a Target Groups for an Application Load Balancer can be one of the following, EXCEPT:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnn2xjo94tkwmhxdj0yl5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnn2xjo94tkwmhxdj0yl5.png" alt=" " width="785" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Correct Answer: (2)&lt;/strong&gt; Registered targets in an Application Load Balancer's Target Groups can only include EC2 Instances, Private IP Addresses, and Lambda Functions, but not other load balancers. This distinction highlights the specific roles each service plays within the AWS ecosystem.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 11:
&lt;/h2&gt;

&lt;p&gt;For compliance purposes, you would like to expose a fixed static IP address to your end-users so that they can write firewall rules that will be stable and approved by regulators. What type of Elastic Load Balancer would you choose?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fel72yyzbq1bnrenrivpt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fel72yyzbq1bnrenrivpt.png" alt=" " width="779" height="150"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Correct Answer: (2)&lt;/strong&gt; It allows you to attach an Elastic IP address, providing a stable and fixed static IP for compliance purposes, which is essential for your end-users. This capability makes it an ideal choice for ensuring consistency in firewall rules and regulatory approval.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 12:
&lt;/h2&gt;

&lt;p&gt;You want to create a custom application-based cookie in your Application Load Balancer. Which of the following you can use as a cookie name?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv8qg0892xbey4wgh698a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv8qg0892xbey4wgh698a.png" alt=" " width="795" height="285"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Correct Answer: (2)&lt;/strong&gt; it is a valid cookie name you can define for your custom application-based cookies in an Application Load Balancer, while the other options are reserved names used by AWS. This distinction helps ensure you create custom cookies effectively for managing user sessions in your application.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 13:
&lt;/h2&gt;

&lt;p&gt;You have a Network Load Balancer that distributes traffic across a set of EC2 instances in us-east-1. You have 2 EC2 instances in us-east-1b AZ and 5 EC2 instances in us-east-1e AZ. You have noticed that the CPU utilization is higher in the EC2 instances in us-east-1b AZ. After more investigation, you noticed that the traffic is equally distributed across the two AZs. How would you solve this problem?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fla95nor3tjb6jqxcr3kk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fla95nor3tjb6jqxcr3kk.png" alt=" " width="783" height="278"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Correct Answer: (1)&lt;/strong&gt; It ensures that traffic is distributed evenly across all your EC2 instances in different Availability Zones, helping to balance the CPU utilization among them. This effectiveness directly addresses the issue of uneven resource usage in your load-balanced environment.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 14:
&lt;/h2&gt;

&lt;p&gt;Which feature in both Application Load Balancers and Network Load Balancers allows you to load multiple SSL certificates on one listener?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdje8mbjbnctenzz0k2qu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdje8mbjbnctenzz0k2qu.png" alt=" " width="783" height="278"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Correct Answer: (2)&lt;/strong&gt; It is the feature that allows multiple SSL certificates to be bound to a single listener in both Application Load Balancers and Network Load Balancers. This capability enables you to host multiple secure domains on the same IP address, making it efficient and cost-effective for managing SSL certificates.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 15:
&lt;/h2&gt;

&lt;p&gt;You have an Application Load Balancer that is configured to redirect traffic to 3 Target Groups based on the following hostnames: users.example.com, api.external.example.com, and checkout.example.com. You would like to configure HTTPS for each of these hostnames. How do you configure the ALB to make this work?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkdndnnsx3kjt8txjcrqt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkdndnnsx3kjt8txjcrqt.png" alt=" " width="784" height="216"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Correct Answer: (3)&lt;/strong&gt; SNI allows you to assign multiple SSL certificates to different hostnames on the same Application Load Balancer listener, making it possible to securely configure HTTPS for all your specified domains efficiently. This aligns with your learning objective of understanding how to manage SSL certificates in a load-balanced environment.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 16:
&lt;/h2&gt;

&lt;p&gt;You have an application hosted on a set of EC2 instances managed by an Auto Scaling Group that you configured both desired and maximum capacity to 3. Also, you have created a CloudWatch Alarm that is configured to scale out your ASG when CPU Utilization reaches 60%. Your application suddenly received huge traffic and is now running at 80% CPU Utilization. What will happen?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl4wkuriahi8e1ju2r098.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl4wkuriahi8e1ju2r098.png" alt=" " width="784" height="216"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Correct Answer: (1)&lt;/strong&gt; The maximum capacity of your Auto Scaling Group is set to 3, which means it cannot scale beyond this limit regardless of the increased CPU utilization. This reinforces your understanding of Auto Scaling Group configurations and their constraints.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 17:
&lt;/h2&gt;

&lt;p&gt;You have an Auto Scaling Group fronted by an Application Load Balancer. You have configured the ASG to use ALB Health Checks, then one EC2 instance has just been reported unhealthy. What will happen to the EC2 instance?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7rzqxbeuddnojsa23gau.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7rzqxbeuddnojsa23gau.png" alt=" " width="784" height="216"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Correct Answer: (3)&lt;/strong&gt; Auto Scaling Group (ASG) uses Application Load Balancer (ALB) health checks to monitor instance health. When an instance is marked unhealthy by the ALB, the ASG terminates it and launches a new instance to maintain the desired capacity and reliability.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 18:
&lt;/h2&gt;

&lt;p&gt;Your boss asked you to scale your Auto Scaling Group based on the number of requests per minute your application makes to your database. What should you do?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3eiwvmnhq0ig9wi2ne3p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3eiwvmnhq0ig9wi2ne3p.png" alt=" " width="785" height="235"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Correct Answer: (1)&lt;/strong&gt; Standard CloudWatch metrics do not capture requests per minute for database connections. This approach allows you to effectively monitor your application's needs and scale the Auto Scaling Group accordingly, aligning with your objective of understanding dynamic scaling based on application performance.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 19:
&lt;/h2&gt;

&lt;p&gt;An application is deployed with an Application Load Balancer and an Auto Scaling Group. Currently, you manually scale the ASG and you would like to define a Scaling Policy that will ensure the average number of connections to your EC2 instances is around 1000. Which Scaling Policy should you use?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F08sgrz929a8m20s641do.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F08sgrz929a8m20s641do.png" alt=" " width="785" height="289"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Correct Answer: (3)&lt;/strong&gt; It allows you to automatically adjust the number of EC2 instances in your Auto Scaling Group to maintain a specific metric, such as the average number of connections, close to your target of 1000. This approach effectively simplifies scaling based on real-time performance metrics, aligning directly with your objective of automating resource management.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 20:
&lt;/h2&gt;

&lt;p&gt;You have an ASG and a Network Load Balancer. The application on your ASG supports the HTTP protocol and is integrated with the Load Balancer health checks. You are currently using the TCP health checks. You would like to migrate to using HTTP health checks, what do you do?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F346n7hpoyey71b2xwxua.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F346n7hpoyey71b2xwxua.png" alt=" " width="786" height="139"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Correct Answer: (2)&lt;/strong&gt; The Network Load Balancer (NLB) is capable of using HTTP health checks, which are more tailored for applications supporting the HTTP protocol. This ensures more accurate monitoring of application availability and performance.&lt;/p&gt;




&lt;h2&gt;
  
  
  Question 21:
&lt;/h2&gt;

&lt;p&gt;You have a website hosted in EC2 instances in an Auto Scaling Group fronted by an Application Load Balancer. Currently, the website is served over HTTP, and you have been tasked to configure it to use HTTPS. You have created a certificate in ACM and attached it to the Application Load Balancer. What you can do to force users to access the website using HTTPS instead of HTTP?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl5lxvv5dblbivtqjucfv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl5lxvv5dblbivtqjucfv.png" alt=" " width="793" height="211"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Correct Answer: (2)&lt;/strong&gt; By configuring the Application Load Balancer to redirect HTTP to HTTPS, you ensure that all traffic to your website is securely encrypted, enhancing user privacy and site security. This action directly meets the learning objective of effectively managing web application traffic and implementing security best practices within AWS environments.&lt;/p&gt;




&lt;p&gt;To stay informed on the latest technical insights and tutorials, connect with me on &lt;a href="https://medium.com/@issackpaul95" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/minoltan/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;, and &lt;a href="https://dev.to/minoltan"&gt;Dev.to&lt;/a&gt;. For professional inquiries or technical discussions, please contact me via &lt;a href="//issackpaul95@gmail.com"&gt;email&lt;/a&gt;. I welcome the opportunity to engage with fellow professionals and address any questions you may have. All blogs in this series will be optimized, fine-tuned, developed, and updated in a timely manner to reflect the latest AWS changes, exam updates, and real-world best practices.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloudpractitioner</category>
      <category>elb</category>
      <category>scalability</category>
    </item>
    <item>
      <title>AWS Use Cases | Enhanced Streak System for Game Portal with Leaderboards &amp; Rewards</title>
      <dc:creator>Minoltan Issack</dc:creator>
      <pubDate>Mon, 01 Dec 2025 17:04:50 +0000</pubDate>
      <link>https://dev.to/minoltan/aws-use-cases-enhanced-streak-system-for-game-portal-with-leaderboards-rewards-17p0</link>
      <guid>https://dev.to/minoltan/aws-use-cases-enhanced-streak-system-for-game-portal-with-leaderboards-rewards-17p0</guid>
      <description>&lt;h2&gt;
  
  
  Introduction to Streaks
&lt;/h2&gt;

&lt;p&gt;A streak is a consecutive count of days (or actions) a user performs a specific activity without breaking the chain. Streaks are commonly used in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Habit-tracking apps (e.g., Duolingo, Headspace)&lt;/li&gt;
&lt;li&gt;Gaming (daily login rewards, consecutive wins)&lt;/li&gt;
&lt;li&gt;Fitness apps (workout consistency)&lt;/li&gt;
&lt;li&gt;E-learning platforms (daily learning goals)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  How AWS Helps Implement Streaks
&lt;/h2&gt;

&lt;p&gt;AWS provides serverless and scalable solutions to track streaks efficiently:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AWS Lambda → Runs streak logic (increment, reset, reward checks) DynamoDB → Stores user streak data (last activity, current streak count)&lt;/li&gt;
&lt;li&gt;API Gateway → Exposes APIs for frontend (web/mobile apps)&lt;/li&gt;
&lt;li&gt;Amazon Cognito (Optional) → Handles user authentication&lt;/li&gt;
&lt;li&gt;AWS CDK → Easy Deployment&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Use Cases for Streaks &amp;amp; Implementation Steps
&lt;/h3&gt;

&lt;h3&gt;
  
  
  1. Daily Login Streaks (Gaming/Fitness Apps)
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Goal:&lt;/strong&gt; Reward users for logging in daily.&lt;/p&gt;

&lt;h3&gt;
  
  
  Implementation Steps:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Set Up DynamoDB Table&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Table: UserStreak&lt;/li&gt;
&lt;li&gt;Partition Key: userId (String)&lt;/li&gt;
&lt;li&gt;Sort Key: streakType&lt;/li&gt;
&lt;li&gt;Attributes: currentStreak, lastLogin, longestStreak&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Create streakTrack Lambda Function&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Checks if the user logged in today → skip&lt;/li&gt;
&lt;li&gt;If logged in yesterday → increment streak&lt;/li&gt;
&lt;li&gt;If missed a day → reset streak
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { UpdateItemCommand, GetItemCommand } from "@aws-sdk/client-dynamodb";
import { marshall, unmarshall } from "@aws-sdk/util-dynamodb";
import { ddbClient } from "./client";

const TABLE_NAME = process.env.STREAK_TABLE_NAME;
const MAX_FREEZE_DAYS = 2;

export const handler = async (event) =&amp;gt; {
  try {
    const { userId } = JSON.parse(event.body);
    if (!userId) {
      return { statusCode: 400, body: JSON.stringify({ error: "userId is required" }) };
    }

    const today = new Date().toISOString().split("T")[0];
    const yesterday = new Date();
    yesterday.setDate(yesterday.getDate() - 1);
    const yesterdayStr = yesterday.toISOString().split("T")[0];

    // ✅ Get current streak and freeze days
    const { currentStreak, lastLogin, freezeDaysRemaining } = await getUserData(userId);

    // ✅ If already logged in today
    if (lastLogin === today) {
      return success({ message: "Already logged in today", currentStreak, freezeDaysRemaining });
    }

    let newStreak = 1;
    let newFreeze = freezeDaysRemaining;

    // ✅ Case 1: Consecutive login (yesterday)
    if (lastLogin === yesterdayStr) {
      newStreak = currentStreak + 1;
    } 
    // ✅ Case 2: Missed days but has freeze days → use one
    else if (freezeDaysRemaining &amp;gt; 0) {
      newStreak = currentStreak; // keep streak intact
      newFreeze = freezeDaysRemaining - 1; // use one freeze day
    }

    // ✅ Update DB
    await updateUserData(userId, today, newStreak, newFreeze);

    return success({
      message: freezeDaysRemaining &amp;gt; 0 &amp;amp;&amp;amp; lastLogin !== yesterdayStr ? 
        "Missed day covered by a freeze day" : "Streak updated",
      currentStreak: newStreak,
      freezeDaysRemaining: newFreeze
    });

  } catch (err) {
    console.error("Error:", err);
    return { statusCode: 500, body: JSON.stringify({ error: err.message }) };
  }
};

// 🔹 Get user streak &amp;amp; freeze data
async function getUserData(userId) {
  const { Item } = await ddbClient.send(new GetItemCommand({
    TableName: TABLE_NAME,
    Key: marshall({ userId, streakType: "daily" }), // using same PK as freeze
  }));

  if (!Item) return { currentStreak: 0, lastLogin: null, freezeDaysRemaining: 0 };

  const data = unmarshall(Item);
  return {
    currentStreak: data.currentStreak || 0,
    lastLogin: data.lastLogin || null,
    freezeDaysRemaining: data.freezeDaysRemaining || 0
  };
}

// 🔹 Update streak and freeze count
async function updateUserData(userId, today, newStreak, newFreeze) {
  await ddbClient.send(new UpdateItemCommand({
    TableName: TABLE_NAME,
    Key: marshall({ userId, streakType: "daily" }),
    UpdateExpression: "SET currentStreak = :cs, lastLogin = :dt, freezeDaysRemaining = :fd",
    ExpressionAttributeValues: marshall({
      ":cs": newStreak,
      ":dt": today,
      ":fd": newFreeze
    })
  }));
}

// 🔹 Helper success response
function success(body) {
  return {
    statusCode: 200,
    headers: { "Access-Control-Allow-Origin": "*" },
    body: JSON.stringify(body)
  };
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3.Create streakFreeze Lambda Function&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { GetItemCommand, UpdateItemCommand } from "@aws-sdk/client-dynamodb";
import { marshall, unmarshall } from "@aws-sdk/util-dynamodb";
import { ddbClient } from "./client.js";

const STREAK_TABLE_NAME = process.env.STREAK_TABLE_NAME;

export const handler = async (event) =&amp;gt; {
    try {
        const { userId } = await validateAndParseInput(event.body);

        const { freezeDaysRemaining, itemExists } = await getCurrentFreezeDays(userId);

        if (freezeDaysRemaining &amp;gt;= 2) {
            return formatErrorResponse(400, "Maximum freeze days (2) already reached");
        }

        const updatedFreeze = await updateFreezeDays(userId, freezeDaysRemaining, itemExists);

        return {
            statusCode: 200,
            headers: { "Access-Control-Allow-Origin": "*" },
            body: JSON.stringify({
                status: "success",
                freezeDaysRemaining: updatedFreeze
            })
        };

    } catch (error) {
        console.error("handler: ", error);
        return formatErrorResponse(400, error.message);
    }
};

async function validateAndParseInput(body) {
    const payload = JSON.parse(body);
    const { userId } = payload;

    if (!userId) {
        throw new Error("Missing required field: userId");
    }

    return { userId };
}

async function getCurrentFreezeDays(userId) {
    const { Item } = await ddbClient.send(new GetItemCommand({
        TableName: STREAK_TABLE_NAME,
        Key: marshall({ userId, streakType: "daily" }),
        ProjectionExpression: "freezeDaysRemaining"
    }));

    return {
        freezeDaysRemaining: Item ? unmarshall(Item).freezeDaysRemaining || 0 : 0,
        itemExists: !!Item
    };
}

async function updateFreezeDays(userId, currentFreezeDays, itemExists) {
    const updateParams = {
        TableName: STREAK_TABLE_NAME,
        Key: marshall({ userId, streakType: "daily" }),
        UpdateExpression: "SET freezeDaysRemaining = :newVal",
        ExpressionAttributeValues: marshall({ ":newVal": currentFreezeDays + 1 }),
        ReturnValues: "ALL_NEW"
    };

    if (!itemExists) {
        // For new records, set additional default values
        updateParams.UpdateExpression = "SET freezeDaysRemaining = :newVal, currentStreak = :zero, longestStreak = :zero, lastActivity = :empty";
        updateParams.ExpressionAttributeValues = marshall({
            ":newVal": 1,
            ":zero": 0,
            ":empty": ""
        });
    }

    const { Attributes } = await ddbClient.send(new UpdateItemCommand(updateParams));
    return unmarshall(Attributes).freezeDaysRemaining;
}

function formatErrorResponse(statusCode, message) {
    return {
        statusCode,
        headers: { "Access-Control-Allow-Origin": "*" },
        body: message
    };
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Set Up API Gateway&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;POST /streak/track → Triggers Lambda&lt;/li&gt;
&lt;li&gt;POST /streak/freeze&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;5. Frontend Integration&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Call API when user logs in&lt;/li&gt;
&lt;li&gt;Display streak count&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Example Explanation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Initial Conditions
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;currentStreak = 3&lt;/li&gt;
&lt;li&gt;freezeDaysRemaining = 1&lt;/li&gt;
&lt;li&gt;lastLogin = 2025-07-28&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;✅ Case 1: User logs in on 2025–07–29 (yesterday was last login)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lambda receives event: { "userId": "1134" }&lt;/li&gt;
&lt;li&gt;It checks lastLogin === yesterday (2025-07-28) → ✅ yes.&lt;/li&gt;
&lt;li&gt;No freeze day is used.&lt;/li&gt;
&lt;li&gt;currentStreak = 4, freezeDaysRemaining = 1&lt;/li&gt;
&lt;li&gt;Response:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "message": "Streak updated",
  "currentStreak": 4,
  "freezeDaysRemaining": 1
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;✅ Case 2: User skips 2025–07–29, logs in on 2025–07–30&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Missed one day (2025–07–29)&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Lambda checks: lastLogin = 2025-07-28, today = 2025-07-30&lt;/li&gt;
&lt;li&gt;lastLogin !== yesterday, so normally streak would reset.&lt;/li&gt;
&lt;li&gt;But freezeDaysRemaining &amp;gt; 0 → ✅ use one freeze.&lt;/li&gt;
&lt;li&gt;currentStreak stays 3, freezeDaysRemaining = 0&lt;/li&gt;
&lt;li&gt;Response:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "message": "Missed day covered by a freeze day",
  "currentStreak": 3,
  "freezeDaysRemaining": 0
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;✅ Case 3: User skips 2025–07–31, logs in on 2025–08–01&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Missed two consecutive days and has no freeze left&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Lambda checks: lastLogin = 2025-07-28, today = 2025-08-01&lt;/li&gt;
&lt;li&gt;lastLogin !== yesterday, and freezeDaysRemaining = 0&lt;/li&gt;
&lt;li&gt;No freeze day available → streak resets to 1&lt;/li&gt;
&lt;li&gt;currentStreak = 1, freezeDaysRemaining = 0&lt;/li&gt;
&lt;li&gt;Response:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "message": "Streak updated",
  "currentStreak": 1,
  "freezeDaysRemaining": 0
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;✅ Case 4: User later earns a freeze day (via freeze API)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;User calls /streak/freeze with { "userId": "1134", "action": "add" }&lt;/li&gt;
&lt;li&gt;Freeze Lambda increments freezeDaysRemaining but caps it at 2.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "status": "success",
  "freezeDaysRemaining": 1
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;✅ Case 5: User tries to manually use a freeze&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Calls /streak/freeze with { "userId": "1134", "action": "use" }&lt;/li&gt;
&lt;li&gt;Lambda checks: freezeDaysRemaining &amp;gt; 0 → ✅ yes, decreases by 1.&lt;/li&gt;
&lt;li&gt;If already 0, returns error:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{ "error": "No freeze days remaining" }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;🔥 How This Works Together&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Streak Lambda&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Auto-consumes freeze only when needed (user missed a day).&lt;/li&gt;
&lt;li&gt;Never lets streak reset unnecessarily if freeze is available.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Freeze Lambda&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adds freeze days when rewarded.&lt;/li&gt;
&lt;li&gt;Allows manual usage (optional) if needed.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. Consecutive Wins Streak (Gaming Leaderboards)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Goal:&lt;/strong&gt; Track players’ winning streaks and reward top performers.&lt;br&gt;
&lt;strong&gt;Implementation Steps:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. DynamoDB Table&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;UserStreak&lt;/li&gt;
&lt;li&gt;PK: userId&lt;/li&gt;
&lt;li&gt;Sort Key: streakType&lt;/li&gt;
&lt;li&gt;Attributes: currentWinStreak, maxWinStreak, lastWinDate&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Lambda Function&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After a game ends, check if the player won &lt;/li&gt;
&lt;li&gt;Increment streak if last game was a win&lt;/li&gt;
&lt;li&gt;Reset if lost
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { GetItemCommand, UpdateItemCommand } from "@aws-sdk/client-dynamodb";
import { marshall, unmarshall } from "@aws-sdk/util-dynamodb";
import { ddbClient } from "./client.js";

const TABLE_NAME = process.env.STREAK_TABLE_NAME;

export const handler = async (event) =&amp;gt; {
  try {
    const { userId, won } = JSON.parse(event.body);

    if (!userId || won === undefined) {
      return formatResponse(400, { error: "userId and won (true/false) are required" });
    }

    const today = new Date().toISOString().split("T")[0];
    const yesterday = new Date();
    yesterday.setDate(yesterday.getDate() - 1);
    const yesterdayStr = yesterday.toISOString().split("T")[0];

    // Get current game streak data
    const { currentWinStreak, maxWinStreak, lastWinDate } = await getGameStreak(userId);

    let newWinStreak = currentWinStreak;
    let newMaxWinStreak = maxWinStreak;

    if (won) {
      // If last game was yesterday, continue streak, else reset to 1
      newWinStreak = lastWinDate === yesterdayStr ? currentWinStreak + 1 : 1;

      // Update max streak
      if (newWinStreak &amp;gt; maxWinStreak) {
        newMaxWinStreak = newWinStreak;
      }

      // Update DynamoDB
      await updateGameStreak(userId, today, newWinStreak, newMaxWinStreak);
    } else {
      // Player lost → reset current streak
      newWinStreak = 0;
      await updateGameStreak(userId, today, newWinStreak, maxWinStreak);
    }

    return formatResponse(200, {
      message: won ? "Game won streak updated" : "Game lost, streak reset",
      currentWinStreak: newWinStreak,
      maxWinStreak: newMaxWinStreak
    });

  } catch (err) {
    console.error("Error updating game streak:", err);
    return formatResponse(500, { error: err.message });
  }
};

// 🔹 Get current streak from DynamoDB
async function getGameStreak(userId) {
  const { Item } = await ddbClient.send(new GetItemCommand({
    TableName: TABLE_NAME,
    Key: marshall({ userId, streakType: "game" }),
    ProjectionExpression: "currentWinStreak, maxWinStreak, lastWinDate"
  }));

  if (!Item) {
    return { currentWinStreak: 0, maxWinStreak: 0, lastWinDate: null };
  }

  const data = unmarshall(Item);
  return {
    currentWinStreak: data.currentWinStreak || 0,
    maxWinStreak: data.maxWinStreak || 0,
    lastWinDate: data.lastWinDate || null
  };
}

// 🔹 Update streak in DynamoDB
async function updateGameStreak(userId, today, currentWinStreak, maxWinStreak) {
  await ddbClient.send(new UpdateItemCommand({
    TableName: TABLE_NAME,
    Key: marshall({ userId, streakType: "game" }),
    UpdateExpression: "SET currentWinStreak = :cws, maxWinStreak = :mws, lastWinDate = :ld",
    ExpressionAttributeValues: marshall({
      ":cws": currentWinStreak,
      ":mws": maxWinStreak,
      ":ld": today
    }),
    ReturnValues: "UPDATED_NEW"
  }));
}

// 🔹 Helper response formatter
function formatResponse(statusCode, body) {
  return {
    statusCode,
    headers: { "Access-Control-Allow-Origin": "*" },
    body: JSON.stringify(body)
  };
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;✅ Example Flow&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;🟢 Case 1: User wins consecutive games&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;lastWinDate: 2025–07–30&lt;/li&gt;
&lt;li&gt;today: 2025–07–31&lt;/li&gt;
&lt;li&gt;Result: currentWinStreak = 3, maxWinStreak = 3&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;🔴 Case 2: User loses&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;won: false&lt;/li&gt;
&lt;li&gt;Result: currentWinStreak = 0, maxWinStreak stays as it was.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Streaks are a powerful engagement tool, and AWS makes implementation easy:&lt;br&gt;
&lt;strong&gt;✅ Serverless &amp;amp; Scalable (Lambda + DynamoDB)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;✅ Real-Time Updates (API Gateway)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;✅ Reward Integration (Lambda + DynamoDB)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;✅ Cost-Effective (Pay-per-use pricing)&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Next Steps:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Start with a basic &lt;strong&gt;daily login streak&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Expand to &lt;strong&gt;game win streaks&lt;/strong&gt; and &lt;strong&gt;habit tracking&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Add &lt;strong&gt;rewards &amp;amp; leaderboards&lt;/strong&gt; for higher engagement&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Advance on Streaks
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Milestone Offers (Risk/Reward)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When users hit milestones (e.g., 7 days), give them a choice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Option A:&lt;/strong&gt; Continue safely (streak grows normally)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Option B:&lt;/strong&gt; Gamble (“Break your streak now for 3x rewards!”)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Smart Streak Logic&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tracks timezone-aware daily activity&lt;/li&gt;
&lt;li&gt;Handles edge cases (midnight checks, server delays)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Leaderboard Logic&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add reward for higher in the leaderboard&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;For CDK Implementation — &lt;a href="https://github.com/minoltan/aws-usecases/tree/main/streak-system" rel="noopener noreferrer"&gt;My Reposiotry&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;To stay informed on the latest technical insights and tutorials, connect with me on &lt;a href="https://medium.com/@issackpaul95" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;, &lt;a href="https://www.linkedin.com/in/minoltan/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; and &lt;a href="https://dev.to/minoltan"&gt;Dev.to&lt;/a&gt;. For professional inquiries or technical discussions, please contact me via &lt;a href="http://issackpaul95@gmail.com/" rel="noopener noreferrer"&gt;email&lt;/a&gt;. I welcome the opportunity to engage with fellow professionals and address any questions you may have.&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>serverless</category>
      <category>aws</category>
      <category>architecture</category>
    </item>
  </channel>
</rss>
