<?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: Jhon Robert Quintero Hurtado</title>
    <description>The latest articles on DEV Community by Jhon Robert Quintero Hurtado (@jrquinte).</description>
    <link>https://dev.to/jrquinte</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1490259%2F2881a962-5053-4797-b441-fb89e1c2a667.jpeg</url>
      <title>DEV Community: Jhon Robert Quintero Hurtado</title>
      <link>https://dev.to/jrquinte</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jrquinte"/>
    <language>en</language>
    <item>
      <title>How I Passed the AWS Certified Generative AI Developer – Professional Exam: Real Questions, Real Patterns</title>
      <dc:creator>Jhon Robert Quintero Hurtado</dc:creator>
      <pubDate>Wed, 05 Aug 2026 14:05:52 +0000</pubDate>
      <link>https://dev.to/aws-builders/how-i-passed-the-aws-certified-generative-ai-developer-professional-exam-real-questions-real-4n81</link>
      <guid>https://dev.to/aws-builders/how-i-passed-the-aws-certified-generative-ai-developer-professional-exam-real-questions-real-4n81</guid>
      <description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;A few days ago, I passed the &lt;a href="https://aws.amazon.com/certification/certified-generative-ai-developer-professional/" rel="noreferrer noopener"&gt;&lt;b&gt;&lt;strong&gt;AWS Certified Generative AI Developer – Professional (AIP-C01)&lt;/strong&gt;&lt;/b&gt;&lt;/a&gt; exam. I want to share what I actually learned during preparation — not just a list of topics, but the reasoning patterns that this exam really tests.&lt;/p&gt;

&lt;p&gt;I am a Technical Architect and an AWS Community Builder. I also teach cloud topics at universities in Colombia. So I came into this exam with both practical experience and teaching experience. But this exam still surprised me several times. That is exactly why I am writing this article.&lt;/p&gt;





&lt;h2&gt;What Kind of Exam Is This?&lt;/h2&gt;

&lt;p&gt;This is not a memorization exam. You will not pass by listing Amazon Bedrock services. The exam tests whether you can reason about &lt;b&gt;&lt;strong&gt;trade-offs&lt;/strong&gt;&lt;/b&gt; in real architectures.&lt;/p&gt;

&lt;p&gt;Almost every question has a specific constraint that eliminates most of the options. Your job is to find that constraint first.&lt;/p&gt;

&lt;p&gt;The question types I encountered most often:&lt;/p&gt;

&lt;ul&gt;
    &lt;li value="1"&gt;"Which solution meets these requirements with the &lt;b&gt;&lt;strong&gt;LEAST operational overhead&lt;/strong&gt;&lt;/b&gt;?"&lt;/li&gt;
    &lt;li value="2"&gt;"Which solution will meet these requirements?" (with a hidden technical trap in the wrong answers)&lt;/li&gt;
    &lt;li value="3"&gt;"Which &lt;b&gt;&lt;strong&gt;combination&lt;/strong&gt;&lt;/b&gt; of steps will meet these requirements? (Choose two.)"&lt;/li&gt;
&lt;/ul&gt;





&lt;h2&gt;What the Exam Actually Covers&lt;/h2&gt;

&lt;p&gt;Before you build a study plan, it helps to know where the exam actually spends its questions.&lt;/p&gt;

&lt;h3&gt;Traditional Machine Learning: Almost Zero&lt;/h3&gt;

&lt;p&gt;If you have experience with classic ML, you might expect questions about confusion matrices, precision and recall, training pipelines, or feature engineering. I did not see any of that. Other candidates report the same thing. The exam is about &lt;b&gt;&lt;strong&gt;building AI applications with AWS services&lt;/strong&gt;&lt;/b&gt;, not about training ML models from scratch.&lt;/p&gt;

&lt;p&gt;Do not spend significant time reviewing traditional ML metrics or SageMaker training workflows. That time is better spent elsewhere.&lt;/p&gt;

&lt;h3&gt;RAG and Vector Search: Heavily Featured&lt;/h3&gt;

&lt;p&gt;This is the core of the exam. Almost every scenario involves Retrieval-Augmented Generation in some form. The exam tests:&lt;/p&gt;

&lt;ul&gt;
    &lt;li value="1"&gt;
&lt;b&gt;&lt;strong&gt;Chunking strategies&lt;/strong&gt;&lt;/b&gt; — fixed-size vs. semantic vs. hierarchical, and when each one is appropriate&lt;/li&gt;
    &lt;li value="2"&gt;
&lt;b&gt;&lt;strong&gt;Vector database selection&lt;/strong&gt;&lt;/b&gt; — when to use OpenSearch, pgvector on Aurora, or MemoryDB, and why scale matters for this decision&lt;/li&gt;
    &lt;li value="3"&gt;
&lt;b&gt;&lt;strong&gt;Document ingestion&lt;/strong&gt;&lt;/b&gt; — how to sync S3 content with Amazon Bedrock Knowledge Bases, and what happens when data changes frequently&lt;/li&gt;
    &lt;li value="4"&gt;
&lt;b&gt;&lt;strong&gt;Embedding model choice&lt;/strong&gt;&lt;/b&gt; — Amazon Titan Embeddings vs. other options and the operational trade-offs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you understand RAG deeply, you will recognize the right answer in a large portion of the exam questions.&lt;/p&gt;

&lt;h3&gt;Orchestration and Observability: Always Present&lt;/h3&gt;

&lt;p&gt;The "glue" services appear in nearly every architecture:&lt;/p&gt;

&lt;ul&gt;
    &lt;li value="1"&gt;
&lt;b&gt;&lt;strong&gt;AWS Step Functions&lt;/strong&gt;&lt;/b&gt; — how to orchestrate multi-step AI workflows, when to use Standard vs. Express, and how to build retry and fallback logic&lt;/li&gt;
    &lt;li value="2"&gt;
&lt;b&gt;&lt;strong&gt;AWS Lambda&lt;/strong&gt;&lt;/b&gt; — as a resolver, a pre-processing filter, or a bridge between services&lt;/li&gt;
    &lt;li value="3"&gt;
&lt;b&gt;&lt;strong&gt;Amazon OpenSearch Service&lt;/strong&gt;&lt;/b&gt; — for hybrid search (vector + keyword) and log analytics&lt;/li&gt;
    &lt;li value="4"&gt;
&lt;b&gt;&lt;strong&gt;Amazon CloudWatch&lt;/strong&gt;&lt;/b&gt; — for invocation metrics, custom metrics, anomaly detection, and alarms&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are not standalone questions. They appear inside complex scenarios where you must choose the right combination.&lt;/p&gt;





&lt;h2&gt;The Four Patterns That Repeat Constantly&lt;/h2&gt;

&lt;p&gt;After working through dozens of practice questions, I noticed that most of them test the same four ideas in different contexts.&lt;/p&gt;

&lt;h3&gt;1. Proactive vs. Reactive&lt;/h3&gt;

&lt;p&gt;This pattern appeared more than any other. The question gives you a system that needs to &lt;b&gt;&lt;strong&gt;prevent&lt;/strong&gt;&lt;/b&gt; something from happening, and the wrong answers only detect or react after it already happened.&lt;/p&gt;

&lt;p&gt;For example: a token management system that must "proactively alert when applications approach model-specific token limits." The correct answer estimates token usage &lt;b&gt;&lt;strong&gt;before&lt;/strong&gt;&lt;/b&gt; sending the request to Amazon Bedrock. Three of the four options fire only after a failure already occurred — after a request was rejected, after a call failed, or after a limit was exceeded.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;strong&gt;The rule:&lt;/strong&gt;&lt;/b&gt; If the requirement says "proactively," eliminate every option that reacts to failures.&lt;/p&gt;





&lt;h3&gt;2. Sequential vs. Parallel&lt;/h3&gt;

&lt;p&gt;When a question asks for performance under latency constraints, check whether the options process things one after another or at the same time.&lt;/p&gt;

&lt;p&gt;A real example: a system that processes 50 GB of call recordings and must finish within 4 hours. The correct solution uses AWS Step Functions with a &lt;b&gt;&lt;strong&gt;Distributed Map state&lt;/strong&gt;&lt;/b&gt;, which can run up to 10,000 parallel workflows over S3 objects. A Lambda-only solution would hit the 15-minute timeout. A sequential workflow would miss the 4-hour window.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;strong&gt;The rule:&lt;/strong&gt;&lt;/b&gt; Tight latency or throughput requirements almost always require parallelism, not just faster sequential processing.&lt;/p&gt;





&lt;h3&gt;3. The Right Tool for the Right Data Type&lt;/h3&gt;

&lt;p&gt;This one eliminated me on a few questions early in my preparation.&lt;/p&gt;

&lt;ul&gt;
    &lt;li value="1"&gt;
&lt;b&gt;&lt;strong&gt;Amazon Bedrock Knowledge Bases&lt;/strong&gt;&lt;/b&gt; is for &lt;b&gt;&lt;strong&gt;unstructured documents&lt;/strong&gt;&lt;/b&gt; (PDFs, text, HTML). It is not for relational data.&lt;/li&gt;
    &lt;li value="2"&gt;
&lt;b&gt;&lt;strong&gt;Text-to-SQL&lt;/strong&gt;&lt;/b&gt; is the right approach for &lt;b&gt;&lt;strong&gt;structured data in Amazon RDS&lt;/strong&gt;&lt;/b&gt;. You do not embed relational tables into a vector store.&lt;/li&gt;
    &lt;li value="3"&gt;
&lt;b&gt;&lt;strong&gt;IVFFlat&lt;/strong&gt;&lt;/b&gt; works for medium-to-large datasets. It cannot meaningfully partition a small dataset into clusters.&lt;/li&gt;
    &lt;li value="4"&gt;
&lt;b&gt;&lt;strong&gt;Flat algorithm&lt;/strong&gt;&lt;/b&gt; (exact brute-force search) is correct for small datasets where 100% recall matters more than search speed.&lt;/li&gt;
    &lt;li value="5"&gt;
&lt;b&gt;&lt;strong&gt;HNSW&lt;/strong&gt;&lt;/b&gt; is for large datasets where approximate search is acceptable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I was selecting OpenSearch for everything because I associated it with "vector search." But the exam cares about scale. For fewer than a million records, &lt;b&gt;&lt;strong&gt;Aurora Serverless with pgvector&lt;/strong&gt;&lt;/b&gt; is often the right answer because of lower operational overhead.&lt;/p&gt;





&lt;h3&gt;4. Least Operational Overhead — What It Actually Means&lt;/h3&gt;

&lt;p&gt;This phrase appears in nearly half the questions. I learned to read it as: &lt;b&gt;&lt;strong&gt;"Which solution adds the fewest services that you need to manage yourself?"&lt;/strong&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;The exam consistently penalizes options that:&lt;/p&gt;

&lt;ul&gt;
    &lt;li value="1"&gt;Require provisioning a cluster (OpenSearch, EMR, SageMaker endpoints)&lt;/li&gt;
    &lt;li value="2"&gt;Need Lambda functions to do something a managed service already does natively&lt;/li&gt;
    &lt;li value="3"&gt;Use EventBridge + custom code when Step Functions can orchestrate declaratively&lt;/li&gt;
    &lt;li value="4"&gt;Build a custom pipeline when Bedrock's RetrieveAndGenerate API already handles retrieval, generation, and citation in one call&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When I saw "least operational overhead," I immediately looked for fully managed, serverless options. That eliminated most wrong answers before I even read them carefully.&lt;/p&gt;





&lt;h2&gt;Where I Made Mistakes&lt;/h2&gt;

&lt;h3&gt;Confusing Audit Tools with Safety Tools&lt;/h3&gt;

&lt;p&gt;&lt;b&gt;&lt;strong&gt;AWS CloudTrail&lt;/strong&gt;&lt;/b&gt; records who called which API and when. It does NOT capture what content was blocked by a guardrail or why. If a question asks for "audit trails of all safety interventions," the answer is &lt;b&gt;&lt;strong&gt;Amazon CloudWatch with custom metrics&lt;/strong&gt;&lt;/b&gt;, not CloudTrail.&lt;/p&gt;

&lt;p&gt;I missed this distinction twice before it became obvious.&lt;/p&gt;





&lt;h3&gt;Thinking Step Functions Express Was Better for "Performance"&lt;/h3&gt;

&lt;p&gt;Express Workflows handle higher throughput than Standard Workflows. So when a question mentioned "thousands of concurrent users," I chose Express.&lt;/p&gt;

&lt;p&gt;But one question required a &lt;b&gt;&lt;strong&gt;Wait for Callback&lt;/strong&gt;&lt;/b&gt; pattern — the system pauses execution waiting for a human response, which could take minutes. Express Workflows have a 5-minute maximum duration. They cannot durably pause.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;strong&gt;Standard Workflows&lt;/strong&gt;&lt;/b&gt; support exactly-once execution, long durations, and Wait for Callback. The performance advantage of Express Workflows is irrelevant if the workflow needs to wait.&lt;/p&gt;





&lt;h3&gt;Selecting Architectures with Fabricated Features&lt;/h3&gt;

&lt;p&gt;Some wrong answers describe AWS features that do not exist.&lt;/p&gt;

&lt;p&gt;I found these in real practice questions:&lt;/p&gt;

&lt;ul&gt;
    &lt;li value="1"&gt;"S3 action nodes in Amazon Bedrock Flows" — Bedrock Flows has no native S3 nodes&lt;/li&gt;
    &lt;li value="2"&gt;"Amazon Bedrock Guardrails with token quota policies" — Guardrails enforces content safety, not token budgets&lt;/li&gt;
    &lt;li value="3"&gt;"Cross-Region guardrail replication" — not a real Bedrock feature&lt;/li&gt;
    &lt;li value="4"&gt;"CloudTrail distributed tracing" — CloudTrail is an audit log, not a tracing tool (AWS X-Ray is)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;b&gt;&lt;strong&gt;The rule:&lt;/strong&gt;&lt;/b&gt; If an option describes a service doing something that sounds slightly off, take a moment to verify whether that feature actually exists. The exam includes distractors that combine real services with invented capabilities.&lt;/p&gt;





&lt;h2&gt;The Service Boundaries You Must Know&lt;/h2&gt;

&lt;p&gt;Several questions came down to knowing what a service &lt;b&gt;&lt;strong&gt;cannot&lt;/strong&gt;&lt;/b&gt; do, not what it can do.&lt;/p&gt;

&lt;p&gt;Memorizing this table saved me at least five questions.&lt;/p&gt;





&lt;h2&gt;One Thing That Changed During Preparation&lt;/h2&gt;

&lt;p&gt;In November 2025, AWS announced that Amazon API Gateway &lt;b&gt;&lt;strong&gt;REST APIs&lt;/strong&gt;&lt;/b&gt; now support Lambda response streaming. Before this, streaming responses required Lambda Function URLs or other approaches.&lt;/p&gt;

&lt;p&gt;This matters because the exam now has questions where REST API is the correct answer specifically because of streaming support — and HTTP API is not supported for this.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;strong&gt;The lesson:&lt;/strong&gt;&lt;/b&gt; Check the announcement date of features if something in the answers seems inconsistent with what you learned before. The exam reflects the current state of AWS services.&lt;/p&gt;





&lt;h2&gt;How I Prepared&lt;/h2&gt;

&lt;p&gt;I combined several approaches, and the order in which I used them mattered.&lt;/p&gt;

&lt;h3&gt;Start with a Course for Breadth&lt;/h3&gt;

&lt;p&gt;Courses by &lt;a href="https://www.udemy.com/share/10eqfL/" rel="noreferrer noopener"&gt;&lt;b&gt;&lt;strong&gt;Stéphane Maarek&lt;/strong&gt;&lt;/b&gt; and &lt;b&gt;&lt;strong&gt;Frank Kane&lt;/strong&gt;&lt;/b&gt;&lt;/a&gt; on Udemy are commonly recommended in the AWS certification community, and for good reason. They give you a clear map of the service landscape and help you understand how the pieces connect.&lt;/p&gt;

&lt;p&gt;But candidates who rely only on a course tend to struggle with the harder scenario questions. The courses show you what services exist. The exam tests whether you know which one to use when two options both seem reasonable. For that, you need the documentation.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;strong&gt;My recommendation:&lt;/strong&gt;&lt;/b&gt; Use a course to build your mental model, then go deeper on the services that appear most frequently — Bedrock, Step Functions, OpenSearch, and Lambda.&lt;/p&gt;

&lt;h3&gt;Use AWS Skill Builder for Patterns, Not Just Practice&lt;/h3&gt;

&lt;p&gt;The official practice exams from &lt;a href="https://skillbuilder.aws/category/exam-prep/generative-ai-developer-professional-AIP-C01" rel="noreferrer noopener"&gt;&lt;b&gt;&lt;strong&gt;AWS Skill Builder&lt;/strong&gt;&lt;/b&gt;&lt;/a&gt; are worth doing, but not just to check your score. They are valuable because they show you the style of question the exam uses and the level of specificity the wrong answers have.&lt;/p&gt;

&lt;p&gt;The hands-on builder labs are also useful. Working with the Bedrock API directly — even simple calls — helps you understand what the service actually does vs. what sounds plausible in an answer option.&lt;/p&gt;

&lt;h3&gt;Use AI to Break Down Question Logic&lt;/h3&gt;

&lt;p&gt;Many candidates, including myself, used tools like &lt;b&gt;&lt;strong&gt;Claude or Gemini&lt;/strong&gt;&lt;/b&gt; to study more effectively. Not to get answers, but to understand reasoning.&lt;/p&gt;

&lt;p&gt;My approach was to paste a practice question and ask: "Why is this option wrong? What specific AWS limitation eliminates it?" This helped me identify service boundaries faster than reading documentation alone. When I got a question wrong, I used this to build a clear explanation that I could actually remember — not just the correct letter, but the technical reason.&lt;/p&gt;

&lt;p&gt;This matters more than it sounds. The exam has 75 questions in roughly three hours. You do not have time to reason from scratch on every one. You need internalized patterns.&lt;/p&gt;





&lt;h2&gt;Final Advice&lt;/h2&gt;

&lt;p&gt;If I had to summarize the exam preparation in three sentences:&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;strong&gt;Find the decisive constraint in each question before you evaluate the options.&lt;/strong&gt;&lt;/b&gt; Most questions have one requirement that eliminates two or three options immediately. The real comparison is between the one or two options that survive.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;strong&gt;Know what each AWS service cannot do.&lt;/strong&gt;&lt;/b&gt; The wrong answers are wrong because they use a real service for something it was not built for.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;strong&gt;"Least operational overhead" is not about simplicity — it is about how many things you have to manage yourself.&lt;/strong&gt;&lt;/b&gt; A solution with two fully managed services beats a solution with four services where one requires cluster management.&lt;/p&gt;

&lt;p&gt;The exam is not easy. But it is fair. If you understand the trade-offs, you will recognize the right answer even in a question you have never seen before.&lt;/p&gt;





&lt;p&gt;&lt;em&gt;If you found this useful or have questions about specific topics, feel free to connect with me. I am always happy to discuss AWS architecture. &lt;/em&gt;&lt;a href="https://www.linkedin.com/in/jrquinte/" rel="noreferrer noopener"&gt;&lt;em&gt;LinkedIn&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Related Post &lt;a href="https://analisys.co/2026/03/01/how-passed-aws-machine-learning-associate-exam-real-questions-real-lessons/" rel="noopener noreferrer"&gt;How I Passed the AWS Machine Learning Associate Exam: Real Questions, Real Lessons - Analisys.co&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How I Passed the AWS Machine Learning Associate Exam: Real Questions, Real Lessons</title>
      <dc:creator>Jhon Robert Quintero Hurtado</dc:creator>
      <pubDate>Sun, 01 Mar 2026 13:25:00 +0000</pubDate>
      <link>https://dev.to/aws-builders/how-i-passed-the-aws-machine-learning-associate-exam-real-questions-real-lessons-13m9</link>
      <guid>https://dev.to/aws-builders/how-i-passed-the-aws-machine-learning-associate-exam-real-questions-real-lessons-13m9</guid>
      <description>&lt;p&gt;&lt;em&gt;Notes from someone who's been through it — what actually shows up, and what you need to know.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;I recently cleared the &lt;a href="https://aws.amazon.com/certification/certified-machine-learning-engineer-associate/" rel="noopener noreferrer"&gt;&lt;strong&gt;MLA-C01: AWS Certified Machine Learning Engineer - Associate&lt;/strong&gt;&lt;/a&gt;&amp;nbsp;exam, and I wanted to share everything I learned along the way. Not the sanitized "read the docs" advice — the real stuff. The patterns I saw repeated across questions, the services I kept confusing, and the mental models that finally made things click.&lt;/p&gt;

&lt;p&gt;This isn't a beginner exam. It expects you to know &lt;em&gt;when&lt;/em&gt; to use what, &lt;em&gt;why&lt;/em&gt; one approach beats another, and &lt;em&gt;how&lt;/em&gt; AWS services fit together in real ML workflows. If you're coming from the &lt;a href="https://aws.amazon.com/certification/certified-ai-practitioner/?trk=79c3054e-d8a2-437d-82b7-19c3cb010545&amp;amp;sc_channel=ps&amp;amp;ef_id=Cj0KCQiAwYrNBhDcARIsAGo3u32hOlW9GuL3CLtwne7JuhWu8eGsl5_lTTGQgF4PmECDfXdKNYwLz0oaArZJEALw_wcB:G:s&amp;amp;s_kwcid=AL!4422!3!795841170364!p!!g!!aws%20machine%20learning%20certification!23528573462!193629726398&amp;amp;gad_campaignid=23528573462&amp;amp;gbraid=0AAAAADjHtp8n-G189_PsA7QejNM1hEdsz&amp;amp;gclid=Cj0KCQiAwYrNBhDcARIsAGo3u32hOlW9GuL3CLtwne7JuhWu8eGsl5_lTTGQgF4PmECDfXdKNYwLz0oaArZJEALw_wcB" rel="noopener noreferrer"&gt;AI Practitioner exam&lt;/a&gt; or just diving directly into Associate, buckle up — here's what I wish I knew before sitting down.&lt;/p&gt;




&lt;h2&gt;How I Prepared&lt;/h2&gt;

&lt;p&gt;My preparation was hands-on and scenario-focused. The exam doesn't care if you can recite definitions — it wants to know if you can solve problems.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What worked for me:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;
&lt;strong&gt;Practice questions with detailed explanations&lt;/strong&gt; — I went through scenario-based questions and studied &lt;em&gt;why&lt;/em&gt; answers were right or wrong, not just &lt;em&gt;what&lt;/em&gt; the answer was.&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;AWS Documentation deep-dives&lt;/strong&gt; — Especially for SageMaker built-in algorithms, Model Monitor, Clarify, and Data Wrangler. The docs tell you exactly what each service does and doesn't do.&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;Building mental models&lt;/strong&gt; — I stopped memorizing and started asking "what problem does this solve?" for every service.&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;Hands-on labs&lt;/strong&gt; — Actually deploying endpoints, running training jobs, and breaking things taught me more than any video.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;What Actually Showed Up on the Exam&lt;/h2&gt;

&lt;p&gt;The exam is &lt;em&gt;heavily&lt;/em&gt; scenario-based. You'll read a paragraph describing a company's situation, then pick the best solution. Here's what kept coming up:&lt;/p&gt;

&lt;h3&gt;Data Aggregation &amp;amp; Preparation&lt;/h3&gt;

&lt;ul&gt;
    &lt;li&gt;
&lt;strong&gt;AWS Lake Formation&lt;/strong&gt; for aggregating data from multiple sources (S3, on-premises databases) into a unified data lake&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;AWS Glue&lt;/strong&gt; for ETL pipelines, schema discovery, and the Data Catalog&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;AWS Glue FindMatches&lt;/strong&gt; for ML-powered deduplication with minimal code&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;AWS Glue DataBrew&lt;/strong&gt; for no-code data transformations like one-hot encoding&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;SageMaker Data Wrangler&lt;/strong&gt; for ML-specific data prep, anomaly detection, and visualization&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Key insight:&lt;/strong&gt; DataBrew can't process mixed file types (CSV, JSON, Parquet) in the same folder. Separate them first.&lt;/p&gt;

&lt;h3&gt;Algorithms — Know When to Use What&lt;/h3&gt;

&lt;p&gt;This is where the exam gets tricky. You need to match algorithms to problem characteristics:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;Algorithm&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Classification with class imbalance + feature interactions&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;LightGBM&lt;/strong&gt; or &lt;strong&gt;XGBoost&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Recommendations with high-dimensional sparse data&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Factorization Machines&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Time series forecasting&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;DeepAR&lt;/strong&gt; (uses JSON Lines or Parquet, NOT RecordIO-Protobuf)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ranking customers by probability&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;XGBoost&lt;/strong&gt; (outputs probability scores)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Watch out:&lt;/strong&gt; The exam loves testing whether you know that DeepAR does NOT use RecordIO-Protobuf. That format is for Linear Learner, K-Means, and Factorization Machines.&lt;/p&gt;

&lt;h3&gt;Bias Detection &amp;amp; Fairness&lt;/h3&gt;

&lt;p&gt;SageMaker Clarify came up repeatedly:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;
&lt;strong&gt;Pre-training bias metrics&lt;/strong&gt; like DPL (Difference in Proportions of Labels)&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;Post-deployment bias monitoring&lt;/strong&gt; via Lambda + Clarify jobs&lt;/li&gt;
    &lt;li&gt;If DPL is +0.9 for a facet → that facet is overrepresented → &lt;strong&gt;undersample&lt;/strong&gt; that group&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Remember:&lt;/strong&gt; Clarify = bias and explainability. Model Monitor = data quality and drift. Don't confuse them.&lt;/p&gt;

&lt;h3&gt;Model Monitoring &amp;amp; Drift&lt;/h3&gt;

&lt;p&gt;This was a big theme:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;
&lt;strong&gt;"Model worked for months, suddenly degraded"&lt;/strong&gt; → Think &lt;strong&gt;data drift&lt;/strong&gt;
&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;Baseline violations after model update&lt;/strong&gt; → Create a &lt;strong&gt;new baseline&lt;/strong&gt; from new training data&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;ModelSetupTime metric&lt;/strong&gt; → For diagnosing serverless endpoint cold starts&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Overfitting Questions&lt;/h3&gt;

&lt;p&gt;Classic pattern: "Training accuracy 99%, validation accuracy 82%"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answer:&lt;/strong&gt; Dropout + L1/L2 regularization + cross-validation&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Never:&lt;/strong&gt; Add more layers (makes it worse)&lt;/p&gt;

&lt;h3&gt;Deployment Strategies&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;Strategy&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Limited instances + zero downtime&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Rolling deployment&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Different ML frameworks in one endpoint&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Multi-container endpoint&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Variable/unpredictable traffic&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Serverless inference&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Testing new model on live traffic&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Shadow variant&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;Evaluation Metrics&lt;/h3&gt;

&lt;ul&gt;
    &lt;li&gt;
&lt;strong&gt;"Catch as many fraud cases as possible"&lt;/strong&gt; → &lt;strong&gt;Recall&lt;/strong&gt;
&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;"Minimize false alarms"&lt;/strong&gt; → &lt;strong&gt;Precision&lt;/strong&gt;
&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;Continuous numeric predictions&lt;/strong&gt; → &lt;strong&gt;RMSE&lt;/strong&gt; (not accuracy — that's classification)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;Common Pitfalls to Avoid&lt;/h2&gt;

&lt;p&gt;These confused me during practice, but don't let them confuse you:&lt;/p&gt;

&lt;h3&gt;Confusing Similar Services&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;What It Does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Transcribe&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Speech → Text&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Comprehend&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;NLP on text (sentiment, entities)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Rekognition&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Image/video analysis (faces, objects, eye gaze)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Textract&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Extract text from documents&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Macie&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Discover sensitive data in S3&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;The trap:&lt;/strong&gt; "Convert audio to text" is Transcribe, not Rekognition or Comprehend.&lt;/p&gt;

&lt;h3&gt;Security Groups vs Network ACLs&lt;/h3&gt;

&lt;ul&gt;
    &lt;li&gt;Security groups &lt;strong&gt;only allow&lt;/strong&gt; traffic&lt;/li&gt;
    &lt;li&gt;Network ACLs can &lt;strong&gt;explicitly deny&lt;/strong&gt; traffic&lt;/li&gt;
    &lt;li&gt;Need to block a specific IP? → &lt;strong&gt;Network ACL&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;"Least Operational Overhead" Questions&lt;/h3&gt;

&lt;p&gt;When you see this phrase, pick the &lt;strong&gt;managed service&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;Data quality checks → AWS Glue Data Quality (declarative rules, no code)&lt;/li&gt;
    &lt;li&gt;Sensitive data detection → Amazon Macie&lt;/li&gt;
    &lt;li&gt;Model deployment → SageMaker JumpStart&lt;/li&gt;
    &lt;li&gt;Data labeling → SageMaker Ground Truth (automated labeling)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Model Registry Concepts&lt;/h3&gt;

&lt;ul&gt;
    &lt;li&gt;
&lt;strong&gt;Model Groups&lt;/strong&gt; → Versions of the same model&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;Collections&lt;/strong&gt; → Organize model groups by category (without affecting existing groupings)&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;Tags&lt;/strong&gt; → Metadata, but don't provide hierarchical structure&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;Key Topics to Focus On&lt;/h2&gt;

&lt;h3&gt;SageMaker Services Deep Dive&lt;/h3&gt;


&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Data Wrangler&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Data prep, imputation, anomaly detection, visualization&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Clarify&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Bias detection, explainability, fairness metrics&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Model Monitor&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Production monitoring (data quality, model quality, drift)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Debugger&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Training job debugging (tensors, gradients)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Ground Truth&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Data labeling with automated labeling&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;JumpStart&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Pre-trained models, LCNC fine-tuning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Pipelines&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;ML workflow orchestration&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Model Registry&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Version management, approval workflows&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;


&lt;h3&gt;Feature Engineering&lt;/h3&gt;

&lt;ul&gt;
    &lt;li&gt;
&lt;strong&gt;One-hot encoding&lt;/strong&gt; → Nominal categorical data to binary&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;Mode imputation&lt;/strong&gt; → Missing categorical values&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;Mean imputation&lt;/strong&gt; → Missing numerical values&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;Data augmentation with noise&lt;/strong&gt; → When training works but production fails due to image quality variations&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Auto Scaling for Endpoints&lt;/h3&gt;

&lt;p&gt;For maximum responsiveness to sudden traffic:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;
&lt;strong&gt;High-resolution metrics&lt;/strong&gt; (10-second intervals) → Faster detection&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;Longer scale-in cooldown&lt;/strong&gt; (600 seconds) → Maintains capacity, prevents yo-yo effect&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;Mental Models That Saved Me&lt;/h2&gt;

&lt;h3&gt;The "What Problem Does It Solve?" Framework&lt;/h3&gt;

&lt;p&gt;Instead of memorizing services, I asked: &lt;em&gt;What problem is this solving?&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;Need to &lt;strong&gt;block an IP&lt;/strong&gt;? → Network ACL (only thing that can deny)&lt;/li&gt;
    &lt;li&gt;Need &lt;strong&gt;always up-to-date data&lt;/strong&gt;? → Direct connections (real-time query)&lt;/li&gt;
    &lt;li&gt;Need to &lt;strong&gt;reduce labeling time&lt;/strong&gt;? → Ground Truth with automated labeling&lt;/li&gt;
    &lt;li&gt;Need &lt;strong&gt;private connectivity&lt;/strong&gt; to S3? → VPC endpoints&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;The "Least Overhead" Hierarchy&lt;/h3&gt;

&lt;p&gt;When AWS asks for "least operational overhead," they usually want:&lt;/p&gt;

&lt;ol&gt;
    &lt;li&gt;Fully managed service with built-in feature&lt;/li&gt;
    &lt;li&gt;Serverless solution&lt;/li&gt;
    &lt;li&gt;Managed service with some configuration&lt;/li&gt;
    &lt;li&gt;Custom code on managed compute&lt;/li&gt;
    &lt;li&gt;Custom code on EC2 (almost never the answer)&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;The Drift Detection Flow&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%2Fanalisys.co%2Fwp-content%2Fuploads%2F2026%2F02%2Fdrift_detection_flow_v2.drawio.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%2Fanalisys.co%2Fwp-content%2Fuploads%2F2026%2F02%2Fdrift_detection_flow_v2.drawio.png" alt="The Drift Detection Flow" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;br&gt;









&lt;h2&gt;Tips That Helped Me Pass&lt;/h2&gt;

&lt;ol&gt;
    &lt;li&gt;
&lt;strong&gt;Understand services by use case, not definitions&lt;/strong&gt; — The exam gives you scenarios, not vocabulary tests&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;Learn the common mistakes&lt;/strong&gt; — DeepAR doesn't use RecordIO-Protobuf, security groups can't deny traffic, DataBrew needs homogeneous file types&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;Practice elimination&lt;/strong&gt; — Most questions have two obviously wrong answers and two possible ones. Learn why the possible wrong answer is incorrect.&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;Read for keywords&lt;/strong&gt; — "Least operational overhead," "most cost-effective," "LEAST amount of time" all point to different answers&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;Don't overthink&lt;/strong&gt; — If a question mentions a specific service capability (like "document attribute filter"), that's usually the answer&lt;/li&gt;
    &lt;li&gt;
&lt;strong&gt;Time management&lt;/strong&gt; — Flag tough questions and move on. Some questions are intentionally time-consuming.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;Final Thoughts&lt;/h2&gt;

&lt;p&gt;The ML Associate exam is challenging, but it's passable with focused preparation. It's not about memorizing every SageMaker feature — it's about understanding how AWS ML services work together to solve real problems.&lt;/p&gt;

&lt;p&gt;The exam rewards practical thinking. When you read a scenario, ask yourself: "What would I actually do here?" Usually, that instinct (backed by solid knowledge of what each service does) will guide you to the right answer.&lt;/p&gt;

&lt;p&gt;With 6-8 weeks of focused study and lots of practice questions, you can do this.&lt;/p&gt;

&lt;p&gt;Good luck — and feel free to reach out if you have questions!&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Did this help? Have questions about specific topics? Drop a comment below or connect with me on &lt;a href="https://www.linkedin.com/in/jrquinte/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Related Post &lt;a href="https://analisys.co/2024/05/20/generative-ai-using-amazon-bedrock-api-gateway-lambda-and-s3/" rel="noopener noreferrer"&gt;GenAI: Using Amazon Bedrock, API Gateway, Lambda and S3 - Analisys.co&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>aws</category>
      <category>sagemaker</category>
    </item>
    <item>
      <title>GenAI: Using Amazon Bedrock, API Gateway, Lambda and S3</title>
      <dc:creator>Jhon Robert Quintero Hurtado</dc:creator>
      <pubDate>Mon, 20 May 2024 13:42:33 +0000</pubDate>
      <link>https://dev.to/aws-builders/genai-using-amazon-bedrock-api-gateway-lambda-and-s3-j6e</link>
      <guid>https://dev.to/aws-builders/genai-using-amazon-bedrock-api-gateway-lambda-and-s3-j6e</guid>
      <description>&lt;p&gt;About Me: &lt;a href="http://analisys.co/acerca-de/" rel="noopener noreferrer"&gt;Jhon Robert Quintero H.&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%2Fanalisys.co%2Fwp-content%2Fuploads%2F2024%2F05%2FAmazon-Bedrock2.drawio-2.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%2Fanalisys.co%2Fwp-content%2Fuploads%2F2024%2F05%2FAmazon-Bedrock2.drawio-2.png" alt="Bedrock" width="781" height="431"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Introduction&lt;/h3&gt;

&lt;p&gt;I was thrilled to be a speaker at the &lt;a href="https://www.facebook.com/reel/473847328435703" rel="noopener noreferrer"&gt;XIII Meeting SOFTHARD 2024&lt;/a&gt;, hosted by the &lt;a href="https://www.facebook.com/IngenieriasUNIAJC" rel="noopener noreferrer"&gt;Faculty of Engineering&lt;/a&gt; of the &lt;a href="https://www.linkedin.com/company/uniajc/" rel="noopener noreferrer"&gt;Institución Universitaria Antonio José Camacho&lt;/a&gt; . Here's a snapshot of the key takeaways from my presentation on Generative AI, focusing on Amazon Bedrock, API Gateway, Lambda, and S3. Buckle up for an exciting ride!&lt;/p&gt;

&lt;h3&gt;Amazon Bedrock&lt;/h3&gt;

&lt;p&gt;Picture this: Amazon Bedrock is your magic wand for building and scaling generative AI applications with foundation models. It's like having a fully managed AI factory at your fingertips!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fully Managed Service&lt;/strong&gt;: Say goodbye to the nitty-gritty of managing infrastructure.&lt;/li&gt;



&lt;li&gt;
&lt;strong&gt;Choose Your Model&lt;/strong&gt;: It’s like a buffet of the best AI models from AI21 Labs, Anthropic, Cohere, Meta, and Stability. Just pick what you need!&lt;/li&gt;



&lt;li&gt;
&lt;strong&gt;Customize with Your Data&lt;/strong&gt;: Make your model truly yours.&lt;/li&gt;
&lt;/ul&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%2Fanalisys.co%2Fwp-content%2Fuploads%2F2024%2F05%2Fbrandchoice-1024x357.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%2Fanalisys.co%2Fwp-content%2Fuploads%2F2024%2F05%2Fbrandchoice-1024x357.png" alt="" width="800" height="279"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For instance, Anthropic’s Claude model is the hotshot for tasks like summarization and complex reasoning, while Stability AI’s Stable Diffusion model is your go-to for generating unique images, art, and designs. Need copywriting help? Cohere Command's got your back!&lt;/p&gt;

&lt;h4&gt;Anthropic’s Claude 3 Model&lt;/h4&gt;

&lt;p&gt;Meet Claude 3, the genius in the room! It's smarter, faster, and cheaper than GPT 3.5T, and it’s got vision, literally!&lt;/p&gt;

&lt;p&gt;With&lt;a href="https://www.anthropic.com/news/claude-3-family" rel="noopener noreferrer"&gt; Claude 3&lt;/a&gt;, you can do:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dialogue and role-play&lt;/li&gt;



&lt;li&gt;Summarization and Q&amp;amp;A&lt;/li&gt;



&lt;li&gt;Translation&lt;/li&gt;



&lt;li&gt;Database querying and retrieval&lt;/li&gt;



&lt;li&gt;Coding-related tasks&lt;/li&gt;



&lt;li&gt;Classification, metadata extraction, and analysis&lt;/li&gt;



&lt;li&gt;Text and content generation&lt;/li&gt;



&lt;li&gt;Content moderation&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;Amazon’s Titan Model&lt;/h4&gt;

&lt;p&gt;The &lt;a href="https://aws.amazon.com/bedrock/titan/?gclid=CjwKCAjwo6GyBhBwEiwAzQTmcxOlKNZ3Z7U5Yg1LD9beAyTDLLeLX6oOQmoFOajg5He6N4VrgUpFLhoC0T0QAvD_BwE&amp;amp;trk=0eaabb80-ee46-4e73-94ae-368ffb759b62&amp;amp;sc_channel=ps&amp;amp;ef_id=CjwKCAjwo6GyBhBwEiwAzQTmcxOlKNZ3Z7U5Yg1LD9beAyTDLLeLX6oOQmoFOajg5He6N4VrgUpFLhoC0T0QAvD_BwE:G:s&amp;amp;s_kwcid=AL!4422!3!692006004685!e!!g!!amazon%20titan!21048268554!159639952775" rel="noopener noreferrer"&gt;Titan&lt;/a&gt; model is another powerhouse. Here’s what it can do:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Text Embeddings&lt;/strong&gt;: Converts text into numerical form for searching, retrieving, and clustering. Think of it as translating words into a secret numerical language.&lt;/li&gt;



&lt;li&gt;
&lt;strong&gt;Image Generator&lt;/strong&gt;: Create stunning images with just a few words. It’s like having a personal artist at your service!&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;Customizing Amazon Titan models&lt;/h3&gt;

&lt;p&gt;You can now &lt;a href="https://aws.amazon.com/blogs/aws/customize-models-in-amazon-bedrock-with-your-own-data-using-fine-tuning-and-continued-pre-training/" rel="noopener noreferrer"&gt;customize foundation models&lt;/a&gt; (FMs) with your own data in &lt;a href="https://aws.amazon.com/bedrock/" rel="noopener noreferrer"&gt;Amazon Bedrock&lt;/a&gt; to build applications that are specific to your domain, organization, and use case. With custom models, you can create unique user experiences that reflect your company’s style, voice, and services.&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%2Fanalisys.co%2Fwp-content%2Fuploads%2F2024%2F05%2Ffinetunning-1024x399.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%2Fanalisys.co%2Fwp-content%2Fuploads%2F2024%2F05%2Ffinetunning-1024x399.png" alt="" width="800" height="312"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With &lt;a href="https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-bedrock.html" rel="noopener noreferrer"&gt;fine-tuning&lt;/a&gt;, you can increase model accuracy by providing your own task-specific labeled training dataset and further specialize your FMs. You can train models using your own data in a secure environment with customer-managed keys. &lt;a href="https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html" rel="noopener noreferrer"&gt;Continued pre-training&lt;/a&gt; helps models become more specific to your domain.&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%2Fanalisys.co%2Fwp-content%2Fuploads%2F2024%2F05%2Fpretraining-1024x337.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%2Fanalisys.co%2Fwp-content%2Fuploads%2F2024%2F05%2Fpretraining-1024x337.png" alt="" width="800" height="263"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Knowledge Bases for Amazon Bedrock&lt;/h3&gt;

&lt;p&gt;It lets you put text documents, like articles or reports, into a knowledge base. It also automatically creates vector representations of text documents, which are called embeddings. These embeddings can be used for retrieval-augmented generation. This is a key feature of the Amazon Bedrock service. It lets you use your own data to enhance foundation models.&lt;/p&gt;

&lt;p&gt;Stores embeddings in your vector database (&lt;a href="https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-setup.html" rel="noopener noreferrer"&gt;Amazon OpenSearch&lt;/a&gt;). Retrieves embeddings and augments prompts.&lt;/p&gt;

&lt;h3&gt;Solution Design: Text Summarization&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%2Fanalisys.co%2Fwp-content%2Fuploads%2F2024%2F05%2FAmazon-Bedrock2.drawio.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%2Fanalisys.co%2Fwp-content%2Fuploads%2F2024%2F05%2FAmazon-Bedrock2.drawio.png" alt="Bedrock" width="781" height="431"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s dive into the cool stuff! Here’s how I designed a text summarization solution using Bedrock, API Gateway, Lambda, and S3.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Bedrock&lt;/strong&gt;: Our star player.&lt;/li&gt;



&lt;li&gt;
&lt;strong&gt;API Gateway&lt;/strong&gt;: Acts as the doorman, directing client requests to the right Lambda function.&lt;/li&gt;



&lt;li&gt;
&lt;strong&gt;Lambda Function&lt;/strong&gt;: Processes the text and sends it to Bedrock for summarization.&lt;/li&gt;



&lt;li&gt;
&lt;strong&gt;S3 Bucket&lt;/strong&gt;: Stores the summarized text.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Check out the source code below. It’s like a recipe for your favorite dish – just follow the steps and enjoy the result!&lt;/p&gt;

&lt;h4&gt;Python Source Code&lt;/h4&gt;

&lt;pre&gt;&lt;code&gt;import boto3
import botocore.config
import json
import base64
from datetime import datetime
from email import message_from_bytes


def extract_text_from_multipart(data):
    msg = message_from_bytes(data)

    text_content = ''

    if msg.is_multipart():
        for part in msg.walk():
            if part.get_content_type() == "text/plain":
                text_content += part.get_payload(decode=True).decode('utf-8') + "\n"

    else:
        if msg.get_content_type() == "text/plain":
            text_content = msg.get_payload(decode=True).decode('utf-8')

    return text_content.strip() if text_content else None


def generate_summary_from_bedrock(content:str) -&amp;gt;str:
    prompt = f"""Summarize the following meeting notes: {content} """

    body = json.dumps({"inputText": prompt, 
                       "textGenerationConfig":{
                           "maxTokenCount":4096,
                           "stopSequences":[],
                           "temperature":0,
                           "topP":1
                       },
                      }) 

    modelId = 'amazon.titan-tg1-large' # change this to use a different version from the model provider
    accept = 'application/json'
    contentType = 'application/json'
        
    try:
        boto3_bedrock = boto3.client('bedrock-runtime')
        response = boto3_bedrock.invoke_model(body=body, modelId=modelId, accept=accept, contentType=contentType)
        response_body = json.loads(response.get('body').read())
    
        summary = response_body.get('results')[0].get('outputText')
        return summary

    except Exception as e:
        print(f"Error generating the summary: {e}")
        return ""

def save_summary_to_s3_bucket(summary, s3_bucket, s3_key):

    s3 = boto3.client('s3')

    try:
        s3.put_object(Bucket = s3_bucket, Key = s3_key, Body = summary)
        print("Summary saved to s3")

    except Exception as e:
        print("Error when saving the summary to s3")


def lambda_handler(event,context):

    decoded_body = base64.b64decode(event['body'])

    text_content = extract_text_from_multipart(decoded_body)

    if not text_content:
        return {
            'statusCode':400,
            'body':json.dumps("Failed to extract content")
        }


    summary = generate_summary_from_bedrock(text_content)

    if summary:
        current_time = datetime.now().strftime('%H%M%S') #UTC TIME, NOT NECCESSARILY YOUR TIMEZONE
        s3_key = f'summary-output/{current_time}.txt'
        s3_bucket = 'bedrock-analisys-co'

        save_summary_to_s3_bucket(summary, s3_bucket, s3_key)

    else:
        print("No summary was generated")


    return {
        'statusCode':200,
        'body':json.dumps("Summary generation finished")
    }

    &lt;/code&gt;&lt;/pre&gt;

&lt;h4&gt;Text Generation Configuration&lt;/h4&gt;

&lt;p&gt;Understanding the &lt;code&gt;textGenerationConfig&lt;/code&gt; parameters is key for tweaking the model's behavior:&lt;/p&gt;

&lt;h4&gt;
&lt;strong&gt;maxTokenCount&lt;/strong&gt;:&lt;/h4&gt;

&lt;p&gt;This sets the maximum number of tokens (words or subwords) that the text generation model can produce. It helps control the length of the generated text.&lt;/p&gt;

&lt;p&gt;Think of this as setting the maximum length for a speech. Just like a speechwriter might say, "Your speech should be no longer than 500 words," the maxTokenCount controls the length of the generated text, ensuring it doesn’t run on indefinitely.&lt;/p&gt;

&lt;h4&gt;
&lt;strong&gt;stopSequences&lt;/strong&gt;:&lt;/h4&gt;

&lt;p&gt;This is a list of sequences (e.g., newline characters) that, if encountered during text generation, will cause the generation to stop.&lt;/p&gt;

&lt;p&gt;Imagine you’re listening to a song that has a specific note that signals the end, like a grand finale. Similarly, stopSequences act like these finishing notes; they are predefined sequences that, when detected, tell the model to stop generating more text.&lt;/p&gt;

&lt;h4&gt;
&lt;strong&gt;temperature&lt;/strong&gt;:&lt;/h4&gt;

&lt;p&gt;This parameter controls the "creativity" or "randomness" of the text generation. A lower temperature (e.g., 0) will result in more conservative, predictable text, while a higher temperature (e.g., 1) will produce more diverse and potentially more creative text.&lt;/p&gt;

&lt;p&gt;Picture a painter with a palette of colors. A lower temperature is like having only a few colors to choose from, resulting in a more predictable and uniform painting. A higher temperature is like having a wide variety of colors, leading to a more vibrant and unexpected artwork.&lt;/p&gt;

&lt;h4&gt;
&lt;strong&gt;topP&lt;/strong&gt;:&lt;/h4&gt;

&lt;p&gt;This is a technique called "nucleus sampling" that limits the text generation to the most likely tokens, based on the model's probability distribution. A value of 1 means no filtering, while a lower value (e.g., 0.9) will restrict the generation to the top 90% of the most likely tokens.&lt;/p&gt;

&lt;p&gt;Imagine a buffet where you want to sample the most popular dishes. A topP value of 1 means you can choose from the entire spread. A lower topP value, like 0.9, means you’re only selecting from the top 90% of the most popular dishes, skipping the least likely choices to ensure a satisfying and high-quality meal.&lt;/p&gt;

&lt;p&gt;These parameters let you fine-tune the model’s behavior to suit your needs. Feel free to experiment and find the perfect balance!&lt;/p&gt;

&lt;h3&gt;Video Demo&lt;/h3&gt;

&lt;p&gt;Stay tuned for the video demo where I'll walk you through the entire process. &lt;a href="https://youtu.be/MXbXWGBBOzU" rel="noopener noreferrer"&gt;Seeing is believing, right?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Related Post: &lt;a href="https://analisys.co/2023/07/11/designing-a-highly-scalable-system-on-aws/" rel="noopener noreferrer"&gt;Designing a Highly Scalable System on AWS (analisys.co)&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>serverless</category>
      <category>ai</category>
      <category>bedrock</category>
    </item>
  </channel>
</rss>
