<?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>Forem: Jhon Robert Quintero Hurtado</title>
    <description>The latest articles on Forem by Jhon Robert Quintero Hurtado (@jrquinte).</description>
    <link>https://forem.com/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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1490259%2F2881a962-5053-4797-b441-fb89e1c2a667.jpeg</url>
      <title>Forem: Jhon Robert Quintero Hurtado</title>
      <link>https://forem.com/jrquinte</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/jrquinte"/>
    <language>en</language>
    <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://forem.com/aws-builders/how-i-passed-the-aws-machine-learning-associate-exam-real-questions-real-lessons-13m9</link>
      <guid>https://forem.com/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; 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://forem.com/aws-builders/genai-using-amazon-bedrock-api-gateway-lambda-and-s3-j6e</link>
      <guid>https://forem.com/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://media.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://media.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"&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://media.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://media.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=""&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://media.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://media.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=""&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://media.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://media.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=""&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://media.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://media.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"&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>
