<?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: Vasil Shaikh</title>
    <description>The latest articles on DEV Community by Vasil Shaikh (@vasil_shaikh_f2c13100cab1).</description>
    <link>https://dev.to/vasil_shaikh_f2c13100cab1</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%2F3675418%2F88ba5022-63eb-477a-a3ca-b5d3362e18d6.jpg</url>
      <title>DEV Community: Vasil Shaikh</title>
      <link>https://dev.to/vasil_shaikh_f2c13100cab1</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vasil_shaikh_f2c13100cab1"/>
    <language>en</language>
    <item>
      <title>Can AI Translate Technical Content into Indian Languages? Exploring Amazon Translate (English Marathi &amp; Hindi)</title>
      <dc:creator>Vasil Shaikh</dc:creator>
      <pubDate>Sun, 11 Jan 2026 08:27:56 +0000</pubDate>
      <link>https://dev.to/vasil_shaikh_f2c13100cab1/can-ai-translate-technical-content-into-indian-languages-exploring-amazon-translate-english--1aa5</link>
      <guid>https://dev.to/vasil_shaikh_f2c13100cab1/can-ai-translate-technical-content-into-indian-languages-exploring-amazon-translate-english--1aa5</guid>
      <description>&lt;p&gt;Hello World 👋&lt;/p&gt;

&lt;p&gt;I’m Vasil, a DevOps Engineer with a passion for building reliable, scalable, and well-architected cloud platforms. With hands-on experience across cloud infrastructure, CI/CD, observability, and platform engineering, I enjoy turning complex operational challenges into clean, automated solutions.&lt;/p&gt;

&lt;p&gt;I’ve been working with AWS Cloud for over 5 years, and I believe it’s high time I start exploring AI on AWS more deeply. Through these posts, I plan to share practical learnings, real-world experiences, and honest perspectives from my journey in DevOps, Cloud, and now AI.&lt;/p&gt;

&lt;p&gt;Without further delay — let’s dive in 🚀&lt;/p&gt;

&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;As someone who writes about AWS in English, I wanted to explore whether Amazon Translate could help make technical AWS content accessible to regional-language audiences.&lt;/p&gt;

&lt;p&gt;Instead of assuming it would “just work,” I approached this as an experiment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Can Amazon Translate handle technical paragraphs?&lt;/li&gt;
&lt;li&gt;How does it perform for regional Indian languages like Marathi?&lt;/li&gt;
&lt;li&gt;How does that compare with a more widely supported language like Hindi?
This post documents what actually happens when you try this in practice — including the limitations.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  A real world architecture would look something like this
&lt;/h1&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%2F4ennw52xgvtzf70z6roq.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%2F4ennw52xgvtzf70z6roq.png" alt="High-level architecture for translating English technical content into regional language using Amazon Translate" width="800" height="306"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This diagram shows a simple, real-world flow for publishing AWS content in regional languages.&lt;/p&gt;

&lt;p&gt;An author writes the original article in English and stores it as a text or markdown file in Amazon S3. That content is then passed to Amazon Translate, which converts it into Marathi. The translated output is stored back in S3 and can be published to platforms like Medium, dev.to, or internal documentation portals.&lt;/p&gt;

&lt;p&gt;You may notice AWS Lambda in the diagram as an optional component. In real production setups, Lambda is often used to automate this workflow (for example, triggering translation when a new file is uploaded).&lt;/p&gt;

&lt;p&gt;However, in this article we intentionally keep things simple and interact with Amazon Translate directly using the AWS CLI, without introducing Lambda or additional automation. This keeps the focus on understanding the service itself before adding more moving parts.&lt;/p&gt;

&lt;h1&gt;
  
  
  Pre-requisites
&lt;/h1&gt;

&lt;p&gt;You’ll need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An AWS account&lt;/li&gt;
&lt;li&gt;AWS CLI configured locally (I’ll be using Cloudshell)&lt;/li&gt;
&lt;li&gt;Basic familiarity with AWS services&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Let’s begin!
&lt;/h2&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%2Fijafhpc38v4l6emr70l2.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%2Fijafhpc38v4l6emr70l2.png" alt=" " width="599" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Test Input (English Paragraph)
&lt;/h2&gt;

&lt;p&gt;To keep things realistic, I used a full paragraph from AWS documentation-style content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;What is Amazon Translate? Amazon Translate lets you localize content for diverse global users and translate and analyze large volumes of text to activate cross-lingual communication between users. Amazon Translate is a neural machine translation service that delivers fast, high-quality, affordable, and customizable language translation.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Marathi Translation (Observed Behavior)
&lt;/h2&gt;

&lt;p&gt;Command used:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws translate translate-text \
  --region us-east-1 \
  --source-language-code en \
  --target-language-code mr \
  --text "What is Amazon Translate? Amazon Translate lets you localize content for diverse global users and translate and analyze large volumes of text to activate cross-lingual communication between users. Amazon Translate is a neural machine translation service that delivers fast, high-quality, affordable, and customizable language translation."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Actual output:
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Amazon भाषांतर म्हणजे काय? Amazon Translate आपल्याला विविध जागतिक वापरकर्त्यांसाठी सामग्री स्थानिकीकरण करण्यास आणि वापरकर्त्यांमधील क्रॉस-भाषिक संप्रेषण सक्रिय करण्यासाठी मोठ्या Amazon Translate ही एक न्यूरल मशीन भाषांतर सेवा आहे जी जलद, उच्च-गुणवत्तेची, परवडणारी
&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%2Fkw63m9f963syeixu0gle.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%2Fkw63m9f963syeixu0gle.png" alt=" " width="800" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s going on here?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The paragraph is clearly truncated&lt;/li&gt;
&lt;li&gt;Sentences merge abruptly&lt;/li&gt;
&lt;li&gt;The translation cuts off before completing the final thought&lt;/li&gt;
&lt;li&gt;Technical flow and readability suffer
The generated output in no way can be used directly and cannot be even given to an LLM for further fine tuning because the input itself isn’t complete and lacks flow. (So all in all this requires heavy human intervention)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Hindi Translation (Same Paragraph)
&lt;/h2&gt;

&lt;p&gt;Using the exact same input:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws translate translate-text \
  --region us-east-1 \
  --source-language-code en \
  --target-language-code hi \
  --text "What is Amazon Translate? Amazon Translate lets you localize content for diverse global users and translate and analyze large volumes of text to activate cross-lingual communication between users. Amazon Translate is a neural machine translation service that delivers fast, high-quality, affordable, and customizable language translation."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Actual output:
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Amazon Translate क्या है? Amazon Translate से आप विभिन्न वैश्विक उपयोगकर्ताओं के लिए सामग्री का स्थानीयकरण कर सकते हैं और उपयोगकर्ताओं के बीच अंतर-भाषी संचार को सक्रिय करने के लिए बड़ी मात्रा में टेक्स्ट का अनुवाद और विश्लेषण कर सकते हैं। Amazon Translate एक न्यूरल मशीन अनुवाद सेवा है जो तेज़, उच्च-गुणवत्ता, किफायती और अनुकूलन योग्य भाषा अनुवाद प्रदान करती है।
&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%2F8ey7hefl8aq22g12nx9f.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%2F8ey7hefl8aq22g12nx9f.png" alt=" " width="800" height="301"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Observations
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Complete paragraph&lt;/li&gt;
&lt;li&gt;Proper sentence boundaries&lt;/li&gt;
&lt;li&gt;Natural flow&lt;/li&gt;
&lt;li&gt;Technically accurate
This is publishable with minimal human editing.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Translation for Indian Regional Languages: A Broader Challenge
&lt;/h1&gt;

&lt;p&gt;It’s important to call out that what we’re seeing here is not unique to Amazon Translate.&lt;/p&gt;

&lt;p&gt;High-quality translation for Indian regional languages has always been a hard problem, even outside AWS and cloud services. This challenge shows up across traditional NLP systems and modern generative AI models alike.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Some of the reasons include:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Linguistic complexity&lt;/strong&gt;
Languages like Marathi have rich morphology, flexible sentence structures, and context-heavy grammar. Direct sentence-to-sentence mapping from English often loses meaning or flow.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Limited high-quality training data&lt;/strong&gt;
Compared to English or Hindi, regional languages have significantly fewer large, clean, technical corpora available for training translation models.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Technical vocabulary mismatch&lt;/strong&gt;
Cloud and software terminology often has no commonly accepted regional equivalent. Models must decide whether to transliterate, translate, or drop context entirely — which can lead to broken sentences.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mixed-language expectations&lt;/strong&gt;
In real-world usage, Indian technical writing often mixes English service names with regional language explanations. Handling this hybrid style consistently is still difficult for automated systems.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  What This Means in the Real World
&lt;/h1&gt;

&lt;p&gt;PLEASE NOTE!&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%2Fmhvdnsnvai7hswg1ouj3.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%2Fmhvdnsnvai7hswg1ouj3.png" alt=" " width="428" height="304"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Like I said, what we’re seeing here &lt;strong&gt;isn’t a failure&lt;/strong&gt; of Amazon Translate — it’s a reflection of the broader state of machine translation for Indian regional languages today.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon Translate does support Marathi along with several other Indian regional languages, but for long technical paragraphs, the output can be unreliable.&lt;/li&gt;
&lt;li&gt;Hindi performs significantly better for the same technical content.
&lt;strong&gt;Breaking content into multiple smaller calls is possible, but:&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;It’s inefficient&lt;/li&gt;
&lt;li&gt;Not scalable&lt;/li&gt;
&lt;li&gt;Still doesn’t guarantee quality
This is important to know before committing to a regional-language publishing workflow.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;$Practical Takeaway&lt;br&gt;
If you’re planning to localize content or technical documentation using AWS Translate then:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hindi:&lt;/strong&gt; Viable today for paragraph-level technical content&lt;br&gt;
&lt;strong&gt;Marathi (and similar regional languages):&lt;/strong&gt; Needs improvement before it can be used confidently without heavy human intervention&lt;br&gt;
&lt;strong&gt;A realistic approach today would be:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use Amazon Translate for exploration and drafts&lt;/li&gt;
&lt;li&gt;Rely on human review and editing for regional languages&lt;/li&gt;
&lt;li&gt;Avoid assuming parity across all supported languages&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;This experiment wasn’t about proving that Amazon Translate is perfect — it’s about understanding where it works well and where it still struggles.&lt;/p&gt;

&lt;p&gt;For me, the takeaway is clear:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon Translate is strong for widely used languages&lt;/li&gt;
&lt;li&gt;Regional technical localization is still a work in progress&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And that’s okay — knowing the limits is just as valuable as knowing the features.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>ai</category>
      <category>translation</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Building an AI Document Processing Pipeline on AWS (Textract + Bedrock)</title>
      <dc:creator>Vasil Shaikh</dc:creator>
      <pubDate>Sat, 27 Dec 2025 12:37:46 +0000</pubDate>
      <link>https://dev.to/vasil_shaikh_f2c13100cab1/building-an-ai-document-processing-pipeline-on-aws-textract-bedrock-309f</link>
      <guid>https://dev.to/vasil_shaikh_f2c13100cab1/building-an-ai-document-processing-pipeline-on-aws-textract-bedrock-309f</guid>
      <description>&lt;p&gt;Hello World 👋&lt;/p&gt;

&lt;p&gt;I’m Vasil, a DevOps Engineer with a passion for building reliable, scalable, and well-architected cloud platforms. With hands-on experience across cloud infrastructure, CI/CD, observability, and platform engineering, I enjoy turning complex operational challenges into clean, automated solutions.&lt;/p&gt;

&lt;p&gt;I’ve been working with AWS Cloud for over 5 years, and I believe it’s high time I start exploring AI on AWS more deeply. Through these posts, I plan to share practical learnings, real-world experiences, and honest perspectives from my journey in DevOps, Cloud, and now AI.&lt;/p&gt;

&lt;p&gt;Without further delay — let’s dive in 🚀&lt;/p&gt;

&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;Processing large volumes of documents like PDFs, scanned images, invoices, or contracts is a common challenge in many businesses. AWS provides managed services that can significantly reduce the manual effort required to extract meaningful text and context from uncategorized documents.&lt;/p&gt;

&lt;p&gt;In this article, we’ll walk through a practical pattern for document processing using AI services on AWS:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Amazon Textract&lt;/strong&gt; — for optical character recognition (OCR) and structured text extraction&lt;br&gt;
&lt;strong&gt;Amazon Bedrock&lt;/strong&gt; — for applying foundation models for understanding and summarization&lt;br&gt;
&lt;strong&gt;Amazon S3&lt;/strong&gt; — for document storage&lt;/p&gt;

&lt;p&gt;This pattern is useful for building Intelligent Document Processing (IDP) pipelines that go beyond simple OCR, adding structure, insights, and context using AI.&lt;/p&gt;
&lt;h1&gt;
  
  
  Prerequisites
&lt;/h1&gt;

&lt;p&gt;To follow this article, you need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AWS account access&lt;/li&gt;
&lt;li&gt;AWS CLI configured (I’ll be using Cloudshell)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Permissions for:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Amazon S3&lt;/li&gt;
&lt;li&gt;Amazon Textract&lt;/li&gt;
&lt;li&gt;Amazon Bedrock&lt;/li&gt;
&lt;li&gt;A document (PDF or image) stored in an S3 bucket&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  Architecture Overview
&lt;/h1&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%2Fkgcnid9ipg2xwkkts047.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%2Fkgcnid9ipg2xwkkts047.png" alt="AI Document Processing Pipeline on AWS (Textract + Bedrock)&amp;lt;br&amp;gt;
" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here’s the high-level flow we’ll follow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Upload document to Amazon S3&lt;/li&gt;
&lt;li&gt;Use Amazon Textract to extract raw text and layout from the document&lt;/li&gt;
&lt;li&gt;Feed the extracted content into Amazon Bedrock foundation models for summarization or structured extraction (Note: You can use a Lambda function here but we will not be using it in this article to keep it simple)&lt;/li&gt;
&lt;li&gt;Store or present the processed results&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  Step-by-Step Implementation
&lt;/h1&gt;
&lt;h2&gt;
  
  
  Step 1: Create a S3 bucket for documents
&lt;/h2&gt;

&lt;p&gt;We’ll start by creating an S3 bucket to store input documents and AI outputs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; aws s3 mb s3://aws-textract-demo-vasil
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(You can replace the suffix with your name to make the bucket unique)&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%2F5hlhtjfzn41eeuy5wn1m.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%2F5hlhtjfzn41eeuy5wn1m.png" alt=" " width="800" height="313"&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%2Ft0ifvirwmwgdu06yqh4r.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%2Ft0ifvirwmwgdu06yqh4r.png" alt=" " width="800" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Upload Document to S3
&lt;/h2&gt;

&lt;p&gt;Upload your document (PDF, PNG, JPG, etc.) to an S3 bucket.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws s3 cp path/to/local/document.pdf s3://your-bucket/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; If you are going to use Cloudshell like me then you’ll need to upload the file to your Cloudshell shell from the options on the top-right corner&amp;gt;Click Actions&amp;gt;Click ‘Upload file’&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%2Froe1onp3v852m3t7lmsm.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%2Froe1onp3v852m3t7lmsm.png" alt=" " width="800" height="226"&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%2F5insnzbky5e3oqit4fdi.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%2F5insnzbky5e3oqit4fdi.png" alt=" " width="800" height="202"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For e.g&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws s3 cp invoice.pdf s3://aws-textract-demo-vasil/invoice.pdf
&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%2Fjzcfjcxde93nmqstjp7m.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%2Fjzcfjcxde93nmqstjp7m.png" alt=" " width="800" height="347"&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%2Fr6j53952syrc8x6taowk.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%2Fr6j53952syrc8x6taowk.png" alt="invoice uploaded successfully to bucket" width="800" height="325"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can upload any invoice you have or download a sample invoice pdf/image from Google. For this example, I used my own invoice that I got after a purchase.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Extract Text with Amazon Textract
&lt;/h2&gt;

&lt;p&gt;Textract converts documents into machine-readable text.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws textract detect-document-text \
  --region us-east-1 \
  --document '{
    "S3Object": {
      "Bucket": "&amp;lt;your-bucket-name&amp;gt;",
      "Name": "invoice.pdf"
    }
  }' &amp;gt; textract-output.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws textract detect-document-text \
  --region us-east-1 \
  --document '{
    "S3Object": {
      "Bucket": "aws-textract-demo",
      "Name": "invoice.pdf"
    }
  }' &amp;gt; textract-output.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And… drumroll 🥁…we hit our first error!&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%2Fkd8hfivoy9fwggfmisuk.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%2Fkd8hfivoy9fwggfmisuk.png" alt=" " width="800" height="170"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;An error occurred (AccessDeniedException) when calling the DetectDocumentText operation: User: arn:aws:iam::393078901895:user/kk_labs_user_465822 is not authorized to perform: textract:DetectDocumentText with an explicit deny in a service control policy&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What’s Happening Here?
&lt;/h2&gt;

&lt;p&gt;In a standard AWS account, this error can be resolved by granting the required Textract permissions via IAM.&lt;/p&gt;

&lt;p&gt;However, in managed sandbox environments (such as training labs), Textract APIs are often explicitly restricted using service or identity-based policies to control cost and data exposure.&lt;/p&gt;

&lt;p&gt;Because of this, the following steps assume a standard AWS account with appropriate permissions.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: The outputs shown below are representative of real Amazon Textract responses.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Sample Textract output&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "Blocks": [
    {
      "BlockType": "LINE",
      "Text": "Invoice Number: INV-1023",
      "Confidence": 99.2
    },
    {
      "BlockType": "LINE",
      "Text": "Total Amount: $1,250.00",
      "Confidence": 98.7
    },
    {
      "BlockType": "LINE",
      "Text": "Due Date: 15 Aug 2025",
      "Confidence": 97.9
    }
  ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This produces structured JSON containing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;detected text&lt;/li&gt;
&lt;li&gt;layout information&lt;/li&gt;
&lt;li&gt;confidence scores&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Textract doesn’t just do OCR — it understands document structure. That makes it a much better input for LLMs than raw text extraction tools.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 4: Prepare text for Bedrock
&lt;/h2&gt;

&lt;p&gt;At this stage, you have raw text from Textract which may include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;words&lt;/li&gt;
&lt;li&gt;line breaks&lt;/li&gt;
&lt;li&gt;positional information&lt;/li&gt;
&lt;li&gt;nested JSON frames&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your goal is to extract the &lt;strong&gt;plain&lt;/strong&gt;, &lt;strong&gt;relevant&lt;/strong&gt; text and concatenate multiple pages into a single text blob. LLMs work best with clean, structured input, so we focus only on the meaningful lines.&lt;/p&gt;

&lt;p&gt;You can do this using &lt;strong&gt;Python&lt;/strong&gt; scripts, &lt;strong&gt;CLI&lt;/strong&gt; tools like &lt;code&gt;jq&lt;/code&gt;, or if you prefer automation use a &lt;strong&gt;Lambda function&lt;/strong&gt; that processes new documents automatically. Using Lambda is optional and not required for this guide.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;jq -r '.Blocks[] | select(.BlockType=="LINE") | .Text' textract-output.json &amp;gt; cleaned_text.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check the content:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat cleaned_text.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Invoice Number: 12345
Date: 2025-12-27
Total Amount: $1,234.56
&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%2Fbf7i6vb3p8qxpfacdu2f.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%2Fbf7i6vb3p8qxpfacdu2f.png" alt=" " width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Feed Textract Output into Amazon Bedrock
&lt;/h2&gt;

&lt;p&gt;We’ll use &lt;strong&gt;Meta Llama 3&lt;/strong&gt; (3B Instruct) via Amazon Bedrock to interpret the document.&lt;/p&gt;

&lt;p&gt;What We’ll Ask the Model&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Summarize this invoice and extract key details.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Bedrock CLI Invocation&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Safely read the cleaned text and escape it for JSON
PROMPT=$(jq -Rs . &amp;lt; cleaned_text.txt)

# Build the full prompt with instruction
FULL_PROMPT=$(jq -Rn --arg txt "$PROMPT" '$txt + "\n\nPlease summarize this invoice and provide only the key details in a structured format (Invoice Number, Date, Total Amount)."')

# Invoke Bedrock
aws bedrock-runtime invoke-model \
  --region us-east-1 \
  --model-id us.meta.llama3-2-3b-instruct-v1:0 \
  --content-type application/json \
  --accept application/json \
  --cli-binary-format raw-in-base64-out \
  --body "{
    \"prompt\": $FULL_PROMPT,
    \"max_gen_len\": 300,
    \"temperature\": 0.3
  }" \
  response.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;jq -Rs . &amp;lt; cleaned_text.txt&lt;/code&gt; escapes all newlines/quotes in your text.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;jq -Rn — arg txt “$PROMPT”&lt;/code&gt;appends your instruction safely to the JSON string.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;— body&lt;/code&gt; contains valid JSON with “prompt” including your instruction.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This method avoids all the bash parsing issues and ensures the model gets the full instruction properly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Model Response
&lt;/h2&gt;

&lt;p&gt;Finally, do &lt;code&gt;cat response.json&lt;/code&gt; to see the response. You might see some generic output as well. The generic output is coming from the model itself, and it happens because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The content in cleaned_text.txt is very small or too generic (in our example, just a few lines like Invoice Number: 12345)&lt;/li&gt;
&lt;li&gt;The Llama 3.2 Instruct model interprets short prompts in a “template/illustrative” style and fills in plausible generic text.&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7yngq0iu1fof71sy01p5.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%2F7yngq0iu1fof71sy01p5.png" alt=" " width="800" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What We Just Built
&lt;/h2&gt;

&lt;p&gt;✅ Stored documents in S3&lt;br&gt;
✅ Extracted structured data with Textract&lt;br&gt;
✅ Used an LLM to reason over documents&lt;br&gt;
✅ Built a logical AI pipeline — step by step&lt;/p&gt;

&lt;p&gt;All without deploying a single Lambda function.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where This Goes in the Real World
&lt;/h2&gt;

&lt;p&gt;With automation, this same pipeline can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Process invoices automatically&lt;/li&gt;
&lt;li&gt;Extract contract clauses&lt;/li&gt;
&lt;li&gt;Power document search&lt;/li&gt;
&lt;li&gt;Feed ERP or finance systems&lt;/li&gt;
&lt;li&gt;Trigger workflows based on document content
Add Lambda or Step Functions later — the core AI flow stays the same.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Well done. Seriously — give yourself a pat 👏&lt;/p&gt;

&lt;p&gt;At this point, you’ve successfully used generative AI on AWS:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No apps&lt;/li&gt;
&lt;li&gt;No infrastructure&lt;/li&gt;
&lt;li&gt;Just clean, composable AI services&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And yes — &lt;strong&gt;DO NOT&lt;/strong&gt; forget to clean up resources that you created during this walkthrough to avoid unexpected cost.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>ai</category>
      <category>serverless</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Getting Started with AI on AWS: A Practical Guide</title>
      <dc:creator>Vasil Shaikh</dc:creator>
      <pubDate>Thu, 25 Dec 2025 16:06:29 +0000</pubDate>
      <link>https://dev.to/vasil_shaikh_f2c13100cab1/getting-started-with-ai-on-aws-a-practical-guide-3koa</link>
      <guid>https://dev.to/vasil_shaikh_f2c13100cab1/getting-started-with-ai-on-aws-a-practical-guide-3koa</guid>
      <description>&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%2F288j8z069vjadzvzy44l.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%2F288j8z069vjadzvzy44l.png" alt="Some AI services available on AWS" width="800" height="526"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Hello World&lt;/em&gt; 👋&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I'm Vasil, a DevOps Engineer with a passion for building reliable, scalable, and well-architected cloud platforms. With hands-on experience across cloud infrastructure, CI/CD, observability, and platform engineering, I enjoy turning complex operational challenges into clean, automated solutions.&lt;br&gt;
I've been working with AWS Cloud for over 5 years, and I believe it's high time I start exploring AI on AWS more deeply. Through these posts, I plan to share practical learnings, real-world experiences, and honest perspectives from my journey in DevOps, Cloud, and now AI.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Without further delay - let's dive in 🚀&lt;/em&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;AWS offers a wide range of AI services today, from ready-to-use APIs like &lt;strong&gt;Rekognition&lt;/strong&gt; and &lt;strong&gt;Textract&lt;/strong&gt; to generative AI platforms such as &lt;strong&gt;Amazon Bedrock&lt;/strong&gt; and &lt;strong&gt;SageMaker&lt;/strong&gt;.&lt;br&gt;
The problem is not lack of choice - it's knowing where to start without overcomplicating things.&lt;br&gt;
This article is written for anyone who wants to learn AI on AWS the right way:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;without training models on day one&lt;/li&gt;
&lt;li&gt;without managing GPUs&lt;/li&gt;
&lt;li&gt;without turning a simple idea into a complex architecture&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We'll look at how AWS AI services are structured, how they are typically used in real systems, and how to take your first practical step.&lt;/p&gt;
&lt;h1&gt;
  
  
  Prerequisites
&lt;/h1&gt;

&lt;p&gt;You don't need a data science background to follow this.&lt;br&gt;
You should have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An AWS account&lt;/li&gt;
&lt;li&gt;Basic familiarity with IAM and the AWS Console&lt;/li&gt;
&lt;li&gt;AWS CLI configured locally (I'll be using Cloudshell)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you can deploy a Lambda function or create an S3 bucket, you're ready.&lt;/p&gt;


&lt;h1&gt;
  
  
  Architecture Overview: How AI Fits Into AWS Applications
&lt;/h1&gt;

&lt;p&gt;Most AI workloads on AWS follow a simple pattern.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Application → API → AI Service → Response
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The AI service is not the application itself. It is just another managed AWS service, similar to DynamoDB or S3.&lt;br&gt;
In practice, this usually means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;API Gateway receives a request&lt;/li&gt;
&lt;li&gt;Lambda handles validation and logic&lt;/li&gt;
&lt;li&gt;An AI service (Bedrock, Textract, Comprehend, etc.) is called&lt;/li&gt;
&lt;li&gt;The result is returned or stored&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This keeps the system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;loosely coupled&lt;/li&gt;
&lt;li&gt;easy to scale&lt;/li&gt;
&lt;li&gt;aligned with the AWS Well-Architected Framework&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  Understanding AWS AI Services (In Simple terms)
&lt;/h1&gt;
&lt;h2&gt;
  
  
  Amazon Bedrock
&lt;/h2&gt;

&lt;p&gt;Amazon Bedrock provides access to foundation models through simple API calls.&lt;br&gt;
You send a prompt → You get a response.&lt;br&gt;
No model training. No infrastructure to manage.&lt;br&gt;
This makes Bedrock a good starting point for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;text generation&lt;/li&gt;
&lt;li&gt;summarization&lt;/li&gt;
&lt;li&gt;chat-style applications&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From an architecture perspective, Bedrock behaves like a serverless inference API.&lt;/p&gt;


&lt;h2&gt;
  
  
  Amazon SageMaker
&lt;/h2&gt;

&lt;p&gt;SageMaker is for cases where you need more control:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;training your own models&lt;/li&gt;
&lt;li&gt;fine-tuning existing ones&lt;/li&gt;
&lt;li&gt;running long-lived inference endpoints&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If Bedrock is "plug and play", SageMaker is "build and operate".&lt;br&gt;
For most beginners, &lt;strong&gt;SageMaker is not where you start.&lt;/strong&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Pre-Trained AI Services
&lt;/h2&gt;

&lt;p&gt;AWS also provides purpose-built AI APIs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rekognition → images and video&lt;/li&gt;
&lt;li&gt;Textract → documents&lt;/li&gt;
&lt;li&gt;Transcribe → speech&lt;/li&gt;
&lt;li&gt;Translate → language translation&lt;/li&gt;
&lt;li&gt;Comprehend → NLP analysis&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These services solve very specific problems and integrate easily with S3 and Lambda.&lt;/p&gt;
&lt;h1&gt;
  
  
  First Practical Step: Calling Amazon Bedrock
&lt;/h1&gt;

&lt;p&gt;Rather than jumping into a full application, the safest way to start is to call Bedrock directly and understand how it behaves.&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 1: Check Model Availability
&lt;/h2&gt;

&lt;p&gt;Bedrock is region-specific.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws bedrock list-foundation-models --region us-east-1

&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%2Fbu3etinfmmth0md35vof.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%2Fbu3etinfmmth0md35vof.png" alt=" " width="800" height="212"&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%2Foovc9ybeqd28dqu9ppp2.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%2Foovc9ybeqd28dqu9ppp2.png" alt=" " width="800" height="453"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If this returns models, your account is ready.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Create an IAM Role (Security First)
&lt;/h2&gt;

&lt;p&gt;Following the Security pillar, never use root or overly permissive roles.&lt;/p&gt;

&lt;p&gt;Minimal IAM policy example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "bedrock:InvokeModel"
      ],
      "Resource": "*"
    }
  ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Attach this policy to:&lt;/p&gt;

&lt;p&gt;A Lambda execution role or An IAM user used for experimentation&lt;br&gt;
&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; In production environments, this policy should be scoped down to specific foundation models and regions.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 3: Invoke a Model
&lt;/h2&gt;

&lt;p&gt;Example using Meta Llama:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws bedrock-runtime invoke-model \
  --region us-east-1 \
  --model-id meta.llama3-2-3b-instruct-v1:0 \
  --content-type application/json \
  --accept application/json \
  --cli-binary-format raw-in-base64-out \
  --body '{
    "messages": [
      {
        "role": "user",
        "content": [
          { "text": "Explain AWS AI services in simple terms" }
        ]
      }
    ],
    "max_gen_len": 300,
    "temperature": 0.5
  }' \
  response.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But wait — what is this &lt;em&gt;max_gen_len&lt;/em&gt; &amp;amp; &lt;em&gt;temperature&lt;/em&gt; ?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;max_gen_len&lt;/strong&gt; defines the maximum number of tokens the model is allowed to generate in the response. Lower values reduce cost and response time, while higher values allow more detailed outputs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;temperature&lt;/strong&gt; controls how deterministic the response is. Lower values make outputs more predictable and focused, while higher values introduce more creativity and variation.&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%2Fd3ma3isvlcfysor8jp25.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%2Fd3ma3isvlcfysor8jp25.png" alt=" " width="800" height="262"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After running this command, we have successfully hit our first error!&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%2Fd9tsp4pwrrlnssdaoccf.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%2Fd9tsp4pwrrlnssdaoccf.png" alt=" " width="800" height="312"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s try to solve this…&lt;/p&gt;

&lt;p&gt;The error message is -&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;An error occurred (ValidationException) when calling the InvokeModel operation: Invocation of model ID meta.llama3–2–3b-instruct-v1:0 with on-demand throughput isn’t supported. Retry your request with the ID or ARN of a n inference profile that contains this model.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This error means the &lt;code&gt;meta.llama3-2-3b-instruct-v1:0&lt;/code&gt; model on AWS Bedrock needs an Inference Profile (like a specific configuration for its deployment) instead of direct "&lt;strong&gt;on-demand&lt;/strong&gt;" calling; you must use the profile's ARN or ID in your code, often because it's a larger model needing dedicated resources or cross-region setup, not just pay-per-request.&lt;/p&gt;

&lt;p&gt;To resolve this issue, you need to use an inference profile that contains the &lt;code&gt;meta.llama3-2-3b-instruct-v1:0&lt;/code&gt; model&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Refer below &lt;strong&gt;AWS:rePost&lt;/strong&gt; article for more info — &lt;a href="https://repost.aws/questions/QUEU82wbYVQk2oU4eNwyiong/bedrock-api-invocation-error-on-demand-throughput-isn-s-supported" rel="noopener noreferrer"&gt;https://repost.aws/questions/QUEU82wbYVQk2oU4eNwyiong/bedrock-api-invocation-error-on-demand-throughput-isn-s-supported&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Let’s now find the inference profile for our model using —&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws bedrock list-inference-profiles --region us-east-1 | grep meta.llama3-2-3b-instruct-v1:0
&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%2Fsyfdzgt23c89yqzitk2v.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%2Fsyfdzgt23c89yqzitk2v.png" alt=" " width="800" height="202"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copy the inferenceProfileId (This will be our --model-id now)&lt;/p&gt;

&lt;p&gt;So the new command is -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws bedrock-runtime invoke-model \
  --region us-east-1 \
  --model-id us.meta.llama3-2-3b-instruct-v1:0 \
  --content-type application/json \
  --accept application/json \
  --cli-binary-format raw-in-base64-out \
  --body '{
    "messages": [
      {
        "role": "user",
        "content": [
          { "text": "Explain AWS AI services in simple terms" }
        ]
      }
    ],
    "max_gen_len": 300,
    "temperature": 0.5
  }' \
  response.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;BUT, we have a new error!&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%2Fbctomx31aio01m9e6nsi.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%2Fbctomx31aio01m9e6nsi.png" alt=" " width="795" height="527"&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%2Foaiokm3i5vqsn351x9cd.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%2Foaiokm3i5vqsn351x9cd.png" alt=" " width="800" height="283"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But this time the error is for the message format in the body which means we are on the right track, let’s fix this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws bedrock-runtime invoke-model \
  --region us-east-1 \
  --model-id us.meta.llama3-2-3b-instruct-v1:0 \
  --content-type application/json \
  --accept application/json \
  --cli-binary-format raw-in-base64-out \
  --body '{
    "prompt": "Explain AWS AI services in simple terms",
    "max_gen_len": 300,
    "temperature": 0.5
  }' \
  response.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And then use &lt;code&gt;cat&lt;/code&gt; command to view the response stored in the &lt;code&gt;response.json&lt;/code&gt; file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat response.json | jq
&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%2Fwlmvm6eq9yimibn4xxzz.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%2Fwlmvm6eq9yimibn4xxzz.png" alt=" " width="800" height="346"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Well done!&lt;/strong&gt; You’ve just successfully invoked generative AI on AWS — without writing an application or managing any infrastructure.&lt;/p&gt;

&lt;h1&gt;
  
  
  How This Fits Real Applications
&lt;/h1&gt;

&lt;p&gt;In real systems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The prompt usually comes from an API request&lt;/li&gt;
&lt;li&gt;Lambda formats the request&lt;/li&gt;
&lt;li&gt;Bedrock generates a response&lt;/li&gt;
&lt;li&gt;The result may be stored in S3 or DynamoDB
The key idea is simple:
*&lt;em&gt;AI is a service call, not a separate system.
*&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Cost and Quota Considerations
&lt;/h1&gt;

&lt;p&gt;AI services are not free, and costs scale quickly if you are not careful.&lt;/p&gt;

&lt;h3&gt;
  
  
  Things to watch:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Token count (both input and output) directly affects Bedrock cost&lt;/li&gt;
&lt;li&gt;Repeated calls inside loops can get expensive&lt;/li&gt;
&lt;li&gt;SageMaker endpoints are billed while running&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Always start with:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;small inputs&lt;/li&gt;
&lt;li&gt;clear limits&lt;/li&gt;
&lt;li&gt;usage monitoring&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cost optimization is not optional — it’s part of good architecture.&lt;/p&gt;

&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;Learning AI on AWS does not require a complex setup.&lt;/p&gt;

&lt;p&gt;If you understand how to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;call managed services&lt;/li&gt;
&lt;li&gt;secure them properly&lt;/li&gt;
&lt;li&gt;control costs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;you are already on the right path.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>generativeai</category>
      <category>machinelearning</category>
      <category>cloud</category>
    </item>
  </channel>
</rss>
