<?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: N Chandra Prakash Reddy</title>
    <description>The latest articles on DEV Community by N Chandra Prakash Reddy (@chandureddy).</description>
    <link>https://dev.to/chandureddy</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%2F3029689%2F7553e5a6-49df-4377-98eb-29c7a04fa6be.png</url>
      <title>DEV Community: N Chandra Prakash Reddy</title>
      <link>https://dev.to/chandureddy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chandureddy"/>
    <language>en</language>
    <item>
      <title>From Panic to Peace: Mastering Zero-Downtime ECS Deployments</title>
      <dc:creator>N Chandra Prakash Reddy</dc:creator>
      <pubDate>Wed, 19 Aug 2026 16:28:37 +0000</pubDate>
      <link>https://dev.to/aws-builders/from-panic-to-peace-mastering-zero-downtime-ecs-deployments-1ddb</link>
      <guid>https://dev.to/aws-builders/from-panic-to-peace-mastering-zero-downtime-ecs-deployments-1ddb</guid>
      <description>&lt;p&gt;Friday afternoon. The code is merged, the pipeline is green and the release is ready. But instead of pressing the deploy button and heading out for the weekend, your team is haggling who needs to stick around "just in case" everything catches fire.&lt;/p&gt;

&lt;p&gt;Let’s be real. Deploying new code to production is like placing a bet on the roulette table.&lt;/p&gt;

&lt;p&gt;You start the app, watch the server logs like a hawk, and hope the customer service channel is silent. If an alert is triggered, there is panic. You hustle to determine what broke, patch it live, or execute a nasty manual rollback while users are down.&lt;/p&gt;

&lt;p&gt;Does this sound familiar? This is a stressful routine and is very typical in software engineering. But it doesn’t have to be this way. Modern traffic-shifting tactics on Amazon Elastic Container Service (ECS) can turn stressful releases into repetitive, automated processes.&lt;/p&gt;

&lt;p&gt;Now you can take control of your deployments with Blue-Green and Canary tactics.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Vicious Cycle of Deployment Dread&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Here is the point … when delivering software is hard, teams naturally want to do it less often.&lt;/p&gt;

&lt;p&gt;If releasing code takes downtime, late night coordination and significant risk, you start batching your changes. You don't deploy a single minor feature on a Tuesday, you combine three weeks of updates into one enormous weekend release.&lt;/p&gt;

&lt;p&gt;And that’s a huge problem. Larger batches of code have more variables, more possible conflicts and a much greater danger of breaking something vital. The pain when that huge discharge inevitably bombs strengthens your fear of deploying.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyohefrvvwv7sqwrvj2bc.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyohefrvvwv7sqwrvj2bc.png" alt=" " width="799" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To break this loop you need to be able to test in a true production environment without impacting the users and you also need to be able to roll back changes immediately if something goes wrong.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Two-House Strategy: Blue-Green Deployments&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Imagine that you are moving into a new residence. You simply build an exact replica of your house next door instead of loading all your stuff into a truck, selling your old house and praying the new one has functional plumbing.&lt;/p&gt;

&lt;p&gt;You bring your furniture in, check the water pressure, sleep on the bed for a night, and make sure it’s perfect. Then when you are happy you just move your mailing address to the new house. If the roof starts leaking the next day, you just change your address back and move next door to your previous, perfectly functional home.&lt;/p&gt;

&lt;p&gt;This is called a Blue-Green deployment in the cloud world.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;How the Dual Environment Works&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;You have the same infrastructural settings. We can call the existing live environment “Blue” and the freshly updated environment “Green”.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Step 1: The Shadow Launch.&lt;/strong&gt; Your ECS pipeline distributes the new container image to the Green environment. At this stage 100% of your live client traffic is still going to the Blue environment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Step 2: Private Validation.&lt;/strong&gt; Your team does testing against the green environment. It is a totally accurate testing ground because it is connected to the same production databases and employs the same networking rules.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Step 3: The Swap.&lt;/strong&gt; When the Green environment has passed all of the checks, you adjust your Application Load Balancer (ALB) to send traffic to the Green environment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Step 4: The Safety Net.&lt;/strong&gt; The old Blue environment is still running for a pre-determined cool down period.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You’re probably wondering… what if a little bug snuck through our testing? You just flip the load balancer back to Blue. The rollback is seconds, not hours.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Defining Blue-Green Infrastructure&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To get this working within AWS using Terraform you need to create two target groups and let ECS manage the traffic moving.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# The target group for our current live traffic
resource "aws_lb_target_group" "primary_tg" {
  name        = "app-primary-tg"
  port        = 80
  protocol    = "HTTP"
  vpc_id      = aws_vpc.main_network.id
  target_type = "ip"

  health_check {
    path                = "/api/health"
    interval            = 15
    healthy_threshold   = 2
  }
}

# The target group for our incoming new releases
resource "aws_lb_target_group" "secondary_tg" {
  name        = "app-secondary-tg"
  port        = 80
  protocol    = "HTTP"
  vpc_id      = aws_vpc.main_network.id
  target_type = "ip"

  health_check {
    path                = "/api/health"
    interval            = 15
    healthy_threshold   = 2
  }
}

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

&lt;/div&gt;



&lt;p&gt;You set up your ECS service to use the &lt;code&gt;CODE_DEPLOY&lt;/code&gt; controller (or native ECS deployment tools) to handle the transition between the two target groups.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;resource "aws_ecs_service" "web_api" {
  name            = "core-web-api"
  cluster         = aws_ecs_cluster.production.id
  task_definition = aws_ecs_task_definition.api_def.arn
  desired_count   = 4

  deployment_controller {
    type = "ECS"
  }

  # Instructing ECS to keep the old tasks around for a safety buffer
  blue_green_deployment_config {
    deployment_ready_wait_time_in_minutes = 10
    terminate_blue_tasks_on_deployment_success {
      enabled               = true
      termination_wait_time = 30
    }
  }
}

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

&lt;/div&gt;



&lt;h1&gt;
  
  
  &lt;strong&gt;The Taste Test: Canary Releases&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;While Blue-Green provides a good safety net, it still requires all your users to move to the new version at the same time.&lt;/p&gt;

&lt;p&gt;And here’s where it gets interesting...what if you only exposed a very small fraction of your consumers to the new code?&lt;/p&gt;

&lt;p&gt;Think of it as making a big pot of soup for a banquet. You taste one spoonful, then serve it to 500 visitors. You put sugar instead of salt in the soup; by accident, you only spoiled one spoonful, not the whole dinner party.&lt;/p&gt;

&lt;p&gt;Canary deployments slowly transfer traffic to the new version in small increments.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The Phased Rollout Process&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Instead of a hard swap, ECS’s canary deployment uses the weighted routing features of an AWS Application Load Balancer.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Phase 1: The Initial Dip.&lt;/strong&gt; You push the new version out, but only send 5% of your live traffic to it. The other 95% continue with the stable version.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Phase 2: Metric Monitoring.&lt;/strong&gt; You keep a careful eye on your dashboards. Is that 5% seeing error rate spikes? Seeing database slowness growing up?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Phase 3: The Ramp-Up.&lt;/strong&gt; If the system seems healthy after a period of time, you bump the weight up to 20%, then 50% and finally 100%.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the new version faults out at any stage, you immediately set the ALB weights for the new version back to 0%. The bug’s blast radius is tightly controlled to a small subset of users.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Configuring Weighted Traffic&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To do this, you create a listener rule on your AWS load balancer to route traffic based on the supplied weights.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;resource "aws_lb_listener_rule" "canary_traffic_split" {
  listener_arn = aws_lb_listener.https_listener.arn
  priority     = 50

  action {
    type = "forward"
    forward {
      target_group {
        arn    = aws_lb_target_group.stable_version.arn
        weight = 90
      }
      target_group {
        arn    = aws_lb_target_group.new_release.arn
        weight = 10
      }
      # Critical: Ensure users don't bounce between versions
      stickiness {
        enabled  = true
        duration = 3600 
      }
    }
  }

  condition {
    path_pattern {
      values = ["/api/*"]
    }
  }
}

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

&lt;/div&gt;



&lt;p&gt;See the stickiness configuration in the codeblock. This ensures that a user who lands on the updated version of your app stays on that version for the length of their session. Randomly bouncing a user between two separate codebases every click will be a poor user experience.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Choosing Your Deployment Weapon&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Fair enough... neither is always "better" than the other. They encounter quite different operating challenges.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Opt for Blue-Green when:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You are installing internal tools or APIs where a harsh cutover is tolerable.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You want to be able to conduct intensive integration tests on the exact production infrastructure before any real traffic actually hits the servers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You want your deployment pipeline to be simple and speedy.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Opt for Canary when:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You are deploying really critical functionality (like payment gateway) where even 1 minute outage is fatal.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You need to validate business metrics (e.g. conversion rates or user engagement) and technical data before a full launch.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If the traffic volumes are high, then you will have enough data even with a small 2% slice of traffic to identify anomalies.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Rules for Safe Deployments&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Whichever approach you pick, dynamically rerouting traffic adds layers of complication. You can't just lay down in these infrastructure models and expect miracles if you disregard the rest of the ecosystem.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. The Database Schema Trap&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Simply said, your database is not rollback-able, but your code is.&lt;/p&gt;

&lt;p&gt;If you change a database column name in your new deployment and direct traffic to the new version, the previous version will immediately crash because it is expecting the old column name. If you ever have to roll back, your application is now broken forever.&lt;/p&gt;

&lt;p&gt;If you want zero-downtime deployments then database modifications must be fully backward-compatible. You have to follow a pattern of “expand and contract”:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Deploy 1:&lt;/strong&gt; Add the new database column (both code versions still function).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Deploy 2:&lt;/strong&gt; Update the application code to read/write to the new column.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Deploy 3:&lt;/strong&gt; Remove the old column days later, long after the rollback window has closed.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2. You Must Have Excellent Metrics&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Driving blindfolded is like moving traffic without visibility.&lt;/p&gt;

&lt;p&gt;How do you know a Canary release is working when you route 10% of your traffic to it? You can’t depend on users to file support tickets. You want automatic dashboards on HTTP 500s, response times, and CPU utilization.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3. Automate the Rollback&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Humans panic. Systems do not.&lt;/p&gt;

&lt;p&gt;Don’t have a stressed engineer manually modify load balancer weights when anything goes sideways. Use automatic lifecycle hooks. You can use AWS to trigger Lambda functions on ECS deploys. Your Lambda can automatically abort the deployment and roll back traffic if it finds that the new target group is failing health checks.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Blue-Green deployments enable an easy escape route by keeping two similar settings that offer a suitable testing ground before going live.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Canary releases minimize the damage of uncovered bugs by first exposing new code to a small subset of users and growing up gradually.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It must be able to work with databases backward. If your database updates break your previous code, you don't have your safety net of rollback anymore.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Observability is a must. If you don't have analytics to see how your application is functioning in real-time, you can't securely move traffic.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Software deployments should be dull, at the end of the day.&lt;/p&gt;

&lt;p&gt;By using Blue-Green cutovers for a speedy escape route, or Canary rollouts to reduce the blast radius of issues, you safeguard your users from your mistakes. When engineers are no longer afraid to break the system, they code with more confidence. They merge pull more quickly. They provide little, digestible updates rather than terrifyingly large monoliths.&lt;/p&gt;

&lt;p&gt;Long story short...investing time in your ECS deployment architecture is more than simply focusing on server health. It’s about maintaining the mental health of your engineering staff, keeping your weekends intact, and delivering uninterrupted value to your users.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;About the Author&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;As an &lt;strong&gt;AWS Community Builder&lt;/strong&gt;, I enjoy sharing the things I've learned through my own experiences and events, and I like to help others on their path. If you found this helpful or have any questions, don't hesitate to get in touch! 🚀&lt;/p&gt;

&lt;p&gt;🔗 Connect with me on &lt;a href="https://www.linkedin.com/in/chandra-prakash-reddy/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Also Published On&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://builder.aws.com/content/3I8oK16gm577L2VBa3KdYxR1XLx/from-panic-to-peace-mastering-zero-downtime-ecs-deployments" rel="noopener noreferrer"&gt;AWS Builder Center&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://devopstour.hashnode.dev/from-panic-to-peace-mastering-zero-downtime-ecs-deployments" rel="noopener noreferrer"&gt;Hashnode&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>ecs</category>
      <category>automation</category>
      <category>database</category>
    </item>
    <item>
      <title>Taming AWS with Claude: Why Your AI Needs a Memory</title>
      <dc:creator>N Chandra Prakash Reddy</dc:creator>
      <pubDate>Mon, 17 Aug 2026 11:27:49 +0000</pubDate>
      <link>https://dev.to/aws-builders/taming-aws-with-claude-why-your-ai-needs-a-memory-3pe2</link>
      <guid>https://dev.to/aws-builders/taming-aws-with-claude-why-your-ai-needs-a-memory-3pe2</guid>
      <description>&lt;p&gt;Let’s be real. We all know the first magic of AI coding helper. You ask a query, and voila! A nicely formatted script pops up.&lt;/p&gt;

&lt;p&gt;But if you work in current cloud tech, that magic wears off fast. You start a new browser tab and ask for help with your cloud infrastructure and the AI quickly proposes a generic configuration. It tells you to open your security groups to the whole internet, or it uses the wrong cloud region, or it entirely ignores your team’s rigorous naming rules.&lt;/p&gt;

&lt;p&gt;That sounds familiar? This is the frustrating reality of working with ordinary AI tools. They are suffering from severe amnesia. As soon as you close the session, they forget all about your architecture.&lt;/p&gt;

&lt;p&gt;Now here's where things gets interesting. A new breed of AI tools such as Claude Code are profoundly changing this dynamic. They don’t sit in your browser as a passive chatbot; they sit in your terminal. They can read your local files, run commands and most of all, they truly remember how your individual project is wired.&lt;/p&gt;

&lt;p&gt;Why is this context-aware strategy totally rewriting the playbook for developers, ops teams and security engineers? Let’s dig deeper.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Core Concept: Giving Your AI a Permanent Memory&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Context is the biggest challenge in cloud engineering. Your organization doesn’t just use “the cloud” - you use a very unique and highly customized version of it.&lt;/p&gt;

&lt;p&gt;You may need to have your entire infrastructure as terraform code. You can deny wildcard rights explicitly in your access policies. Maybe a compulsory labeling system to track billing .&lt;/p&gt;

&lt;p&gt;If you have to explain this every single day to an AI, you are losing precious time. To be fair, regular AI models aren’t attempting to be difficult, they simply don’t have access to your environment.&lt;/p&gt;

&lt;p&gt;Terminal-native agents do this with a local memory file - commonly a plain markdown file lying directly at the root of your codebase. Consider this PDF as an onboarding guidebook for a new hire. The AI reads this guidebook every time it wakes up.&lt;/p&gt;

&lt;p&gt;Here’s an example of what an original, very particular context file may look like for a fictional payments service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# project-context: payment-gateway-api&lt;/span&gt;

&lt;span class="gu"&gt;## Cloud Environment Rules&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Primary Cloud: AWS
&lt;span class="p"&gt;-&lt;/span&gt; Default Region: eu-central-1 (Frankfurt)
&lt;span class="p"&gt;-&lt;/span&gt; compute: We only use AWS Lambda (Node.js 20.x runtime). Do not suggest EC2 or containers.
&lt;span class="p"&gt;-&lt;/span&gt; Databases: DynamoDB for transactions, Redis for caching.

&lt;span class="gu"&gt;## Security &amp;amp; Compliance&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; NO hardcoded secrets. Ever. Fetch everything dynamically from AWS Parameter Store at runtime.
&lt;span class="p"&gt;-&lt;/span&gt; IAM Policies: Strictly least-privilege. Never use "&lt;span class="err"&gt;*&lt;/span&gt;" for resources or actions.
&lt;span class="p"&gt;-&lt;/span&gt; Network: All outbound traffic must route through our NAT Gateway.

&lt;span class="gu"&gt;## Development Standards&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; Infrastructure as Code: We strictly use AWS CDK (TypeScript). No Terraform.
&lt;span class="p"&gt;-&lt;/span&gt; Testing: Jest for unit tests. Minimum 90% coverage required for PRs.
&lt;span class="p"&gt;-&lt;/span&gt; CI/CD commands: 
&lt;span class="p"&gt;  -&lt;/span&gt; Build: &lt;span class="sb"&gt;`npm run build`&lt;/span&gt;
&lt;span class="p"&gt;  -&lt;/span&gt; Test: &lt;span class="sb"&gt;`npm run test`&lt;/span&gt;
&lt;span class="p"&gt;  -&lt;/span&gt; Synth: &lt;span class="sb"&gt;`npx cdk synth`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the kind of file you have in your repo to set the ground rules. Any developer on your team can invoke the AI and the result will automatically stick to your tight corporate requirements. No more entering your cloud region and language choices manually.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;How Developers Actually Use Context-Aware Agents&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;But what does this really look like in practice? The basic logic of an application is normally the fun portion to write for a feature developer. The boilerplate is the tiring part. Getting the event triggers wired up, setting up the cloud permissions, writing the deployment scripts.&lt;/p&gt;

&lt;p&gt;For instance, say you want to build a new background worker to handle user uploads. With a normal AI, you’d ask for the application code, then ask for the infrastructure code, then spend an hour making sure they really spoke to each other.&lt;/p&gt;

&lt;p&gt;If you already have a terminal-based agent that reads your context file, your prompt can be quite short:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;claude -p "Generate a new background worker called 'image-optimizer'. It needs to trigger whenever a new file lands in our raw-uploads S3 bucket. Compress the image, save it to the processed-uploads bucket, and log the event to our DynamoDB tracking table. Include the full AWS CDK stack and the Jest tests."&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Simply put, you are the designer, The AI builds the TypeScript code, creates the buckets, writes the least-privilege access controls, and mocks the cloud services for your local testing. The code it generates knows your rules, so it's actually usable right out of the start.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The DevOps Reality: Automating the Troubleshooting&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;For operations and platform teams, the worst part of the job isn't constructing things, it's figuring out why things randomly stopped working.&lt;/p&gt;

&lt;p&gt;When a continuous integration (CI) pipeline fails, or a cloud deployment gets stuck in a rollback cycle, a human engineer often has to drop everything. They have to navigate through hundreds of lines of unusual cloud logs to figure out that one environment variable was missing.&lt;/p&gt;

&lt;p&gt;The issue is, terminal-native AI is able to execute in your automated workflows (like GitHub Actions) without human interaction. You are able to set up a routine to automatically trigger when a deployment fails.&lt;/p&gt;

&lt;p&gt;Instead of paging an engineer at 2:00 AM , the pipeline can tell the AI to go check it out . Here is an example of an original structure for an automated debugging action:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Auto-Triage Failed Deployments&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;workflow_run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;workflows&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Production&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Deployment"&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;
    &lt;span class="na"&gt;types&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;completed&lt;/span&gt;&lt;span class="pi"&gt;]&lt;/span&gt;

&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;investigate-failure&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;if&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ github.event.workflow_run.conclusion == 'failure' }}&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Checkout Code&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v4&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Authenticate Cloud Provider&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;aws-actions/configure-aws-credentials@v4&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;role-to-assume&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.DEBUG_ROLE_ARN }}&lt;/span&gt;
          &lt;span class="na"&gt;aws-region&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;eu-central-1&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Trigger AI Investigation&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;some-ai-provider/cli-action@v2&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;api_key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.AI_API_KEY }}&lt;/span&gt;
          &lt;span class="na"&gt;instructions&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
            &lt;span class="s"&gt;Our recent Serverless deployment just failed. &lt;/span&gt;
            &lt;span class="s"&gt;1. Fetch the latest CloudFormation stack events for 'payment-gateway-prod'.&lt;/span&gt;
            &lt;span class="s"&gt;2. Pull the last 20 minutes of CloudWatch logs for the deployment function.&lt;/span&gt;
            &lt;span class="s"&gt;3. Identify the exact resource that caused the rollback (e.g., IAM permission boundary issue, timeout, missing parameter).&lt;/span&gt;
            &lt;span class="s"&gt;4. Create a pull request with the necessary code fix and a plain-English explanation of what went wrong.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The AI performs the read-only commands, interprets the encrypted error messages, and provides a fix. The human engineer has still the last word, but the drudgery of investigation has been done.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Shifting Security Left&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Security teams are commonly referred to as the “Department of No,” since they usually discover misconfigurations at the very end of the development process.&lt;/p&gt;

&lt;p&gt;Terminal AI changes this - it is a localized security watchdog. The AI understands your application logic and your cloud infrastructure, so it can detect risky patterns even before code is submitted.&lt;/p&gt;

&lt;p&gt;You can enforce local configuration hooks to intercept commands. The system stops the AI (or a developer) from doing anything hazardous.&lt;/p&gt;

&lt;p&gt;Here’s an example custom configuration snippet to prevent catastrophic removals of infrastructure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"safety_hooks"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"before_execution"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"trigger"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"terminal_command"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"pattern"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"(terraform destroy|aws s3 rm --recursive)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"block"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"error_message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"CRITICAL: Destructive cloud commands are disabled in this project. You must perform this action manually via the console with secondary approval."&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This assures that the artificial intelligence cannot unintentionally delete a database or storage bucket, no matter what prompt the user gives it.&lt;/p&gt;

&lt;p&gt;You may script the AI to do huge automatic audits as well. You could construct a simple bash loop that the artificial intelligence can use to go thru your codebase, looking at every single identity policy, and flag any permission that allows access to all resources. This reduces a multi-week manual audit to a five-minute automated scan.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Standard Chatbots vs. Terminal Agents&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;If you are still undecided, here is a one-sentence method to think about the difference between the two paradigms:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Browser-Based AI&lt;/th&gt;
&lt;th&gt;Terminal-Native Agent&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Awareness&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Only knows what you manually type into the chat box.&lt;/td&gt;
&lt;td&gt;Can read your file tree, configuration files, and scripts.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Actionability&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Gives you code snippets to copy and paste.&lt;/td&gt;
&lt;td&gt;Executes shell commands, formats files, and runs your test suite.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Consistency&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Requires you to re-explain your architecture every day.&lt;/td&gt;
&lt;td&gt;Automatically inherits your team's persistent markdown rules.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Troubleshooting&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Requires you to manually paste error logs into the chat.&lt;/td&gt;
&lt;td&gt;Can actively query cloud APIs to find the error logs itself.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Putting Up Guardrails&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;It’s a powerful technology, but we need to be realistic about safety. You are giving an automated system access to your terminal and possibly your cloud environment.&lt;/p&gt;

&lt;p&gt;If you do decide to proceed with this method, there are a few regulations you have to adhere to, no matter what. First, long-lived, static access keys are never allowed. Always utilize temporary, auto-rotating credentials with strong least privilege roles.&lt;/p&gt;

&lt;p&gt;Second, the AI should not have the power to merge its own code or deploy directly to production. AI suggests a solution. Human approves the solution.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;If you're ready to level up your cloud workflows, these are the basic ideas to keep in mind:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Memory beats intelligence:&lt;/strong&gt; A little less powerful AI that knows exactly how your AWS VPC is laid out is far more beneficial than a super-intelligent AI that thinks you are building a generic educational app.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Boilerplate is for bots:&lt;/strong&gt; No more hand-writing IAM policies and basic cloud scaffolding. Let the context aware agent worry about the plumbing, while you work on the business logic.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Automate the triage:&lt;/strong&gt; CI/CD pipelines should not merely tell you that a deployment has failed. Your pipelines with AI agents may search the cloud logs, determine the root cause, and write the solution.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Security must be proactive:&lt;/strong&gt; Pre-execution hooks and automatic audits let you identify glaring AWS misconfigurations right in the terminal, long before they become a big issue for the security team.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;The days of copy-pasting the same general code in a tab from the browser are over.&lt;/p&gt;

&lt;p&gt;You put AI right into the terminal and give it the persistent memory of your infrastructure, removing the blank slate tax. It helps developers move faster, helps DevOps teams quickly resolve complicated AWS issues, and provides security teams with a proactive mechanism to detect vulnerabilities early.&lt;/p&gt;

&lt;p&gt;After all, creating and scaling apps in the cloud is complex enough. A digital assistant that truly remembers the way your personal environment operates is no longer a luxury. It’s the fastest, smartest way to design robust software.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;About the Author&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;As an &lt;strong&gt;AWS Community Builder&lt;/strong&gt;, I enjoy sharing the things I've learned through my own experiences and events, and I like to help others on their path. If you found this helpful or have any questions, don't hesitate to get in touch! 🚀&lt;/p&gt;

&lt;p&gt;🔗 Connect with me on &lt;a href="https://www.linkedin.com/in/chandra-prakash-reddy/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Also Published On&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://builder.aws.com/content/3I2aBApnlhdU4xsxD23jutBJ4Kj/taming-aws-with-claude-why-your-ai-needs-a-memory" rel="noopener noreferrer"&gt;AWS Builder Center&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://devopstour.hashnode.dev/taming-aws-with-claude-why-your-ai-needs-a-memory" rel="noopener noreferrer"&gt;Hashnode&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>claude</category>
      <category>ai</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Control AWS Traffic: Smart Serverless Throttling</title>
      <dc:creator>N Chandra Prakash Reddy</dc:creator>
      <pubDate>Mon, 10 Aug 2026 09:31:12 +0000</pubDate>
      <link>https://dev.to/aws-builders/control-aws-traffic-smart-serverless-throttling-155p</link>
      <guid>https://dev.to/aws-builders/control-aws-traffic-smart-serverless-throttling-155p</guid>
      <description>&lt;p&gt;When I began building cloud-native apps on AWS, I was really focused on writing business logic. I liked how easy it was to connect API Gateway to AWS Lambda and get a working microservice up and running in just a few minutes.&lt;/p&gt;

&lt;p&gt;Let’s face it, when we’re focused on launching new features, things like request caps and execution limits usually get pushed to the bottom of our to-do list.&lt;/p&gt;

&lt;p&gt;Does this sound familiar? Many engineering teams only think about traffic control after their backend databases crash or they get a huge, unexpected AWS bill. If you’re wondering how to avoid these problems before they become late-night emergencies, I’ve put together the framework I use for traffic throttling with Terraform, based on what I’ve learned from improving my own deployment workflows.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Hidden Danger of Uncontrolled Cloud Traffic&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;While serverless service like AWS Lambda can scale on their own, your databases, payment systems, and third-party APIs often cannot keep up with unlimited traffic.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9btr7co9jvq56bz8oyf2.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9btr7co9jvq56bz8oyf2.png" alt=" " width="800" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Why Every Developer Needs a Traffic Cop&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Think about a popular amusement park ride with only 20 seats. If 5,000 excited visitors all try to get on at once, it turns into chaos. People get pushed, the entrance gets blocked, and no one gets to enjoy the ride.&lt;/p&gt;

&lt;p&gt;Request throttling works like a velvet rope at the entrance. It allows a steady, manageable group of visitors in, while keeping the rest waiting safely in line. Setting clear limits protects your backend services, keeps performance steady, and helps guard against accidental loops or attacks that try to overload your system.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Building a Production Defense Line with Terraform&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Here’s where things get interesting. Instead of manually changing settings in the AWS Management Console, which is often error-prone and hard to track, we can manage all our traffic rules as code using Terraform.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Customizing Limits per Deployment Tier&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Each environment has its own operational needs. For example, your staging environment should shut down early to avoid runaway integration tests, while your production tier needs enough capacity to handle real user surges.&lt;/p&gt;

&lt;p&gt;We can do this easily by setting up environment-aware variables in Terraform:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;variable "app_stage" {
  type        = string
  description = "Deployment target name (e.g., dev, prod)"
}

variable "gateway_rate_configs" {
  type = map(object({
    peak_burst   = number
    steady_rate  = number
  }))
  default = {
    dev = {
      peak_burst  = 500
      steady_rate = 250
    }
    prod = {
      peak_burst  = 3000
      steady_rate = 1500
    }
  }
}

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Preventing Lambda Resource Hijacking&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;By default, each AWS account has a regional pool of 1,000 concurrent Lambda executions. If one unoptimized background worker uses too many resources, it can use up the entire quota and cause your important public APIs to stop working.&lt;/p&gt;

&lt;p&gt;To stop a single function from using all your resources, you can set aside dedicated concurrency slots:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;resource "aws_lambda_function" "order_processor" {
  function_name = "order_processor_${var.app_stage}"
  # ... standard lambda configurations ...

  reserved_concurrent_executions = lookup(var.concurrency_caps, var.app_stage, 75)
}

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

&lt;/div&gt;



&lt;p&gt;If you set a limit on concurrency, you make sure this function does not use up all your account capacity or put too much pressure on your database connections.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Gating Your Front Door with Usage Caps&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Amazon API Gateway acts as the entry point for your microservices. When you use stage settings together with usage plans, you can control both short-term bursts and total monthly usage for people using your API.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;resource "aws_api_gateway_usage_plan" "tier_policy" {
  name = "client-access-plan-${var.app_stage}"

  api_stages {
    api_id = aws_api_gateway_rest_api.core_api.id
    stage  = aws_api_gateway_stage.live_stage.stage_name
  }

  quota_settings {
    limit  = 25000
    period = "MONTH"
  }

  throttle_settings {
    burst_limit = lookup(var.gateway_rate_configs[var.app_stage], "peak_burst", 500)
    rate_limit  = lookup(var.gateway_rate_configs[var.app_stage], "steady_rate", 250)
  }
}

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

&lt;/div&gt;



&lt;h1&gt;
  
  
  &lt;strong&gt;Keeping Your Infrastructure Safe and On Budget&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Enforcing request limits is just one piece of the puzzle. You also need clear insight into your spending and traffic health so you know exactly what's going on.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Catching Oversights with Automated Budget Guards&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Traffic spikes shouldn't catch you off guard with unexpected bills. By setting up an automated AWS Budget with Terraform, your team will get alerts well before costs get out of control.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;resource "aws_budgets_budget" "account_cost_cap" {
  name         = "monthly-spend-guard-${var.app_stage}"
  budget_type  = "COST"
  time_unit    = "MONTHLY"
  limit_amount = "750"
  limit_unit   = "USD"

  notification {
    comparison_operator        = "GREATER_THAN"
    threshold                  = 80
    threshold_type             = "PERCENTAGE"
    notification_type          = "FORECASTED"
    subscriber_email_addresses = ["ops-team@mycompany.com"]
  }
}

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;Setting Up Real-Time Warning Signals&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Besides financial alerts, it’s important to track operational metrics. For example, if your rate limits are too strict and real users get blocked, a CloudWatch alarm can alert you right away.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;resource "aws_cloudwatch_metric_alarm" "lambda_breach_warning" {
  alarm_name          = "lambda-throttled-${aws_lambda_function.order_processor.function_name}"
  comparison_operator = "GreaterThanThreshold"
  evaluation_periods  = 2
  metric_name         = "Throttles"
  namespace           = "AWS/Lambda"
  period              = 300
  statistic           = "Sum"
  threshold           = 5
  alarm_actions       = [aws_sns_topic.operations_alert.arn]

  dimensions = {
    FunctionName = aws_lambda_function.order_processor.function_name
  }
}

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

&lt;/div&gt;



&lt;h1&gt;
  
  
  &lt;strong&gt;Dynamic Scaling Strategies That Work in the Real World&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Static infrastructure rules can seem too rigid when compared to the changing needs of real applications. Most apps go through busy periods in the morning and quieter times at night.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Shifting Traffic Capacity on a Schedule&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;There’s no need to pay for extra capacity when it isn’t needed at night. Instead, you can set up AWS EventBridge to run a simple Python script that changes API Gateway limits as needed during the day.&lt;/p&gt;

&lt;p&gt;Below is a basic Python function you can schedule to run automatically:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import boto3
import os

def sync_rate_limits(event, context):
    apigw = boto3.client('apigateway')

    target_api_id = os.environ['REST_API_ID']
    target_stage = os.environ['STAGE_NAME']
    new_burst = int(os.environ['TARGET_BURST'])
    new_rate = int(os.environ['TARGET_RATE'])

    apigw.update_stage(
        restApiId=target_api_id,
        stageName=target_stage,
        patchOperations=[
            {'op': 'replace', 'path': '/*/*/throttling/burstLimit', 'value': str(new_burst)},
            {'op': 'replace', 'path': '/*/*/throttling/rateLimit', 'value': str(new_rate)}
        ]
    )

    return {'statusCode': 200, 'body': 'Updated API limits successfully.'}

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

&lt;/div&gt;



&lt;p&gt;Set this script to run at 8:00 AM to open more traffic lanes for the morning rush. Then, use a matching rule at 8:00 PM to reduce the lanes again when traffic is lighter.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Filtering Out Noise with Edge Security&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;In short, throttling helps protect your internal application logic, but it does not prevent malicious bots from using up your network bandwidth.&lt;/p&gt;

&lt;p&gt;Adding an AWS Web Application Firewall (WAF) to your API Gateway gives you strong protection at the edge. When you use AWS Managed Bot Control rules with Terraform, you can block unauthorized scrapers and spam traffic before they reach your application code.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Before you start working in your own AWS environment, here’s a quick summary of the key concepts we discussed.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Treat limits as code:&lt;/strong&gt; Define your API Gateway and Lambda throttling rules with Terraform. This helps keep things consistent and reduces mistakes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Protect the backend:&lt;/strong&gt; Set a limit on your Lambda concurrency. This way, one problematic function can’t take over your account or overload your database.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Stay ahead of the bill:&lt;/strong&gt; Set up automated AWS Budgets and CloudWatch alarms. These tools help you spot traffic spikes early and avoid unexpected costs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scale intelligently:&lt;/strong&gt; Use EventBridge to change capacity depending on the time of day. This keeps performance up when it’s busy and saves money during quieter times.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Block the bots:&lt;/strong&gt; Add AWS WAF to block harmful traffic before it reaches your compute resources.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Managing serverless performance is something you need to keep up with, not just set up once. Setting request limits does not hold back your application's growth. Instead, it helps you build a system that stays strong and reliable, no matter how much traffic comes its way.&lt;/p&gt;

&lt;p&gt;When you add these safety rules to your Terraform setup, you protect your backend, save on cloud costs, and make sure every user has a smooth experience. Now you have a clear plan to keep your cloud workloads safe, scalable, and fully under your control.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;About the Author&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;As an &lt;strong&gt;AWS Community Builder&lt;/strong&gt;, I enjoy sharing the things I've learned through my own experiences and events, and I like to help others on their path. If you found this helpful or have any questions, don't hesitate to get in touch! 🚀&lt;/p&gt;

&lt;p&gt;🔗 Connect with me on &lt;a href="https://www.linkedin.com/in/chandra-prakash-reddy/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Also Published On&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://builder.aws.com/content/3HiatL6JtvwhvBMbt8fj8Ro6NVF/control-aws-traffic-smart-serverless-throttling" rel="noopener noreferrer"&gt;AWS Builder Center&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://devopstour.hashnode.dev/control-aws-traffic-smart-serverless-throttling" rel="noopener noreferrer"&gt;Hashnode&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>serverless</category>
      <category>terraform</category>
      <category>cloudcomputing</category>
    </item>
    <item>
      <title>Locking Down Your Cloud: A Beginner's Guide to AWS KMS</title>
      <dc:creator>N Chandra Prakash Reddy</dc:creator>
      <pubDate>Sun, 09 Aug 2026 10:40:30 +0000</pubDate>
      <link>https://dev.to/aws-builders/locking-down-your-cloud-a-beginners-guide-to-aws-kms-3aa3</link>
      <guid>https://dev.to/aws-builders/locking-down-your-cloud-a-beginners-guide-to-aws-kms-3aa3</guid>
      <description>&lt;p&gt;A couple of months ago I worked on a side project, a local food delivery service. We were moving fast, creating features, integrating payment gateways. One evening I found myself doing something terrifying: I was going to put our main database encryption password directly into our configuration file.&lt;/p&gt;

&lt;p&gt;Let’s be honest, we have all been tempted to choose the easy road. But here’s the problem: if I had uploaded that file to GitHub, a scraping bot would have been able to find that password in less than five seconds. From there, anyone could have accessed our database, decrypted it and walked away with hundreds of customer addresses and phone numbers.&lt;/p&gt;

&lt;p&gt;That close call got me thinking about how I handle application secrets. That got me looking into AWS Key Management Service (KMS).&lt;/p&gt;

&lt;p&gt;In this article, I’ll walk you through how to properly protect an application with AWS KMS. We’ll skip the textbook definitions and walk through a real world scenario to show you exactly how to keep your users data locked down.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Danger of the "Hidden" House Key&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;But before we talk about the cloud, let’s talk about how traditional encryption normally goes wrong.&lt;/p&gt;

&lt;p&gt;Imagine you purchase an impenetrable safe to house your life wealth. But rather than memorising the combination you write it down on a sticky note and put it to the side of the safe. That’s exactly what occurs when developers implement their own encryption logic and hardcode their cryptographic keys into their application source code.&lt;/p&gt;

&lt;p&gt;If an attacker gets access to your code, through a leaked github token, a frustrated worker, or a hole in your server, they get the key immediately. They don't have to break the encryption, they just step right in the front door.&lt;/p&gt;

&lt;p&gt;The solution is a system which does not allow the key to be in the same place as the code or the data.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Digital Bank Vault: Enter AWS KMS&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;AWS KMS is like a high security bank vault.&lt;/p&gt;

&lt;p&gt;If you wish to deposit your assets with the bank, they don't offer you the master key to the vault. Instead, you walk up to the teller, hand over your items and show your identity. The teller takes your stuff into the vault, puts it in a box and gives you a receipt. When you want your stuff back you show the receipt and your ID and the teller brings your items out.&lt;/p&gt;

&lt;p&gt;AWS KMS works in precisely the same way. It is a fully managed service and is your digital bank teller. It creates and securely stores top-level encryption keys (called KMS Keys) in AWS hardware that is designed for this purpose. The raw encryption key is never seen or touched. Instead, your application asks KMS to encrypt or decrypt data for it.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Why This Approach Wins&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Zero Key Leakage:&lt;/strong&gt; Your application code never actually touches the raw key so you can’t unintentionally push it up to a public repo.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Seamless Ecosystem:&lt;/strong&gt; It has immediate integration with services such as Amazon S3, RDS ( databases ) and EBS ( hard drives ) . So you can typically encrypt your cloud storage with one click .&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Always Online:&lt;/strong&gt; KMS is designed for high availability. No need to worry about your application hitting a “vault” closure during a late night traffic surge.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Bouncers at the Door: Controlling Access&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;So you might be asking yourself, if all our keys live in AWS how can we block some bad inside app from telling KMS to unlock everything?&lt;/p&gt;

&lt;p&gt;AWS solves this by demanding two different levels of permissions. Imagine a really exclusive VIP club with two distinct gatekeeper at the main door. You have to go through both to get in.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. The IAM Policy (The Guest List)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The first gatekeeper is the IAM (Identity and Access Management) policy. This is linked to your application or your developer account. It controls what the user can do with AWS in general. Your back-end server must have an IAM policy that allows it to talk to KMS, otherwise the first bouncer will turn it away right away.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2. The Key Policy (The VIP Pass)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The Key Policy is the second bouncer. This policy is tied directly to the encryption key . Even if a developer has global admin access in IAM, if the particular Key Policy reads, “Only the billing microservice can use this key,” the developer gets rejected.&lt;/p&gt;

&lt;p&gt;To be fair, it is a little laborious to juggle two sets of regulations when you are starting off. But the final result is that if one of your servers ever gets hacked, this “two-bouncer” technique contains the blast radius.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;In Action: Securing a Customer's Checkout Data&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Now lets put this in perspective with a real world example. Remember the food delivery app I was telling you about?&lt;/p&gt;

&lt;p&gt;We want to encrypt the home delivery address when a consumer enters it, before we save it in our database. We will leverage the AWS SDK for Python (Boto3) to request that KMS protect the data.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Step 1: Encrypting the Address&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;So when the user clicks save , our backend gets the raw address and transmits it directly to the KMS service.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;boto3&lt;/span&gt;

&lt;span class="c1"&gt;# Connect to the AWS KMS service
&lt;/span&gt;&lt;span class="n"&gt;kms_client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;boto3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;client&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;kms&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# The sensitive data from our user
&lt;/span&gt;&lt;span class="n"&gt;user_address&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;b&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;123 Main Street, Apartment 4B&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;

&lt;span class="c1"&gt;# Ask KMS to lock it up using our specific Key ID
&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;kms_client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encrypt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;KeyId&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;arn:aws:kms:us-east-1:123456789012:key/your-unique-key-id&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;Plaintext&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;user_address&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# KMS hands us back a scrambled, unreadable blob
&lt;/span&gt;&lt;span class="n"&gt;scrambled_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;CiphertextBlob&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;scrambled_data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;Now we can securely take the &lt;code&gt;scrambled_data&lt;/code&gt; blob and save it in our database. So even if a hacker dumps the whole database tables they will see a huge number of random worthless characters.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Step 2: Decrypting the Address for the Driver&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;When the delivery driver accepts the order our software has to read the address. We take the scrambled blob from the database and return it to KMS.&lt;/p&gt;

&lt;p&gt;Note that we don't even have to tell KMS which key to use here, it just knows automatically based on hidden metadata inside the blob!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Ask KMS to unlock the data
&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;kms_client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;decrypt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;CiphertextBlob&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;scrambled_data&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Extract the original, readable address
&lt;/span&gt;&lt;span class="n"&gt;readable_address&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Plaintext&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;readable_address&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; 
&lt;span class="c1"&gt;# Outputs: 123 Main Street, Apartment 4B
&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;KMS returns the plaintext if the server running this code has the correct IAM and Key rules.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Changing the Locks: Key Rotation and Aliases&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Security is not a “set it and forget it” thing. And just like you should change the locks on a physical structure every once in a while, you should rotate your encryption keys.&lt;/p&gt;

&lt;p&gt;When you’re doing your own cryptography, rotating a key is a nightmare. You have to stop your program , decrypt your entire database with the old key , re-encrypt it with the new key , and pray nothing crashes .&lt;/p&gt;

&lt;p&gt;In AWS KMS there is a button that says “Enable automatic key rotation.” You hit it. Every year AWS will generate a completely new key, secretly, and we will utilise that for all future encryption. Best part? It remembers the old keys forever so it can still decrypt your old database records without you changing a line of code.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;A Quick Tip: Use Key Aliases&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;You spotted a big &lt;code&gt;arn:aws:kms…&lt;/code&gt; string in the Python code above. Hardcoding those large strings might get ugly. KMS allows you to construct friendly names called Aliases (like &lt;code&gt;alias/delivery-app-key&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;In an emergency, if you need to point your app to a totally different master key, you just need to change what the alias points to in the AWS interface. Your code stays neat and clean, and the changeover is instantaneous.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Security Cameras: Auditing with CloudTrail&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;You might be wondering, “How do I know if someone is trying to misuse my keys?&lt;/p&gt;

&lt;p&gt;Now it’s becoming pretty fascinating. AWS KMS is tightly connected with another service called AWS CloudTrail. Imagine CloudTrail as a series of invisible security cameras that keep an eye on your digital bank vault.&lt;/p&gt;

&lt;p&gt;When your application (or a developer) requests KMS to encrypt or decrypt information, CloudTrail tracks it. If you suspect a compromise, you can open CloudTrail and receive a comprehensive receipt: 02:04 AM - User X attempted to decrypt data using Key Y and IP Address Z. It is a total lifesaver for passing compliance checks or investigating suspicious behaviour.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;If you’re designing a modern application, managing your own encryption keys manually is an unnecessary risk. What you should remember is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Never hardcode secrets:&lt;/strong&gt; The real cryptographic key should never be in the source code of your application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Embrace two-layer security:&lt;/strong&gt; Use both IAM policies and KMS Key policies together to tightly control which applications can access your keys.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Automate rotation:&lt;/strong&gt; Enable automatic key rotation in AWS KMS. It protects future data smoothly. And at the same time it is backward compatible with old data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use aliases:&lt;/strong&gt; Use Key Aliases instead of large ARN strings to make your code clearer and easier to manage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Audit everything:&lt;/strong&gt; Use AWS CloudTrail to track exactly who is using your keys and when so you always have a full security history.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Cryptography can be really complicated stuff and, in the end, trying to design your own security system from scratch is a huge organisational risk.&lt;/p&gt;

&lt;p&gt;AWS Key Management Service simplifies the most challenging portions of cryptography, including secure physical storage, hardware maintenance, and transparent key rotation, into secure API requests. KMS is the ideal solution for the job, whether you are a solo developer trying to protect your first few user passwords, or a big technical team locking down a corporate health platform.&lt;/p&gt;

&lt;p&gt;By using centralised keys, stringent access control, and automated rotation, you greatly minimise your risk. Stop hiding your digital house keys under the doormat. Let AWS hold the vault.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;About the Author&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;As an &lt;code&gt;AWS Community Builder&lt;/code&gt;, I enjoy sharing the things I've learned through my own experiences and events, and I like to help others on their path. If you found this helpful or have any questions, don't hesitate to get in touch! 🚀&lt;/p&gt;

&lt;p&gt;🔗 Connect with me on &lt;a href="https://www.linkedin.com/in/chandra-prakash-reddy/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Also Published On&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://builder.aws.com/content/3HftnEHfCfLWEvLxPEZwJtE0HvJ/locking-down-your-cloud-a-beginners-guide-to-aws-kms" rel="noopener noreferrer"&gt;AWS Builder Center&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://devopstour.hashnode.dev/locking-down-your-cloud-a-beginner-s-guide-to-aws-kms" rel="noopener noreferrer"&gt;Hashnode&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>security</category>
      <category>encrypting</category>
      <category>data</category>
    </item>
    <item>
      <title>LamRAG: 800GB, AI, And Lessons From A Project We Couldn't Complete</title>
      <dc:creator>N Chandra Prakash Reddy</dc:creator>
      <pubDate>Sun, 19 Jul 2026 12:21:13 +0000</pubDate>
      <link>https://dev.to/aws-builders/lamrag-800gb-ai-and-lessons-from-a-project-we-couldnt-complete-4m40</link>
      <guid>https://dev.to/aws-builders/lamrag-800gb-ai-and-lessons-from-a-project-we-couldnt-complete-4m40</guid>
      <description>&lt;p&gt;Let’s face it, tech conferences are usually a bunch of polished success stories, where everything works out. But one of the presentations at the AWS Community Day Kochi on December 20, 2025 took a refreshing turn.&lt;/p&gt;

&lt;p&gt;The event had many fantastic sessions but the one which really stole the show for me was Tech Session provided by &lt;a href="https://www.linkedin.com/in/sandykumar93/" rel="noopener noreferrer"&gt;Sandeep Kumar Prakash&lt;/a&gt;. The title alone was a hook: “LamRAG: 800GB, AI, And Lessons From A Project We Couldn’t Complete.”&lt;/p&gt;

&lt;p&gt;It was a masterclass in what happens when big AI dreams run into the hard realities of big data pipelines. If you’ve ever tried to design a generative AI application and felt like you were running into a brick wall, this story is for you.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Hackathon Dream: Managing a Valorant Roster&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;The project started off as a hackathon focused on Valorant. In case you don't know, Valorant is a very competitive online multiplayer First Person Shooter (FPS). It’s a 5v5 team arrangement where players can select from 28 different agents and fight on 12 different maps. The stakes are high, with 13 rounds in each game and one life per round for players.&lt;/p&gt;

&lt;p&gt;The team's mission sounded simple enough on paper. They wanted to play the role of a team manager. The goal was to construct a chatbot that could develop plans and manage league or region based team identification.&lt;/p&gt;

&lt;p&gt;To do this, they needed data. Lots of it.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Data Infrastructure: When Big Data Fights Back&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To begin, the team collected three years of data from Valorant games from three separate leagues, for a total of 7,357 individual games. So, all these files were stored by the Amazon S3. They were organised in directories like “vct-challengers”, “vct-international” and “game-changers”.&lt;/p&gt;

&lt;p&gt;At start, the total size of the S3 bucket was 101.2 GB, compressed data. That sounds straightforward, right?&lt;/p&gt;

&lt;p&gt;The problem with data is that it can be misleading. When they decompress the files, the 101 GB of compressed data increased to an awesome 800 GB of uncompressed data.&lt;/p&gt;

&lt;p&gt;They instantly ran into a big barrier. The raw data came in the form of very thick json files. Speaker offered showed a single JSON file with 8.3 million lines of code filled with complex server info and metadata. Trying to open these enormous files locally absolutely crashed their development environments. &lt;/p&gt;

&lt;p&gt;The team had to pivot their work flow totally to remedy this. They eliminated local processing and went with amazon lightsail. Amazon Lightsail and VS Code’s Remote-SSH features allowed them to finally get back to a functional and pleasant developer experience without their PCs exploding into flames.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;From Raw Data to Strategy: Finding the Signal in the Noise&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;The team rapidly learned a critical lesson: “Volume!= Value”. The fact that you have 800GB of data does not indicate that it is all valuable to an AI model.&lt;/p&gt;

&lt;p&gt;Imagine you are searching for a certain recipe in a huge library. If you just pick up every single book and throw it on your desk you are going to feel overwhelmed. You need an index.&lt;/p&gt;

&lt;p&gt;To tackle this, they implemented a data sampling method with Amazon EC2. They started moving data from their ‘raw’ folders to ‘sampling’ folders by year: 2022, 2023, 2024.&lt;/p&gt;

&lt;p&gt;Rather than sending the complete game logs into an AI, they started to separate and characterise the data. They isolated some states of the game, including "GAME_STARTED", "ROUND_STARTING", "IN_ROUND" and "GAME_ENDED". After some careful parsing, this chaotic 800GB mess was turned into highly organised, focussed datasets with unambiguous names like &lt;code&gt;map_agent_rounds_stats.json&lt;/code&gt; and &lt;code&gt;top_3_combinations_per_map.json&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The data was finally clean, it was structured, it was ready. But as speaker challenged the audience, “Data is ready but how do we use it?&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Knowledge Base Attempt: Why Default RAG Failed&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;The logical next step for most developers is Retrieval-Augmented Generation (RAG).&lt;/p&gt;

&lt;p&gt;So the team turned to Amazon Bedrock to develop a Knowledge Base by connecting straight to their S3 data-source called valorant-player-agent-map-data. They had to decide how to “chunk” or break up the text for the AI. They compare a "Default Chunking" method with a "No Chunking" method, where the data is chunked into vector records of 300 tokens while in the other a complete file is supplied as a single vector record.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs9x1z8obih6cbfuzxwi0.jpeg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs9x1z8obih6cbfuzxwi0.jpeg" alt=" " width="800" height="297"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;They booted up the Claude 3.5 Sonnet base model to try out their bright new Knowledge Base. The prompt was simple: 'make the best squad depending on combat score'.&lt;/p&gt;

&lt;p&gt;Now this is were it gets interesting. The AI went crazy.&lt;/p&gt;

&lt;p&gt;The reply said there was a player named Meteor with a fighting score of 112,861. Another player, Lakia, was reported to have scored 68,939. Any Valorant player knows these figures are mathematically insane.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnctzo4vxfph1cfmgcacz.jpeg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnctzo4vxfph1cfmgcacz.jpeg" alt=" " width="800" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The Culprits: Context Hallucination and Numeric Drift&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;So why did a super powerful AI fail fundamental statistics? Speaker set out two big ideas that all AI developers need to know:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Context Hallucination:&lt;/strong&gt; Traditional embedding models drop context. The AI didn't understand what a "combat score" actually meant in terms of "damage given". It basically searched for text strings that lived nearby in the database.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Numeric Drift:&lt;/strong&gt; Vectorising numbers makes them lose their arithmetic value. The numbers are stored only according to their logical context and not their numerical weight.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It was just treating " 112,861 " as if it were a word in a sentence , not a number that should be sorted or calculated.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Pivot to Agents and Function Calling&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Since classic RAG couldn’t handle maths, the team asked a new challenge, “How do we let AI use all the metrics?”&lt;/p&gt;

&lt;p&gt;The answer? Function Calling.&lt;/p&gt;

&lt;p&gt;Instead of making the LLM read static text, they constructed an Amazon Bedrock Agent called &lt;code&gt;valorant-l4-fn-calling&lt;/code&gt;. Again, they used Claude 3.5 Sonnet, but this time they gave it clear instructions that defined the player’s identification (handle, first name, last name) and core metrics (Assists, CombatScore, Games_played). They also formed specific “Action groups” for assignments.&lt;/p&gt;

&lt;p&gt;The architecture was fully changed to a much more dynamic system:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Amazon Bedrock&lt;/strong&gt; acts as the brain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The LLM invokes an &lt;strong&gt;AWS Lambda&lt;/strong&gt; function with a produced DSL (Domain Specific Language) Query.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AWS Lambda&lt;/strong&gt; runs the same DSL query against an &lt;strong&gt;Amazon OpenSearch&lt;/strong&gt; database.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;OpenSearch returns the hard, calculated data back to Lambda.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lambda cleans up the data and sends it back to the LLM to format into a human readable answer.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Suppose you order some meals on Swiggy. You’re not asking the app to prepare the food (conventional RAG tries to do the maths). You utilise the app to send a structured request (Function Call) to a restaurant (OpenSearch) and the delivery driver (Lambda) returns the identical result to you.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Cognitive Overload: The Final Roadblock&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;The architecture was magnificent, but the team ran across one final, impenetrable obstacle.&lt;/p&gt;

&lt;p&gt;They were asking the LLM to accomplish far too much at once. The task was to locate the best characters for N maps, then find the best players for these characters, take 5 players and match them to characters on maps, and finally build a strategy.&lt;/p&gt;

&lt;p&gt;Speaker called this "Cognitive Overload".&lt;/p&gt;

&lt;p&gt;The technical problems came thick and fast:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The Action Group answers could not be more than 25 KB, they had a strict limit.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The system was calling functions many times in the same loop.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Sometimes, the LLM created invalid OpenSearch searches.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Eventually this resulted in a “Frozen” LLM that just hung up and stopped responding altogether.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As the presentation very well concluded, “Everything worked until it worked together.”&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;If you are planning to construct a generative AI application, here are the lessons to learn the most:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Volume does not equal value:&lt;/strong&gt; 800GB of raw JSON at a problem won’t solve it. You have to clean, sample and format your data before the artificial intelligence can use it efficiently.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Standard RAG can't do math:&lt;/strong&gt; The point of embedding models is logical similarity, not mathematical accuracy. If you need to sort numbers or discover a “highest score”, by default vector search will likely hallucinate due to numeric drift.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Function calling is your bridge:&lt;/strong&gt; Instead of having the LLM read a database, employ tools like AWS Lambda and OpenSearch to allow the LLM to query the database.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Beware of cognitive overload:&lt;/strong&gt; Asking an AI to do complex filtering, matching and generating all in one single command will ruin your system. Divide complicated work into smaller, manageable chunks.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;This was a tremendous eye-opener of a session toward the conclusion of the day. We generally prefer to conceive of AI as a sort of magic wand that we can wave over unstructured data and obtain accurate outcomes.&lt;/p&gt;

&lt;p&gt;The biggest lesson Sandeep presented was “The Slap On The Face: Don’t teach an LLM what it already knows. If you’re creating AI apps, don’t make a language model do significant statistical calculations or analyse raw databases. Allow the LLM to do what it is best at reasoning and language and leverage function calls to offload the heavy job to your traditional databases.&lt;/p&gt;

&lt;p&gt;It was an extraordinary experience to observe the rough, unfinished, and incredibly informative side of building on AWS." Sometimes the tasks we don’t get to finish teach us much more than the ones that go perfectly.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;About the Author&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;As an &lt;strong&gt;AWS Community Builder&lt;/strong&gt;, I enjoy sharing the things I've learned through my own experiences and events, and I like to help others on their path. If you found this helpful or have any questions, don't hesitate to get in touch! 🚀&lt;/p&gt;

&lt;p&gt;🔗 Connect with me on &lt;a href="https://www.linkedin.com/in/chandra-prakash-reddy/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;References&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Event:&lt;/strong&gt; AWS Community Day Kochi&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Topic:&lt;/strong&gt; LamRAG: 800GB, AI, And Lessons From A Project We Couldn't Complete&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Date:&lt;/strong&gt; December 20, 2025&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Also Published On&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://builder.aws.com/content/3GikivarMeEu1M9B8oum8PHSO5A/lamrag-800gb-ai-and-lessons-from-a-project-we-couldnt-complete" rel="noopener noreferrer"&gt;AWS Builder Center&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://devopstour.hashnode.dev/lamrag-800gb-ai-and-lessons-from-a-project-we-couldn-t-complete" rel="noopener noreferrer"&gt;Hashnode&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>ai</category>
      <category>rag</category>
      <category>serverless</category>
    </item>
    <item>
      <title>AWS Bedrock VPC Flow Log Analyzer</title>
      <dc:creator>N Chandra Prakash Reddy</dc:creator>
      <pubDate>Sun, 19 Jul 2026 08:20:31 +0000</pubDate>
      <link>https://dev.to/aws-builders/aws-bedrock-vpc-flow-log-analyzer-31kf</link>
      <guid>https://dev.to/aws-builders/aws-bedrock-vpc-flow-log-analyzer-31kf</guid>
      <description>&lt;p&gt;I got a chance to attend AWS Community Day Kochi on 20 December 2025. What an amazing event! Brilliant minds, deep-dive technical courses and a strong cloud community. There were many of great seminars on everything from modern serverless architectures to more sophisticated DevOps approaches, but one session in particular stole the show for me.&lt;/p&gt;

&lt;p&gt;The session was delivered by &lt;a href="https://www.linkedin.com/in/yeshwanth-l-m/" rel="noopener noreferrer"&gt;Yeshwanth L M&lt;/a&gt; on &lt;strong&gt;AWS Bedrock VPC Flow Log Analyser&lt;/strong&gt;. This presentation was a breath of fresh air after far too many late nights staring at endless rows of black and white network logs. I made sure to snap some good pictures of the slides so I could deconstruct this great tool for you all.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Network Log Nightmare&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Let’s face it… sifting through raw network logs is a horrible, mind-numbing process.&lt;/p&gt;

&lt;p&gt;Think of a Virtual Private Cloud (VPC) as a big, high-security office building. Each time a piece of data comes in, goes out of or moves across rooms, a digital security guard makes a line in a ledger. In the AWS ecosystem this ledger is called &lt;strong&gt;VPC Flow Logs&lt;/strong&gt;. They record complete, rich IP traffic data across all your network interfaces, offering complete visibility into your network environment.&lt;/p&gt;

&lt;p&gt;Does this sound familiar? If you’ve ever turned them on, you know what the catch is. The raw logs are quite verbose and complex immediately creating huge volumes of data.&lt;/p&gt;

&lt;p&gt;To give you a feel for what this looks like in the wild, here’s an exact slice of the event data shown throughout the session. If you check your logs now, you will likely find a wall of text similar to this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2 493062987015 eni-30076669 107.170.242.27 172.31.8.238 123 123 17 1 76 1433806982 1433807038 ACCEPT OK
2 493062987015 eni-30076669 172.31.8.238 107.170.242.27 123 123 17 1 76 1433806982 1433807038 ACCEPT OK
2 493062987015 eni-30076669 79.33.7.53 172.31.8.238 54517 23 6 3 180 1433807174 1433807218 REJECT OK
2 493062987015 eni-30076669 71.6.135.131 172.31.8.238 15314 21379 6 1 40 1433807224 1433807278 REJECT OK
2 493062987015 eni-30076669 172.31.8.238 108.61.56.35 123 123 17 1 76 1433807281 1433807338 ACCEPT OK
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To get any useful information out of this digital alphabet soup , you need a specialised analysis . You need to be a wizard with advanced analytical tools or know complex query languages to even find out if your application is safe.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Analysis Bottleneck&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;The logs are so extensive that development teams are soon faced with what speaker called the “Analysis Bottleneck.” This bottleneck impacts engineering teams in 4 big ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Time-Consuming Process:&lt;/strong&gt; “Manual analysis is a big bottleneck, where it takes hours to dig through data that should be instantly available.”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Error-Prone Review:&lt;/strong&gt; The immense amount and complexity of raw text may result in manual reviews subject to human error and oversight.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Skill &amp;amp; Accessibility Barrier:&lt;/strong&gt; If a team member lacks in-depth technical knowledge of specific log querying systems, they are unable to access data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Operational Inefficiency:&lt;/strong&gt; These variables delay down incident response and hide crucial network security discoveries.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Why VPC Flow Logs Matter&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;You might be wondering...if they are such a headache to read, why don't we just avoid them?&lt;/p&gt;

&lt;p&gt;But here's the thing... you can't turn them off if you care about your cloud infrastructure. They are of extreme importance for three main reasons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Security Configuration:&lt;/strong&gt; They’re critical for detecting security group and Network ACL misconfigurations that could expose your system to attacks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Traffic Monitoring:&lt;/strong&gt; They are essential for monitoring traffic patterns and detecting anomalies indicating potential security events or performance difficulties.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Troubleshooting:&lt;/strong&gt; They are critical for diagnosing connectivity difficulties and improving your network security posture with data-driven insights.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Introducing the Bedrock-Powered Solution&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;In addition this is when it gets fascinating... What if you could chat with your network logs the same way you interact with a teammate on Slack?&lt;/p&gt;

&lt;p&gt;That’s exactly what the Amazon Bedrock-Powered VPC Flow Log Analyser accomplishes. It entirely bypasses the typical log analysis headache via 3 fundamental pillars:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Gen AI Integration:&lt;/strong&gt; It uses the latest generative AI from Amazon Bedrock to understand natural language questions with unmatched accuracy.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Plain English Queries:&lt;/strong&gt; No complex query writing is required. You simply ask enquiries in simple English, like you would to a coworker.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Intelligent Translation:&lt;/strong&gt; It automatically transforms your questions into accurate database queries to obtain useful insights from your flow logs.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Architectural Shifts: Traditional vs. Modern&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;To understand why this is a game changer, we need to understand the architecture progression. Think of your database as a huge library. If you want to know a specific information, the old technique is to study the Dewey Decimal System, locate the book, read the complete chapter.&lt;/p&gt;

&lt;p&gt;In a &lt;strong&gt;Traditional Architecture&lt;/strong&gt;, your VPC generates flow logs and pushes them to an Amazon S3 bucket. From there you need to configure Amazon Athena to analyse the logs, run custom SQL queries and tie it up to a visualisation dashboard. It works but needs effort, maintenance and a particular skill set to manage the queries.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3dy7vnmxjqabms0x88jx.jpeg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3dy7vnmxjqabms0x88jx.jpeg" alt=" " width="800" height="234"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, let’s look at the &lt;strong&gt;AWS Bedrock VPC Flow Log Analyser Architecture&lt;/strong&gt;. The set-up is simply amazing. The VPC continues to push logs to S3 and CloudWatch. But instead of an engineer writing SQL queries by hand, the logs go straight into &lt;strong&gt;Amazon Bedrock&lt;/strong&gt;. You just type into the system: “Is there any unusual activity from an unknown person?”&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faknc6bsnqhy5n3oa5ewy.jpeg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faknc6bsnqhy5n3oa5ewy.jpeg" alt=" " width="800" height="293"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;How the Data Processing Magic Works&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;So how can a raw string of text turn into an intelligent conversation? The tool orchestrates a smooth five-step Data Processing Flow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Flow Log Retrieval:&lt;/strong&gt; It takes the raw VPC Flow Log data directly from CloudWatch Logs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Formatting:&lt;/strong&gt; It converts those messy flow logs into a structured, highly readable format (e.g., &lt;code&gt;10.0.1.100:443 -&amp;gt; 10.0.2.200:80 (TCP) [ACCEPT] 1500B/10P&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Context Creation:&lt;/strong&gt; It then produces a rather complete system prompt that includes summary statistics (total records, unique IPs, bytes, packets), the detailed records from the flow log, and explicit directions for analysing the data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Bedrock Query:&lt;/strong&gt; It summarises the prepared data and the user query, and sends it directly to the Claude 3 Sonnet model in Amazon Bedrock.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Response Processing:&lt;/strong&gt; It takes the model’s output and sends the AI-generated analysis back to you.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Smart Token Management&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Long story short… there are limits to how much text Large Language Models can process at once. Speaker also built a smart token optimisation layer to maintain the tool’s speed and efficiency:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Query Limits:&lt;/strong&gt; It limits data to 150 flow log records maximum every query to prevent hitting token restrictions at any costs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Max Tokens:&lt;/strong&gt; It limits responses to 2000 tokens so that responses will be short.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Optimization:&lt;/strong&gt; It is a small format which minimises token costs but retains the detail intact.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Absolutely, the complete lack of persistent resources is what makes this tool so elegant. It invokes the model directly. That implies no creation of AI agents, no storage of data within Bedrock, no permanent knowledge bases to maintain, and every query is 100% stateless.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Getting Practical: Prerequisites and Usage&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;The Prerequisites to execute this in your own environment are really straightforward:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;AWS CLI configured with the right permissions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Python 3.10 or higher.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AWS Bedrock access in your region.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;VPC Flow Logs enabled (really the tool will guide you if they are not enabled)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;IAM Permissions for: &lt;code&gt;ec2:DescribeVpcs&lt;/code&gt;, &lt;code&gt;ec2:DescribeFlowLogs&lt;/code&gt;, &lt;code&gt;logs:FilterLogEvents&lt;/code&gt;, and &lt;code&gt;bedrock:InvokeModel&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once you clone the source and install the requirements, figuring out How to Use It is only four easy steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Run the Analyzer:&lt;/strong&gt; Execute &lt;code&gt;python vpc_flow_analyzer.py&lt;/code&gt; to start the tool.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Verify Flow Logs:&lt;/strong&gt; Enter your VPC ID; the program will check if VPC Flow Logs are enabled and provide you some instructions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Select Time Range:&lt;/strong&gt; Specify the hours of data to analyze (like 1 hour, 6 hours, 24 hours, or 1 week).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ask Questions:&lt;/strong&gt; Query your flow log data using natural language.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Real-World Questions You Can Ask&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The session showcased some great examples of questions you can ask, grouped by what you’re looking to discover:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IP &amp;amp; Port Analysis&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;"What source IP addresses do you see?"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;"List all destination IP addresses"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;"What destination ports are being accessed?"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;"Which IP has the most traffic?"&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Protocol &amp;amp; Security Analysis&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;"Show me all TCP connections"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;"Which protocols are being used?"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;"Which connections were rejected?"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;"Show me suspicious activities"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;"Are there any failed connection attempts?"&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Traffic Analysis&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;"What's the largest data transfer?"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;"Show me connections to external IPs"&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;"Which interface has the most traffic?"&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Direct Invocation vs. Bedrock Agents&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;The presentation had a wonderful architectural comparison. Why would you use direct model invocation rather than develop a full Bedrock Agent?&lt;/p&gt;

&lt;p&gt;The breakdown makes the option straightforward. Direct Model Invoke doesn’t require any setup, however Bedrock Agents require you to create an agent and build up a knowledge base. With direct invocation, no data is persisted, therefore data is always up to date from the flow logs. Bedrock Agents, in contrast, store data in knowledge bases and require constant data syncing.&lt;/p&gt;

&lt;p&gt;When all is said and done, direct invocation offers a straightforward, stateless experience pulling live data directly from CloudWatch without complex maintenance.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Cost Considerations&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The bottom line? This slim design keeps the money in your pocket. It avoids costly infrastructure, therefore the cost concerns are highly developer-friendly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Pay-per-use:&lt;/strong&gt; You are only charged for actual model invocations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Input Tokens:&lt;/strong&gt; The cost is only a function of the size of the flow log data plus the system prompt.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Output Tokens:&lt;/strong&gt; Charges are based on response length (safely capped at max 2000 tokens).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;No Setup Costs:&lt;/strong&gt; There is absolutely no infrastructure or agent setup required.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Here’s a quick rundown on why this technology is such a giant leap forward for cloud teams:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Plain English is the New Query Language:&lt;/strong&gt; You don’t need to be a SQL guru, or create complex Athena queries, to comprehend your network traffic. Just ask enquiries in a genuine manner.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Lightweight and Stateless:&lt;/strong&gt; The tool gets live data immediately without persistent storage or complex setup by calling the model directly instead of heavy Bedrock Agents.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Highly Cost-Effective:&lt;/strong&gt; You pay only for what you use. There are no knowledge bases to store, no agents to operate, hence your token expenses are very inexpensive.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Democratizes Security:&lt;/strong&gt; In the end, this solution opens up the critical network data to the team, removing the skills barrier to debugging.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;AWS Community Day Kochi 2025 was a fantastic example of how important local tech communities are. Yeshwanth’s breakthrough ideas reveal how generative artificial intelligence may remove all the friction points in ordinary cloud operations.&lt;/p&gt;

&lt;p&gt;If you are developing a startup or running cloud deployments on a small budget, binding Amazon Bedrock straight to your VPC Flow Logs is a fast, stateless and simple solution to keep your network safe. Long story short… it makes a terrible operational duty into a really entertaining conversation.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;About the Author&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;As an &lt;strong&gt;AWS Community Builder&lt;/strong&gt;, I enjoy sharing the things I've learned through my own experiences and events, and I like to help others on their path. If you found this helpful or have any questions, don't hesitate to get in touch! 🚀&lt;/p&gt;

&lt;p&gt;🔗 Connect with me on &lt;a href="https://www.linkedin.com/in/chandra-prakash-reddy/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;References&lt;/strong&gt;
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Event:&lt;/strong&gt; AWS Community Day Kochi&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Topic:&lt;/strong&gt; AWS Bedrock VPC Flow Log Analyzer&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Date:&lt;/strong&gt; December 20, 2025&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Also Published On&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://builder.aws.com/content/3GiIz0YG0uOcmpLhXnjRksWRgHg/aws-bedrock-vpc-flow-log-analyzer" rel="noopener noreferrer"&gt;AWS Builder Center&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://devopstour.hashnode.dev/aws-bedrock-vpc-flow-log-analyzer" rel="noopener noreferrer"&gt;Hashnode&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>ai</category>
      <category>bedrock</category>
      <category>vpc</category>
    </item>
    <item>
      <title>Build Your Own AI Support Assistant Using AWS Bedrock in Minutes</title>
      <dc:creator>N Chandra Prakash Reddy</dc:creator>
      <pubDate>Tue, 14 Jul 2026 13:29:41 +0000</pubDate>
      <link>https://dev.to/aws-builders/build-your-own-ai-support-assistant-using-aws-bedrock-in-minutes-521e</link>
      <guid>https://dev.to/aws-builders/build-your-own-ai-support-assistant-using-aws-bedrock-in-minutes-521e</guid>
      <description>&lt;p&gt;AWS Community Day Kochi on 20th December 2025 was a blast with awesome energy and great ideas. There were so many amazing lectures ranging from complex serverless designs to cutting-edge DevOps workflows. But one specific talk really stole the spotlight for me.&lt;/p&gt;

&lt;p&gt;The talk was on how to construct a custom AI support assistant using Amazon Bedrock. I adore practical applications of AI. I watched the speaker take complicated generative AI and break it down into a simple architecture anyone could create in minutes.&lt;/p&gt;

&lt;p&gt;We’ve all been there with a generic customer care chatbot that felt like a complete waste of time. You ask it a particular question regarding a corporate policy and it offers you a generic, unhelpful answer or just makes something up totally. Sounds familiar?&lt;/p&gt;

&lt;p&gt;Here’s the deal: default large language models (LLMs) are super smart, but they don’t immediately know your confidential company data. This lecture was spot on for that topic, how to design a highly accurate context-aware support assistant without developing tonnes of complex code.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Understanding the Core Engine: Amazon Bedrock&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Before getting into the architecture, the speaker focused on why Amazon Bedrock is such a game-changer for developers who want to build AI apps.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The Unified API Layer&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Amazon Bedrock is a kind of universal travel adaptor for generative AI models. Different AI companies construct different LLMs, but Bedrock exposes a single, standard API to interface with them all.&lt;/p&gt;

&lt;p&gt;Whether you want to use Claude, Llama, Mistral, Cohere or Amazon’s own Titan models, the request process is the same. If you wish to move between models, just update the &lt;code&gt;modelId&lt;/code&gt; parameter in your settings and everything else stays exactly the same.&lt;/p&gt;

&lt;p&gt;This means you don’t have to waste time learning a whole specialised API every time a provider delivers a new model upgrade. It enables it extremely smooth to explore, compare performance and upgrade your backend.&lt;/p&gt;

&lt;p&gt;The session explored two essential APIs that power all this interaction:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;InvokeModel:&lt;/strong&gt; You can use this API to provide direct text prompts to any text model hosted on the platform.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;InvokeAgent:&lt;/strong&gt; This API provides direct access to higher-level intelligent agents that orchestrate complex workflows.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Secret Sauce: Why Context is Everything&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;To understand why we need things like Bedrock, we need to understand how LLMs work. The speaker gave a great real-world example of a normal firm Earned Leave (EL) policy to highlight the huge difference context makes.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The Earned Leave Dilemma&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Now imagine you ask a normal out of the box LLM a simple question: "What is the earned leave policy?&lt;/p&gt;

&lt;p&gt;The model has no company-specific data, therefore it can only offer a textbook explanation of what earned leave normally entails. It can say you get 1-2 days a month or that you always need management clearance. It is correct as a general notion , technically , but totally worthless for an employee who has to know the particular rules in his organization .&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Asking with Relevant Context&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Now think that you ask the identical inquiry, but this time you give the model a sample of your real corporate HR document along with the question. The context indicates that permanent employees become eligible for earned leave after completing 6 months of employment, and that they earn 1 day of leave for every month worked.&lt;/p&gt;

&lt;p&gt;The model has that data there in front of it, so it can instantly deliver a hyper-accurate, personalised solution suited only to your organization.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Enter RAG: Retrieval-Augmented Generation&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;It is not practical to manually provide this context for every single user inquiry, and that is where Retrieval-Augmented Generation (RAG) might help.&lt;/p&gt;

&lt;p&gt;RAG is the AI model version of an open-book test. Rather of the model guessing an answer based on its training memory, RAG lets the model browse real, proven information from your documentation before answering a user.&lt;/p&gt;

&lt;p&gt;Speaker has broken down the RAG workflow into three simple, easily understood stages:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Retrieve:&lt;/strong&gt; The algorithm then searches your private papers, PDFs, FAQs, Amazon S3 buckets, or Confluence pages for information relating to the user’s question.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Augment:&lt;/strong&gt; The system then takes that obtained content and automatically puts it as a temporary context layer directly adjacent to the user’s initial prompt.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Generate:&lt;/strong&gt; The LLM reads both its baseline knowledge and the new context you gave to generate a very accurate response based solely on your data facts.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Building Blocks of a Support Assistant&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;In the past, you would have to build a full RAG system from scratch, which meant managing separate vector databases, creating data pipeline crawlers, and text chunking logic. Here’s where things get interesting: Amazon Bedrock has three built-in components that do all this heavy lifting natively.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. Bedrock Knowledge Bases&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;A Knowledge Base provides foundation models and agents with immediate access to your company's exclusive data sources. There are three easy steps to setting one up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Connect your data source:&lt;/strong&gt; Point Bedrock at your raw files sitting in Amazon S3, Confluence, SharePoint or even a Web Crawler.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Choose an embedding model:&lt;/strong&gt; Select a model like Titan Embeddings V2 to automatically turn your written documents into mathematical vectors that machines can search instantaneously.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Select a vector store:&lt;/strong&gt; Store the vectors in a separate database. With Bedrock this is simplified by having a built-in, fully managed integration with Amazon OpenSearch Serverless.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;2. Bedrock Agents&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;An LLM can only chat back and forth, and can’t do operational activities without an agent. Agents are an intelligent orchestrator for your application.&lt;/p&gt;

&lt;p&gt;They enable the LLM to automatically perform lookups on your Knowledge Base, safely access external APIs or development tools, conduct complicated multi-step workflows, and keep track of the ongoing conversation state so that the user never needs to repeat himself.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;3. Bedrock Guardrails&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;What if a user tries to deceive your support assistant into revealing important internal code? Or asks it improper questions?&lt;/p&gt;

&lt;p&gt;Guardrails provide a layer of protective policy immediately on top of your models, independent of the underlying LLM you choose to use. They give you actual operational controls including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Safety Filters:&lt;/strong&gt; Automatically block harmful, toxic, or completely unacceptable content.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;PII Protection:&lt;/strong&gt; Identify and hide sensitive personal information such as phone numbers, addresses, or emails before processing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Topic &amp;amp; Response Control:&lt;/strong&gt; Restrict the bot to topics that are company-approved and enforce organisational response policies.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Architecture Deep Dive: How It All Fits Together&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;In the session the speaker walked through the overall architecture diagram of how various components interact in real time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxyzqsxdj0mnkeat10j98.jpeg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxyzqsxdj0mnkeat10j98.jpeg" alt=" " width="800" height="354"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When a user submits a question using a customer support app, the question is sent immediately to the Bedrock Agent. The agent immediately queries the OpenSearch Service Vector Store for relevant document context.&lt;/p&gt;

&lt;p&gt;Your raw documentation stored inside an S3 bucket is fed through an embedding model and regularly updated inside that exact same vector store behind the scenes.&lt;/p&gt;

&lt;p&gt;The agent then combines the user’s initial inquiry with the newly retrieved context snippets to create a very robust, augmented prompt. This entire prompt is sent directly to the target LLM. The model examines the document context, formulates a precise answer and feeds it back through the agent to give an exact response straight to the user.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Putting It Into Practice: The Console Demo&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;To demonstrate how easy this is the speaker guided us through a console recording of a live setup, showing the precise method to create it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fiw0vyrzy7pf4rn1baqon.jpeg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fiw0vyrzy7pf4rn1baqon.jpeg" alt=" " width="799" height="347"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We saw the creation of a demo knowledge base entitled &lt;code&gt;mrinal-knowledge-base-bedrock-demo&lt;/code&gt;. In the AWS Management Console, you get a simple, step-by-step wizard that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Provide Knowledge Base details:&lt;/strong&gt; Enter your custom name and an optional description to keep your resources organized.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Configure data source:&lt;/strong&gt; Link your target storage system where your documentation lives.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Configure data storage and processing:&lt;/strong&gt; Select your embedding model and vector database settings.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Review and create:&lt;/strong&gt; Confirm your architecture settings and hit deploy.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can even choose for the console to automatically build and assign a new Identity and Access Management (IAM) service role. This guarantees your components have precisely the security permissions needed to communicate properly without you having to manually develop specific JSON IAM policies.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Taking It Further: Next Steps for Production&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;The fundamental RAG engine is super quick to build in the console, but the speaker reminded us that the real power is in where you connect it next.&lt;/p&gt;

&lt;p&gt;Once your Bedrock Agent and Knowledge Base are up and running, you can quickly expand its capabilities to your exact business stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Integrate with chat platforms:&lt;/strong&gt; Connect your agent directly to your daily communication platforms, such as Slack or Microsoft Teams, so your team may query internal documents in real time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Enable email-based support:&lt;/strong&gt; Integrate your agent with Amazon Simple Email Service (SES) or Amazon WorkMail to automatically parse incoming customer emails and produce precise contextual answers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Connect incident management tools:&lt;/strong&gt; Let your agent directly talk to operations systems (PagerDuty, Jira, ServiceNow, etc) to dynamically open support logs, or auto-triage engineering requests.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Sitting during this session, it struck me how fast the barriers to entry for developing powerful AI are coming down. If you aim to develop your own helper, remember these fundamental lessons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The standard API saves major time:&lt;/strong&gt; You don’t need to rewrite the architecture of your application just because a new model launches. Bedrock does the heavy lifting, so you can swap models in an instant by altering one parameter.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Context solves the hallucination problem:&lt;/strong&gt; LLMs not trained on specific data have an ability to guess out of the box. Grounding the model with a precise documentation context via a RAG pipeline to maintain it correct and relevant.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Infrastructure management is optional:&lt;/strong&gt; Instead, with fully integrated solutions like OpenSearch Serverless and managed Bedrock Agents, you can avoid weeks of effort in setting up infrastructure and implementing customised orchestration scripts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Security should never be an afterthought:&lt;/strong&gt; Built-in solutions like Bedrock Guardrails allow you to safely deploy user-facing AI by hiding PII data and enforcing strict subject boundaries from the start.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;AWS Community Day Kochi was a great reminder of how practical and accessible cloud technology is today. To summarise, you don’t need a big team of data scientists or millions of rows of specific training data to construct a smart, business-aware AI assistant.&lt;/p&gt;

&lt;p&gt;With Bedrock Knowledge Bases, Agents, and Guardrails, you can go from raw PDF documents to a fully operational, safe, and context-aware support bot in minutes. The tools are production ready, so now it’s time to go out and build.&lt;/p&gt;

&lt;p&gt;If you have been waiting to build your own AI tool because the environment felt too complex, I highly encourage diving into the AWS interface and trying Bedrock for yourself. It’s highly developer friendly, ridiculously quick to get up and running, and powerful enough to revolutionise how your team does operations.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;About the Author&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;As an &lt;strong&gt;AWS Community Builder&lt;/strong&gt;, I enjoy sharing the things I've learned through my own experiences and events, and I like to help others on their path. If you found this helpful or have any questions, don't hesitate to get in touch! 🚀&lt;/p&gt;

&lt;p&gt;🔗 Connect with me on &lt;a href="https://www.linkedin.com/in/chandra-prakash-reddy/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;References&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Event:&lt;/strong&gt; AWS Community Day Kochi&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Topic:&lt;/strong&gt; Build Your Own AI Support Assistant Using AWS Bedrock in Minutes&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Date:&lt;/strong&gt; December 20, 2025&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Also Published On&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://builder.aws.com/content/3GUmbUNI6XrSnpEAoSB4ygRPTiq/build-your-own-ai-support-assistant-using-aws-bedrock-in-minutes" rel="noopener noreferrer"&gt;AWS Builder Center&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://devopstour.hashnode.dev/build-your-own-ai-support-assistant-using-aws-bedrock-in-minutes" rel="noopener noreferrer"&gt;Hashnode&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>ai</category>
      <category>bedrock</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Scaling Custom LLMs on EKS: Trainium and Inferentia2-Powered AI Infrastructure</title>
      <dc:creator>N Chandra Prakash Reddy</dc:creator>
      <pubDate>Mon, 13 Jul 2026 15:19:24 +0000</pubDate>
      <link>https://dev.to/aws-builders/scaling-custom-llms-on-eks-trainium-and-inferentia2-powered-ai-infrastructure-3nbh</link>
      <guid>https://dev.to/aws-builders/scaling-custom-llms-on-eks-trainium-and-inferentia2-powered-ai-infrastructure-3nbh</guid>
      <description>&lt;p&gt;I attended AWS Community Day Kochi on 20th December 2025 and it was full of amazing insights. There were a lot of great seminars throughout the day on different AWS services but one session in particular totally caught my eye. The session featured a technical deep dive, “Scaling Custom LLMs on EKS: Trainium and Inferentia2-Powered AI Infrastructure”.&lt;/p&gt;

&lt;p&gt;Here’s the rundown of what was covered and how it all works and why it matters if you’re building AI apps today.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Challenge: When Do You Outgrow Standard APIs?&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Let's face it, using off-the-shelf APIs like OpenAI or Anthropic is great for rapid prototyping. You obtain an API key, you write three lines of code, and you have intelligence embedded right into your program. But what if your app goes viral and takes off?&lt;/p&gt;

&lt;p&gt;The speaker hit us with a hard truth straight away: API costs increase dramatically with request volume. Think of it as a cab. It is quite useful for short, occasional journeys. However, if you are driving 100 miles each day, then owning your own automobile makes a lot more financial sense.&lt;/p&gt;

&lt;p&gt;Session data suggests the important inflection point is at around 10 million requests each day. That’s when third party APIs become too expensive and building a custom platform is a very practical, affordable necessity.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Enter AWS Purpose-Built Chips&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;This is a huge scalability problem. To overcome this AWS has come up with purpose-made hardware accelerators that are specifically developed and constructed from the ground up for Generative AI workloads.&lt;/p&gt;

&lt;p&gt;We all know what a typical GPU is, but they are expensive to rent and hard to get at scale. AWS has created its own silicon to solve this very problem.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AWS Inferentia (Inf1):&lt;/strong&gt; It offers the lowest cost per inference in the cloud for Deep Learning models, with costs up to 70% cheaper than normal EC2 instances.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AWS Inferentia2 (Inf2):&lt;/strong&gt; Specifically designed for large language model (LLM) and diffusion model. It offers up to 40% better price performance than equivalent EC2 instances.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AWS Trainium (Trn1):&lt;/strong&gt; Your powerhouse for model training. This means you can achieve up to 50% savings on training costs compared to equivalent Amazon EC2 instances.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Architecture: Bringing it All Together on EKS&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Great software is essential to make hardware useful. This is where the AWS Generative AI stack and SDK for Neurone come into play. Neurone SDK bridges third-party applications such as PyTorch, Ray and vLLM to the underlying Trainium and Inferentia hardware.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy4xc74q3jtna7tkngj8h.jpeg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy4xc74q3jtna7tkngj8h.jpeg" alt=" " width="800" height="455"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The worldwide plan showed a very resilient arrangement across regions. Users connect to an Application Load Balancer via a Global Accelerator, and the Application Load Balancer sends the traffic to a Karpenter-managed, dynamically provisioned Amazon EKS cluster. The models are directly served from the hardware nodes using an Nvidia Triton Inference Server in the cluster, running vLLM and the Neurone ML SDK.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Reality of Training and Serving at Scale&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Imagine painting a big canvas all by yourself with a teeny little brush. That's about how it feels training a massive LLM on a single GPU.&lt;/p&gt;

&lt;p&gt;The speaker states that training a certain large model on a single GPU may take ~120 days and cost $500k+. A Trainium Cluster provides the ability to run numerous processors in simultaneously. That takes overall training time down to just 14 days, and cuts the cost to $150k - an astounding 70% cheaper.&lt;/p&gt;

&lt;p&gt;Just as vital is serving. 500ms latency is a sluggish experience for traditional GPUs. Inferentia2 lowers this down to a 100-200ms latency, making the experience feel nearly quick, all while being 70% cheaper.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Hands-On: The EKS Configurations and Code&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;This is where it gets good. The speaker dived straight into the live demo, presenting the real setups that make this magic happen.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F36izp7x27ge1eu4sm6jn.jpeg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F36izp7x27ge1eu4sm6jn.jpeg" alt=" " width="800" height="316"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1. The Kubernetes Magic Line&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you want to use a Trainium or Inferentia device in your Kubernetes deployment, just add one magic line in your resource limits: &lt;code&gt;[aws.amazon.com/neuron](https://aws.amazon.com/neuron): "1"&lt;/code&gt; .&lt;/p&gt;

&lt;p&gt;Here is what the manifest looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# The Magic Line - Requesting Neuron Device
resources:
  requests:
    cpu: "4"
    memory: 16Gi
    aws.amazon.com/neuron: "1"   # &amp;lt;- Request 1 Trainium/Inferentia device
  limits:
    cpu: "8"
    memory: 32Gi
    aws.amazon.com/neuron: "1"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To bridge the gap between Kubernetes and the physical hardware, you deploy a DaemonSet called the &lt;code&gt;neuron-device-plugin&lt;/code&gt;. It automatically discovers the hardware and mounts the &lt;code&gt;/dev/neuron*&lt;/code&gt; paths:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# DaemonSet discovers and exposes Neuron devices
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: neuron-device-plugin
  namespace: kube-system
spec:
  template:
    spec:
      containers:
        - name: neuron-device-plugin
          image: public.ecr.aws/neuron/neuron-device-plugin:2.19.16.0
          securityContext:
            privileged: true  # Required to access /dev/neuron*
          volumeMounts:
            - name: device-plugin
              mountPath: /var/lib/kubelet/device-plugins
            - name: neuron-dir
              mountPath: /dev  # Access Neuron devices
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. &lt;strong&gt;Protecting Your Budget with Taints&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Here’s a huge money saving tip. Trainium on-demand nodes cost around $1.34 per hour. You do not want to run simple system pods like CoreDNS on those pricey ML instances!&lt;/p&gt;

&lt;p&gt;Using Terraform, you can apply a taint to block non-ML pods:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Terraform: Node Group with Taint
taint {
  key    = "aws.amazon.com/neuron"
  value  = "true"
  effect = "NO_SCHEDULE" # Block non-ML pods!
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then you just add a toleration in your kubernetes deployment so your ml pods can schedule there:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Kubernetes: Pod must tolerate to run on Neuron node
tolerations:
  - key: "aws.amazon.com/neuron"
    operator: "Equal"
    value: "true"
    effect: "NoSchedule"

nodeSelector:
  node-type: trainium          # Target Trainium nodes
  aws.amazon.com/neuron: "true"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. &lt;strong&gt;Training with PyTorch + Neuron&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The real training code with Pytorch and Hugging Face is delightfully simple. Notice how loading the model in &lt;code&gt;bfloat16&lt;/code&gt; offers you a 2x memory save right away:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Training on Trainium
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

# Load model
model = AutoModelForCausalLM.from_pretrained(
    "TinyLlama/TinyLlama-1.1B-Chat-v1.0",
    torch_dtype=torch.bfloat16,  # BF16 = 2x memory savings
)

# Assume model_path is defined
tokenizer = AutoTokenizer.from_pretrained(model_path)
tokenizer.pad_token = tokenizer.eos_token

# Simple training loop
optimizer = torch.optim.AdamW(model.parameters(), lr=1e-5)
model.train()

for step, batch in enumerate(dataloader):
    outputs = model(
        input_ids=batch["input_ids"],
        attention_mask=batch["attention_mask"],
        labels=batch["labels"],
    )
    loss = outputs.loss
    loss.backward()
    optimizer.step()
    optimizer.zero_grad()

    print(f"Step {step} - Loss: {loss.item():.4f}")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. &lt;strong&gt;Serving the Model with FastAPI&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The speaker exhibited a clean FastAPI wrapper providing the trained model on Inferentia2.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Inference Server on Inferentia2
from fastapi import FastAPI
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

app = FastAPI(title="TinyLlama Inference API")

# Load model once at startup
model = AutoModelForCausalLM.from_pretrained("/models/tinyllama")
tokenizer = AutoTokenizer.from_pretrained("/models/tinyllama")

@app.get("/health")
async def health():
    return {"status": "healthy"}

@app.post("/v1/generate")
async def generate(prompt: str, max_tokens: int = 100):
    inputs = tokenizer(prompt, return_tensors="pt")

    with torch.no_grad():
        outputs = model.generate(
            **inputs,
            max_new_tokens=max_tokens,
            temperature=0.7,
            do_sample=True,
        )

    return {
        "generated_text": tokenizer.decode(outputs[0], skip_special_tokens=True)
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  &lt;strong&gt;The Bottom Line: Math and Money&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Your workload is the single most important factor for your memory needs. For a 7B parameter model running in BF16:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Inference Memory:&lt;/strong&gt; Needs about 16.8 GB of memory. This fits nicely on an &lt;code&gt;inf2.xlarge&lt;/code&gt; instance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Training Memory:&lt;/strong&gt; You need a big 56 GB because you need to save gradients and optimisers.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The final pricing comparison was the most jaw-dropping slide. APIs with significant traffic can easily run to $60,000/month off-the-shelf. Running your own EKS cluster with Inf2 On-Demand instances reduces that to $547.&lt;/p&gt;

&lt;p&gt;But the true game-changer is that you are able to set up Spot Instances with Terraform.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Terraform: Enable Spot Instances
resource "aws_eks_node_group" "trainium" {
  instance_types = ["trn1.2xlarge"]

  # THE MONEY SAVER 
  capacity_type = "SPOT"  # vs "ON_DEMAND"

  # Scale to zero when not training
  scaling_config {
    desired_size = 0      # Start at zero!
    min_size     = 0      # Allow scale to zero
    max_size     = 1
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;EKS with Inf2 Spot instances (which can scale down to zero when idle) brings the monthly cost down to a mere $166. That's a crazy inexpensive $0.17 every 1K inferences!&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The 10M Threshold:&lt;/strong&gt; Third party LLM APIs stop making economical sense and specialised infrastructure becomes needed after 10 million daily requests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Massive Cost Slashes:&lt;/strong&gt; Move to an EKS cluster with Trainium and Inferentia2 and cut 50% of your training costs and 40% of your inference costs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Budget Guardrails:&lt;/strong&gt; Kubernetes standards and tolerations prohibit basic system pods from schedule-squatting on your premium $1.34/hr ML nodes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Performance Without Compromise:&lt;/strong&gt; Lowering infrastructure expenses doesn’t mean losing user experience. Inferentia2 readily maintains a latency of 100-200ms and a sub-100ms P99 latency even at a large 70B parameter scale.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Building custom Generative AI infrastructure is no longer some black art for the tech giants with endless cash at the end of the day. AWS has democratised the hardware layer with purpose-built silicon, and the software gap is bridged with open-source tools like the Neurone SDK, making it developer-friendly.&lt;/p&gt;

&lt;p&gt;Long story short, if you are establishing an AI firm or trying to extend an engineering staff beyond basic API wrappers, it's well worth the effort to break free from third-party locks by understanding this purpose-built AWS stack.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;About the Author&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;As an &lt;strong&gt;AWS Community Builder&lt;/strong&gt;, I enjoy sharing the things I've learned through my own experiences and events, and I like to help others on their path. If you found this helpful or have any questions, don't hesitate to get in touch! 🚀&lt;/p&gt;

&lt;p&gt;🔗 Connect with me on &lt;a href="https://www.linkedin.com/in/chandra-prakash-reddy/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;References&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Event:&lt;/strong&gt; AWS Community Day Kochi&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Topic:&lt;/strong&gt; Scaling Custom LLMs on EKS: Trainium and Inferentia2-Powered AI Infrastructure&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Date:&lt;/strong&gt; December 20, 2025&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Also Published On&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://builder.aws.com/content/3GSB51WZTEhomgO5dGSDD1Lxyss/scaling-custom-llms-on-eks-trainium-and-inferentia2-powered-ai-infrastructure" rel="noopener noreferrer"&gt;AWS Builder Center&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://devopstour.hashnode.dev/scaling-custom-llms-on-eks-trainium-and-inferentia2-powered-ai-infrastructure" rel="noopener noreferrer"&gt;Hashnode&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>kubernetes</category>
      <category>python</category>
      <category>terraform</category>
    </item>
    <item>
      <title>From Lake to LLM: Building AI-Ready Data with Amazon S3 Tables</title>
      <dc:creator>N Chandra Prakash Reddy</dc:creator>
      <pubDate>Sun, 05 Jul 2026 16:56:04 +0000</pubDate>
      <link>https://dev.to/aws-builders/from-lake-to-llm-building-ai-ready-data-with-amazon-s3-tables-35i2</link>
      <guid>https://dev.to/aws-builders/from-lake-to-llm-building-ai-ready-data-with-amazon-s3-tables-35i2</guid>
      <description>&lt;p&gt;Participating in the AWS Community Day Kochi on December 20, 2025 was an absolutely fantastic experience. There is always a certain type of energy being surrounded by passionate developers, cloud architects and techies. There were so many amazing seminars throughout the day but as someone who is really interested in data architecture, one particular tech session immediately grabbed my attention.&lt;/p&gt;

&lt;p&gt;The title of the talk was “From Lake to LLM: Building AI-Ready Data with Amazon S3 Tables”. Let's be honest, getting your data truly ready for Artificial Intelligence is typically a major hassle. We hear all this excitement about Generative AI, but very few people talk about the filthy plumbing it takes to make it work. It was a breath of fresh air of a session since it handled that precise plumbing issue head-on.&lt;/p&gt;

&lt;p&gt;Here's my thorough dive into what I learnt, including the session's insights and a few comments of my own to help break down the more complex aspects.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Messy Reality of Today’s Data Lakes&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;The speaker opened the discussion by tackling the elephant in the room: the enormous “Enterprise AI Adoption Gap”. Does this sound familiar? Many of us have encountered this first hand while attempting to construct machine learning models for our firms.&lt;/p&gt;

&lt;p&gt;The main concern uncovered in the session is that bad data in S3 is a real blocker to AI adoption. Think of your company's database as a giant public library. If books ( your data ) are just scattered randomly on the floor instead of being carefully sorted on labeled shelves , nobody can find what they need . This is exactly what is happening with traditional data lakes with scattered files and profound inconsistencies and absolute chaos.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What is Actually Blocking AI?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;You might be thinking, why can’t we just point a Large Language Model (LLM) at our existing data lake and let it sort things out. The talk nicely outlined the technical blockers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Raw S3 Lacks Structure:&lt;/strong&gt; Basic, raw S3 storage has no built-in schema and query semantics. It only stores files, it doesn't know what is in them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Siloed Workloads:&lt;/strong&gt; Usually Business Intelligence (BI) teams and AI teams work with completely different storage pathways. This implies you’re paying to duplicate data and those two copies eventually get out of sync.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data and Schema Drift:&lt;/strong&gt; Over time, your data format will vary (this is termed "drift"). The slides made clear that schema drift often disrupts downstream pipelines. Data drift also leads directly to wildly uneven AI outcomes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Lack of Versioning:&lt;/strong&gt; A simple S3 setup means losing transactional assurances and tight versioning, which makes your machine learning models much less reliable.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The RAG Headache:&lt;/strong&gt; Implementing Retrieval-Augmented Generation (RAG), which is how you allow an AI search your private papers, often puts large, highly advanced components into your system.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The point is, LLMs are not magic. They really need to have clean, consistent, and highly controlled data in order to work correctly. Feed them rubbish and they'll hallucinate poor data.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Fix: A Unified AI-Ready Data Foundation&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Enterprises are desperate for a uniform data foundation to fix this chaos. We require a single platform that can run both typical SQL queries and advanced analytics workloads, instead of duct-taping different services together.&lt;/p&gt;

&lt;p&gt;The speaker stressed that this modern base needs to have native support built-in for RAG, vector embeddings and seamless LLM-driven insights. It needs centralized governance, accurate data lineage (understanding where your data comes from), and reproducibility across all different workloads.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Entering the Modern Lakehouse Approach&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This is when things become interesting. The session continued with the “Modern Lakehouse Approach”. In particular, they un-veiled the capabilities of Amazon S3 Tables that natively build on top of the open source Apache Iceberg format under the hood.&lt;/p&gt;

&lt;p&gt;That means S3 Tables deliver the ACID transactional guarantees right to your data lake. An ACID transaction is like sending money electronically. When you transfer ₹1000 to a friend, the system ensures that the money is deducted from you and added to your buddy's account concurrently. If the internet goes down mid way the entire transaction is cancelled. It never leaves money floating about in cyberspace. S3 Tables provides your data files with the same unassailable reliability.&lt;/p&gt;

&lt;p&gt;This service provides queryable table semantics and strong schema and metadata consistency. It creates strong governance at the data layer itself, providing the all-important uniform base for both analytics and AI.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Structuring the Chaos: The Medallion Architecture&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;So how do you manage this new strong lakehouse? The speaker was very bullish on the “Medallion Approach” in data engineering. Imagine this as filtering drinking water. You begin with a muddy river, then you run the water through coarse filters, then fine filters. At the end, you have pure and safe bottled water.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Bronze Layer (The River):&lt;/strong&gt; This is where raw ingestion and historical data are landed straight from streaming sources such as Kafka and Kinesis or batch sources such as Apache Spark and regular CSV/JSON/TXT files&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Silver Layer (The Filter):&lt;/strong&gt; This is where the raw data is thoroughly screened, cleansed and enriched. Null values are dropped, formats are standardized.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Gold Layer (The Bottled Water):&lt;/strong&gt; Finally the data is converted to company level aggregates. This is the clean, high-quality data that executives and AI models are fed.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This layered pipeline is built on a solid base of data quality and governance, and flows directly into streaming analytics, BI reporting, data science/ML environments, and data sharing platforms.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Seeing it in Action: Sales Analytics Architecture&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;To be fair, abstract architectural patterns can seem a little frightening. But the presenter simplified it down with a very practical use case: Building a Sales Analytics platform with Customer Feedback.&lt;/p&gt;

&lt;p&gt;The architecture diagram showed a beautiful, logical flow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Data flows from a source S3 bucket via automated ingestion jobs into the Bronze S3 table.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Transformation jobs then move it into the Silver S3 table.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A important step between the Silver and Gold layers is the production of text embeddings. This is the part where client text reviews are converted into numbers so the AI can understand them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The refined data lands in the Gold layer S3 table.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fje3gexv29s4zaf23mf1p.jpeg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fje3gexv29s4zaf23mf1p.jpeg" alt=" " width="800" height="284"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From that Gold layer, the data is spread out. Connects to SageMaker Unified Studio for large ML workloads. It also interfaces with a Conversational Chat Interface that runs on Anthropic's Claude LLM and a Model Context Protocol (MCP) Server.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Claude and S3 Tables: The Ultimate Chat Interface&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;The live demo of the MCP Server querying S3 Tables with Claude was definitely the highlight of the session. The demonstration typed a request into Claude asking it to explain the revenue pattern for EMEA in Q2 2024 and to summarize customer comments connected to that.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fav5597zzk3xl4bpo5sag.jpeg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fav5597zzk3xl4bpo5sag.jpeg" alt=" " width="800" height="365"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Claude logged easily into the database and looked over the results. It said total Q2 revenue was $840,000, but quickly noticed a huge 33% revenue loss for “Product A (Enterprise).”&lt;/p&gt;

&lt;p&gt;Instead of a human data analyst hunting for the reason, Claude cross-referenced the customer input. It brought to light the instability and app crashes at peak hours of Product A, leaving the team frustrated. It also brought up criticism for “Product B (MidMarket)” about a competitive gap where customers may churn and “Product C (SMB)” for unclear billing and invoicing problems.&lt;/p&gt;

&lt;p&gt;In brief, this design makes complex, large database tables instantly usable business insight, simply by conversing with it in simple English.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Why This Makes Your Data "AI-Ready"&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;The end result? Amazon S3 Tables are meant to be AI-ready.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;They give dependable transactions that result in consistent data pipelines. Your AI is not learning from incomplete files.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;They allow flexible schema evolution, so you can evolve easily to changing machine learning models without damaging downstream systems.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;They actively address the schema drift and lack of versioning that has typically restricted ML reliability.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;S3 Tables solve these fundamental infrastructure issues, and deliver the clean, consistent and regulated datasets that LLMs demand.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Enterprise Gains (The Payoff)&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Ultimately, embracing an AI-Ready Lakehouse is more than a technological flex, it will mean huge, measurable organizational benefits.&lt;/p&gt;

&lt;p&gt;This architecture will allow organizations to view:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Significantly faster delivery of AI and analytics solutions to their customers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Far more reliable and consistent LLM-generated outputs (reduced hallucination!).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reduced infrastructure complexity and overall cloud costs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Better compliance with stringent compliance and corporate governance norms.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scalable performance specifically designed to handle rapidly growing datasets.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;If you’re skimming, here’s a fast summary of the most important things you need to know from the session:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Raw storage is not enough:&lt;/strong&gt; Just throwing files into an S3 bucket results in schema drift and inconsistencies. LLMs require clean, regulated datasets to produce reliable outputs without hallucinations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Transactions matter:&lt;/strong&gt; S3 Tables (powered by Apache Iceberg) provides ACID transactional guarantees to your data lake, preventing broken pipelines so your models are training on reliable data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Layer your data:&lt;/strong&gt; The Medallion Approach (Bronze, Silver, Gold) is the best technique to turn messy, raw intake into high quality, enterprise level aggregates appropriate for AI consumption.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Unify your foundation:&lt;/strong&gt; You don’t have to buy and operate different storage routes for regular BI reporting and advanced AI workloads. A modern lakehouse can manage SQL, analytics and LLM-driven insights under one roof.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;At the end of the day, your generative AI applications are only as good as the data you provide them. The session at AWS Community Day Kochi was a reminder that the conventional, chaotic data lake is no longer good enough for modern needs.&lt;/p&gt;

&lt;p&gt;With a modern lakehouse strategy using Amazon S3 Tables, we can finally simplify infrastructure complexity and generate much higher trust in our LLM outputs. It takes a little planning to get the right design but the scalable performance and strong oversight you obtain is totally worth it. In short, it’s time to improve our data foundations from a storage lake to a real AI engine.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;About the Author&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;As an &lt;strong&gt;AWS Community Builder&lt;/strong&gt;, I enjoy sharing the things I've learned through my own experiences and events, and I like to help others on their path. If you found this helpful or have any questions, don't hesitate to get in touch! 🚀&lt;/p&gt;

&lt;p&gt;🔗 Connect with me on &lt;a href="https://www.linkedin.com/in/chandra-prakash-reddy/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;References&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Event:&lt;/strong&gt; AWS Community Day Kochi&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Topic:&lt;/strong&gt; From Lake to LLM: Building AI-Ready Data with Amazon S3 Tables&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Date:&lt;/strong&gt; December 20, 2025&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Also Published On&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://builder.aws.com/content/3G5kJV5Yzphj95hmQ2DV5ijlJ15/from-lake-to-llm-building-ai-ready-data-with-amazon-s3-tables" rel="noopener noreferrer"&gt;AWS Builder Center&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://devopstour.hashnode.dev/from-lake-to-llm-building-ai-ready-data-with-amazon-s3-tables" rel="noopener noreferrer"&gt;Hashnode&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>ai</category>
      <category>claude</category>
      <category>mcp</category>
    </item>
    <item>
      <title>14x Cheaper AI: A Real-World LLM Distillation Case Study on Bedrock</title>
      <dc:creator>N Chandra Prakash Reddy</dc:creator>
      <pubDate>Sun, 05 Jul 2026 13:06:31 +0000</pubDate>
      <link>https://dev.to/aws-builders/14x-cheaper-ai-a-real-world-llm-distillation-case-study-on-bedrock-lph</link>
      <guid>https://dev.to/aws-builders/14x-cheaper-ai-a-real-world-llm-distillation-case-study-on-bedrock-lph</guid>
      <description>&lt;p&gt;On 20 December 2025, I was fortunate to be a part of the AWS Community Day Kochi. There were fantastic sessions going on throughout the event, but there was one presentation in particular that caught my whole attention and wouldn’t let go.&lt;/p&gt;

&lt;p&gt;The speaker came on stage and delivered a big result right out of the gate – they reduced their AI operational costs by 14x using AWS Bedrock. But this wasn’t a highlight reel of quick success. Let’s face it, tech talks that only display the wonderful stuff don’t educate us much. Instead, there was a clear story of how the squad failed again and again on the route to the big victory.&lt;/p&gt;

&lt;p&gt;This session was pure gold if you are a developer, or a firm seeking to scale AI features without burning through your entire runway. Here’s a look at the trip, the technological challenges, and how they finally cracked the puzzle.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Business Problem: A 3-Body Challenge&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;But before we get to the solution, we need to understand the nightmare the team was dealing with. They named it the “3-Body Challenge.”&lt;/p&gt;

&lt;p&gt;The trouble is...they were drowning in data. Specifically, they were being overwhelmed with unstructured communications about cargo bookings.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The emails were bilingual and consisted of a crazy mix of Japanese and English content.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;They needed their system to be able to correctly extract 23 complicated entities from these emails, such as Air Waybill (AWB) numbers, Flight Numbers, Weights and Dimensions.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The Accuracy vs. Cost Dilemma&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The aim was to carry out real-time automatic Named Entity Recognition (NER). The system needed to be low latency, and have a very high accuracy rate of over 95% (f1 score), to be useful in the production pipeline.&lt;/p&gt;

&lt;p&gt;You might be wondering why not just throw a Large Language Model (LLM) at it? They did well. And the LLM readily met the precision required. But the operating cost at that high volume was a deal breaker.&lt;/p&gt;

&lt;p&gt;Sound familiar? This is a trap many teams get into. They had designed a system that worked well, but they knew they could never build a business around a 14x cost problem.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Rethinking the Core Problem&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;The first important change in their thinking was in how they approached Named Entity Recognition. Instead than using typical BIO (Beginning, Inside, Outside) tagging, they defined NER as a Sequence-to-Sequence (Seq2Seq) task.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Generating Structured JSON&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To grasp this, picture it like an e-commerce checkout system. You don’t want the system to just highlight random goods in a shopping cart, you want it to create a well-formed receipt.&lt;/p&gt;

&lt;p&gt;The input (sequence 1) in their case was the raw, jumbled email text prompt asking the model to extract all 23 entities as a JSON array. The expected output (sequence 2) was the exact JSON text produced that matched those entities.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fshkzfmpzupxem6yert39.jpeg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fshkzfmpzupxem6yert39.jpeg" alt=" " width="800" height="325"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Technical Goal: Knowledge Distillation&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;To achieve the high accuracy of a big LLM without the massive price, they turned to a concept known as Knowledge Distillation.&lt;/p&gt;

&lt;p&gt;Think of your database as a huge library and the “Teacher Model” as the chief librarian who has read and comprehended every book. The teacher is large, complex and expensive to consult. The purpose of distillation is to compress the knowledge and transfer it to a “Student Model”. The student is smaller, considerably faster and much cheaper to run, offering you the best of both worlds, great precision and low cost.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Evaluating the Distillation Options&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The speaker outlined the major routes he may take to achieve this knowledge transfer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Option 1:&lt;/strong&gt; Logit-Based (e.g., DistilBERT): This method uses a metric called KL Divergence to match the student's final output probabilities (logits) to the teacher's. It is easy, fast and effective. But it typically misses a lot of the sophisticated internal “reasoning” of the teacher model.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Option 2:&lt;/strong&gt; Feature-Based (e.g., TinyBERT): That is, to align the internal hidden states and attention mappings of the two models. these transfer knowledge really deep. The negatives? It's quite brittle. It requires model architectures to be same and is quite sensitive to throwing &lt;code&gt;shape_mismatch&lt;/code&gt; errors.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Option 3:&lt;/strong&gt; Token-Based: Here, the teacher model is compared with the final output sequence of the pupil token by token. It learns from the teacher's soft labels and is suitable for generative Seq2Seq jobs such as the JSON extraction they needed.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They decided to go with the Token-Based method as they were generating JSON arrays. And now it gets interesting, and by fascinating I mean extremely frustrating for their engineering team.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Engineering Nightmares&lt;/strong&gt;
&lt;/h1&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Attempt 1: The Token Mismatch Wall&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Their initial approach was a custom token distillation built with PyTorch. They sought to distill the Llama 3-8B model to the Llama 3-1B model with their specialized Seq2Seq task.&lt;/p&gt;

&lt;p&gt;In fairness, the logic was reasonable, but the technological reality was a failure. For token-based distillation, you need absolute, perfect token alignment in order to effectively distill that output JSON. They ran into a big problem: the Llama 3 tokenizer and their Japanese/English bilingual text were misaligned.&lt;/p&gt;

&lt;p&gt;They were trying to compare output sequences that just didn’t line up, and the training loss got wildly unstable. This caused a constant &lt;code&gt;token_mismatch_error&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Attempt 2: The Brittle Architecture Wall&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Try 2. No way they were giving up. They tried to run a Logit/Feature-Based distillation technique with a library named TextBrewer.&lt;/p&gt;

&lt;p&gt;This, too, died a technical death, as the solution was too brittle and required completely matching architectures. The library was quite strict about requirements and their specific Llama models were incompatible.&lt;/p&gt;

&lt;p&gt;The operation failed again, generating a &lt;strong&gt;shape_mismatch_error&lt;/strong&gt;. The team found that they were spending 100% of their time fighting engineering difficulties and 0% of their time on true data research.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Pivot: Isolating the Real Problem&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;The team stepped back and saw their problem was not a terrible theory. Their problem was bad engineering. They were getting beaten on the two hardest segments of the pipeline:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Tokenizer and Architecture Alignment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Setting up stable, distributed training environments.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In short, they required a completely managed solution to do the heavy lifting on the engineering requirements things like framework selection, dataset preparation, and normalizations so they could focus entirely on addressing their business challenge.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Enter Amazon Bedrock Model Distillation&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;They migrated their whole pipeline to Amazon Bedrock. The new method looked like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Take the user prompts and feed them into the large Teacher model.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Generate high-quality synthetic data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use that data to train the smaller Student model and transfer the knowledge.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deploy the customized distilled model for real-world inference.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The workflow was pleasantly simple. The prepared prompt dataset was just taken by a data scientist and turned into a JSONL file and uploaded to an Amazon S3 bucket. They then picked whatever instructor and student models they wanted from within the Amazon Bedrock service to start the distillation job.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft9shdf1orq8onwgcowlb.jpeg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft9shdf1orq8onwgcowlb.jpeg" alt=" " width="800" height="248"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What made this one work while all the others didn't? It wasn’t magic, the speaker pointed out. I checked the CloudWatch training logs and it just... worked.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;It solved alignment:&lt;/strong&gt; By using the compatible Nova Pro and Nova Lite model family, there was zero token mismatch.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;It solved stability:&lt;/strong&gt; The managed service handled all the complex orchestration behind the scenes.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Their training loss went from 0.05 to a very accurate 0.008 in just 4 epochs and 70 total steps.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Results: Fast, Accurate, and Cheap&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;They ran the newly distilled Nova Lite model that took the jumbled input prompt and produced a perfectly formatted JSON output array of the desired entities.&lt;/p&gt;

&lt;p&gt;The bottom line? The stats tell the story:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Teacher (Nova):&lt;/strong&gt; Achieved a 97% overall F1 score (96.3% English, 95.4% Japanese) but cost 14x more to run.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Student (Nova Lite):&lt;/strong&gt; Achieved a 95.085% overall F1 score (96.535% English, 93.635% Japanese) at the 1x baseline cost.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They hit their &amp;gt;95%  accuracy goal while entirely eliminating the 14x operational cost overhead!.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Feyjfffp3ae6jedq9arem.jpeg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Feyjfffp3ae6jedq9arem.jpeg" alt=" " width="800" height="262"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;A Deeper Look at the Errors&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Always seeking improvement, the team took a further look at the little 1.9% accuracy disparity between teacher and student.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Language:&lt;/strong&gt; The student did significantly worse on the Japanese text (93.6% vs 95.4% for the teacher). Their next immediate step to fill the gap is to extend and increase the modest 150-sample Japanese dataset.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Complexity:&lt;/strong&gt; Approximately 20% of the student’s errors were in the “long-tail” or multi-part entities. For example elaborate layered instructions such as “Fragile; refrigerate below 4°C” In these tough edge instances, the teacher model’s richer baseline reasoning nevertheless came out on top.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Generative NER is a game-changer:&lt;/strong&gt; By moving from typical BIO tagging to a Seq2Seq technique, you gain amazing flexibility when you need to handle complex multi-entity extractions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Your task dictates your method:&lt;/strong&gt; If you pick a Seq2Seq task you are forced in a Token-Based distillation technique. Just be ready for the brittle engineering and alignment needs that are part of it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The real win is cost, not speed:&lt;/strong&gt; The big 14x improvement was about operational savings. Both models had similar inference performance but the smaller Nova Lite reduced the hefty financial burden of provisioning large LLM throughput.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Offload the engineering:&lt;/strong&gt; If your team spends 100% of its time resolving architecture incompatibilities, they’re not conducting data science. Get rid of those inflexible tokenizer bottlenecks altogether with managed services like AWS Bedrock.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Sitting in the audience in Kochi at the conclusion of the day, I was reminded that the road to a massive technical win is seldom a straight line. The team didn’t just build a 14x cheaper AI, they failed forward, knew when they were in an engineering trap, and pivoted to a managed solution that allowed them to focus on solving their underlying business challenge.&lt;/p&gt;

&lt;p&gt;If you’re producing AI solutions, don’t be scared to change your architecture when operational costs start to threaten your business model. At times, the smartest technological option you can make is simply to let a managed service do the heavy lifting.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;About the Author&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;As an &lt;strong&gt;AWS Community Builder&lt;/strong&gt;, I enjoy sharing the things I've learned through my own experiences and events, and I like to help others on their path. If you found this helpful or have any questions, don't hesitate to get in touch! 🚀&lt;/p&gt;

&lt;p&gt;🔗 Connect with me on &lt;a href="https://www.linkedin.com/in/chandra-prakash-reddy/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;References&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Event:&lt;/strong&gt; AWS Community Day Kochi&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Topic:&lt;/strong&gt; 14x Cheaper AI: A Real-World LLM Distillation Case Study on Bedrock&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Date:&lt;/strong&gt; December 20, 2025&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Also Published On&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://builder.aws.com/content/3G5IiFnEMXRTVk9Rq4CgM6l7nq3/14x-cheaper-ai-a-real-world-llm-distillation-case-study-on-bedrock" rel="noopener noreferrer"&gt;AWS Builder Center&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://devopstour.hashnode.dev/14x-cheaper-ai-a-real-world-llm-distillation-case-study-on-bedrock" rel="noopener noreferrer"&gt;Hashnode&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>ai</category>
      <category>bedrock</category>
      <category>productivity</category>
    </item>
    <item>
      <title>TDE Inside Out - Protecting SQL server data at rest on AWS</title>
      <dc:creator>N Chandra Prakash Reddy</dc:creator>
      <pubDate>Sun, 28 Jun 2026 15:44:20 +0000</pubDate>
      <link>https://dev.to/aws-builders/tde-inside-out-protecting-sql-server-data-at-rest-on-aws-4b72</link>
      <guid>https://dev.to/aws-builders/tde-inside-out-protecting-sql-server-data-at-rest-on-aws-4b72</guid>
      <description>&lt;p&gt;It was an awesome day at AWS User Group Chennai Meetup on 15th November, 2025. There is always something special about getting together with the local community, sharing real-world stories, and geeking out over cloud architecture. There were several interesting lectures throughout the day on a wide variety of topics including serverless and containers, but one particular talk on database security particularly got my attention.&lt;/p&gt;

&lt;p&gt;Database security can seem complex, especially with enterprise workloads, but this webinar did a great job of breaking it down. Let’s lay down exactly how you can protect your Microsoft SQL Server data at rest on AWS without breaking a sweat.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Core Challenge of Data at Rest&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Let’s face it… we spend a lot of effort on network perimeter security. We set up firewalls, maintain security groups, and ensure that all data in transit is encrypted using TLS. But what if someone gets hold of your underlying storage backup or a raw database snapshot?&lt;/p&gt;

&lt;p&gt;Do you know this? Security is frequently an afterthought until there is an audit or breach. When your raw database files are stored on the storage layer unencrypted, anyone with access to those files can read your sensitive data. This is where the concept of securing data “at rest” is non-negotiable.&lt;/p&gt;

&lt;p&gt;Imagine your database is a bank with strict security. Locking the main door and checking IDs at the entrance, is like protecting data in transit. But if the cash is just lying around on open tables inside the vault, then the whole world wins when they sneak past the front door. Protecting data at rest is like putting that cash in separate, reinforced lockboxes inside the vault.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;What Exactly is Transparent Data Encryption (TDE)?&lt;/strong&gt;
&lt;/h1&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The Basics of I/O Level Protection&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;That’s where Transparent Data Encryption, or TDE, comes in. TDE is a capability that is incorporated into Microsoft SQL Server. It encrypts the real files that are written to disk to protect your data. The beauty of TDE is in the name, it is totally transparent to your application.&lt;/p&gt;

&lt;p&gt;You might be thinking, what does “transparent” look like in practice. In other words, you do not need to rewrite your application code, update your SQL queries or change your database schemas. SQL Server does all the hard work for you, behind the scenes.&lt;/p&gt;

&lt;p&gt;SQL Server receives data from disk, decrypts it on the fly, and puts it into memory when your application requires data. As data is refreshed back to the storage layer, SQL Server encrypts the data as it hits the disk. This procedure is completely I/O based . It is intended for page level encryption .&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What Gets Protected?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;When you turn on TDE on a database it’s not just the major tables that are encrypted. This safeguards the whole database ecology on that instance. TDE actively protects the following key elements from session information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Files (.mdf):&lt;/strong&gt; The main storage files where your actual tables, indexes and user data reside.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Log Files (.ldf):&lt;/strong&gt; The transaction logs that record all the changes made to the database, and are critical for recovery.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Backup Files (.bak):&lt;/strong&gt; Any native backups of databases that you produce are automatically encrypted at the time of creation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;TempDB:&lt;/strong&gt; The system database for temporary items, internal joins and sorting.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Unpacking the Encryption Hierarchy&lt;/strong&gt;
&lt;/h1&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The Chain of Trust&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Here’s where things gets interesting. TDE does not depend on a single password or a single key for the security of your data. Instead, it uses a complex, multi-tiered encryption system sometimes referred to as a chain of trust.&lt;/p&gt;

&lt;p&gt;This hierarchy is like a classic Russian nesting doll. You have to unlock a bunch of bigger dolls to get to the tiny doll inside (your real data). If one layer is broken or missing, the entire chain breaks, maintaining the security of your data.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Breaking Down the Layers&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;So let's walk through how these keys work together from the top down to develop a strong security model:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Service Master Key (SMK):&lt;/strong&gt; This is the root of the entire encryption hierarchy . It is automatically created at the very top level when the SQL Server instance is first setup, and is encrypted by the underlying Windows operating system or AWS infrastructure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Database Master Key (DMK):&lt;/strong&gt; Moving one level below, the DMK resides in the master database. It is protected and encrypted by the Service Master Key It is explicitly protected and encrypted by the Service Master Key.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Certificate or Asymmetric Key:&lt;/strong&gt; This certificate is created in the master database and is directly protected by the Database Master Key. This certificate is the custodian of the final key.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Database Encryption Key (DEK):&lt;/strong&gt; This is the worker bee of the show. The DEK is a symmetric key kept in the user database itself, and protected by the certificate from the previous stage. The DEK is the real key, and it encrypts and decrypts your raw data pages.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftya9wp0uu6jzwmzgoifi.jpeg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftya9wp0uu6jzwmzgoifi.jpeg" alt=" " width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;TDE on AWS: RDS vs. EC2&lt;/strong&gt;
&lt;/h1&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Amazon RDS for SQL Server&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;When you migrate your SQL Server workloads to AWS, you often have the option of going with a fully managed service, or doing it yourself. Management of TDE gets tremendously simple if you go with Amazon Relational Database Service (RDS).&lt;/p&gt;

&lt;p&gt;AWS takes care of infrastructure, patching, and OS layers for you. To enable TDE on RDS, just add the TDE option to an RDS Option Group. It interacts natively with AWS Key Management Service (KMS).&lt;/p&gt;

&lt;p&gt;You can select an AWS managed key or generate your own Customer Managed Key (CMK) in KMS. This configuration takes away the operational pain of having to manually manage server certificates, since AWS maintains the rotation and security of the underlying keys.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;SQL Server on AWS EC2&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To be fair, some teams want complete control of their database environment and run SQL Server directly on Amazon EC2 instances. If you run your databases in EC2 you have to manage the full TDE setup yourself, as you would on-premises.&lt;/p&gt;

&lt;p&gt;You will write the T-SQL statements to build the Database Master Key, create the server certificates and initialize the Database Encryption Key. This involves a bit more operational cost but allows you deep customization choices.&lt;/p&gt;

&lt;p&gt;For example, you can utilize typical local certificates that are stored inside the instance. You may also configure your EC2 SQL Server to connect with AWS CloudHSM or utilize an Extensible Key Management (EKM) provider to delegate key management to a dedicated hardware security module.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Backup, Restore, and Cross-Account Migrations&lt;/strong&gt;
&lt;/h1&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The Golden Rule of TDE Restores&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;One of the most important warnings presented during the meetup session is about backup and restore activities. The backup files (.bak) created from a TDE-enabled database are fully encrypted and has stringent dependencies.&lt;/p&gt;

&lt;p&gt;And here's the thing: you can't just take a backup file from a TDE protected database and restore it to a completely new SQL Server instance. If you attempt to, SQL Server will instantly throw an error and interrupt the restoration operation.&lt;/p&gt;

&lt;p&gt;Otherwise, for a successful restore of a TDE encrypted database, the destination server must have access to the exact same certificate and private key used to encrypt the Database Encryption Key. If you lose that certificate then your backup files are totally useless.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Cross-Account Restores in AWS&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This reliance becomes a big concern when you do cross-account migrations or setup disaster recovery sites on AWS. If you're utilizing Amazon RDS and distributing snapshots/native backups across several AWS accounts you need also think about the KMS key permissions.&lt;/p&gt;

&lt;p&gt;The source account must explicitly grant the destination AWS account permissions to use the KMS key to decrypt the database backup. For this to function, you will need to add access to the key for the IAM roles in the destination account in the Key Policy for your Customer Managed Key in the source account. Moral of the story: always validate your cross-account restore pipelines before you depend on them in an emergency.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Deploying TDE on AWS demands good knowledge of internals of SQL Server and cloud security architecture. Keep in mind these basic operational practices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Monitor TempDB Behavior:&lt;/strong&gt; Once you enable TDE on even a single user database on your SQL Server instance, the shared system TempDB is automatically encrypted. This implies that any temporary data spilled out to disk is protected, but it also means that other unencrypted databases on the same server may be slightly affected by the TempDB encryption.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Plan for Performance Overhead:&lt;/strong&gt; TDE requires additional CPU cycles because the encryption and decryption happen in real time at the I/O operation level. Fortunately, newer AWS infrastructure and Intel/AMD processors provide hardware accelerated encryption (such AES-NI) and therefore the real CPU overhead is little, in the 3-5% range depending on how read/write intensive your workload is.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Backup Your Keys Relentlessly:&lt;/strong&gt; If you are running SQL Server on EC2, be sure to back up your Database Master Keys and server certificates as soon as you create them. Store them securely in a service such as AWS Secrets Manager or an encrypted Amazon S3 bucket, outside of the instance.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;At the end of the day, protecting your database storage layer shouldn’t be a scary process that slows down development. Transparent Data Encryption is an easy, effective approach to meet tough compliance standards and protect sensitive customer data without forcing your engineering staff to update any code.&lt;/p&gt;

&lt;p&gt;Whether you use the automation of Amazon RDS or have fine-grained management on Amazon EC2, understanding the internal hierarchy of keys helps keep your data safe from unauthorized access. If you don’t have encryption at rest enabled for your production databases yet, include it as a work item in your next infrastructure sprint.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;About the Author&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;As an AWS Community Builder, I enjoy sharing the things I've learned through my own experiences and events, and I like to help others on their path. If you found this helpful or have any questions, don't hesitate to get in touch! 🚀&lt;/p&gt;

&lt;p&gt;🔗 Connect with me on &lt;a href="https://www.linkedin.com/in/chandra-prakash-reddy/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;References&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Event:&lt;/strong&gt; AWS User Group Chennai Meetup&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Topic:&lt;/strong&gt; TDE Inside Out - Protecting SQL server data at rest on AWS&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Date&lt;/strong&gt;: November 15, 2025&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Also Published On&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://builder.aws.com/content/3Flrrhps4vPJUf1o4194ifCd70m/tde-inside-out-protecting-sql-server-data-at-rest-on-aws" rel="noopener noreferrer"&gt;AWS Builder Center&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://devopstour.hashnode.dev/tde-inside-out-protecting-sql-server-data-at-rest-on-aws" rel="noopener noreferrer"&gt;Hashnode&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>sqlserver</category>
      <category>database</category>
      <category>data</category>
    </item>
    <item>
      <title>From Build to Telemetry - Bedrock Agents with Strands SDK</title>
      <dc:creator>N Chandra Prakash Reddy</dc:creator>
      <pubDate>Sun, 28 Jun 2026 13:26:19 +0000</pubDate>
      <link>https://dev.to/aws-builders/from-build-to-telemetry-bedrock-agents-with-strands-sdk-1dog</link>
      <guid>https://dev.to/aws-builders/from-build-to-telemetry-bedrock-agents-with-strands-sdk-1dog</guid>
      <description>&lt;p&gt;I got the great opportunity to attend the AWS User Group Chennai Meetup on 15 Nov 2025. There were a lot of great sessions throughout the day, but one speaker totally stole the show in my book. "From Build to Telemetry - Bedrock Agents with Strands SDK" was presented by &lt;strong&gt;Jaya Ganesh&lt;/strong&gt;, an Application Developer at Genesys.&lt;/p&gt;

&lt;p&gt;I mean, it’s very easy these days to construct a great AI chatbot on your home PC. But to take that AI, give it tools, make it autonomous, and deploy it safely in a production environment? That’s a whole new animal. That sounds familiar?&lt;/p&gt;

&lt;p&gt;That was the task for this session. I took a lot of notes and images, and I want to show you exactly how you can turn fragile AI scripts into solid, production-ready systems with Amazon Bedrock and the Strands SDK.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Laying the Groundwork: Generative AI and Bedrock&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;The session started with the basics and then moved on to complicated agents. The backbone of Generative AI are Large Language Models (LLMs) and Foundational Models (FMs) that understand and generate text based on human cues.&lt;/p&gt;

&lt;p&gt;But running these models yourself is a headache. Or to put another way, you want to focus on building features, not managing infrastructure. And that’s exactly what Amazon Bedrock offers. It's a fully managed, serverless API that lets you access industry leading models from Anthropic (like Claude), Meta, Amazon, and more.&lt;/p&gt;

&lt;p&gt;More than access to models, Bedrock delivers enterprise-grade security. Your data is kept private and never used to train the base models. It’s also filled with features like as Prompt Management, Prompt Caching, and built-in Guardrails to help keep AI behaviors under check.&lt;/p&gt;

&lt;p&gt;Traditionally, you might invoke a model using a simple API call like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import boto3
import json

bedrock_runtime = boto3.client('bedrock-runtime', region_name="us-east-1")

response = bedrock_runtime.converse(
    modelId="anthropic.claude-3-5-haiku-20241022-v1:0",
    messages=[
        {"role": "user", "content": [{"text": "Explain AI agents in one sentence."}]}
    ]
)
print(response['output']['message']['content'][0]['text'])
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This works really well for simple questions and answers. But here's the thing: It's all reactive. The AI only works when you tell it to.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Paradigm Shift: Moving to Agentic AI&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Traditional chatbots are amazing, but they do require continual human control. Agentic AI is a game changer.&lt;/p&gt;

&lt;p&gt;An Agentic AI is a system that operates autonomously and independently to fulfill pre-determined goals. It takes the initiative rather than waiting to be told what to do. It predicts requirements and makes decisions and acts. Imagine your database is like a library . Traditional AI is like a librarian that only answers when you ask a question . Agentic AI is like a librarian that notices when a book is out of place , categorizes it , and updates the catalog without you ever asking .&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The Agentic Loop&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;These agents operate on a continuous, four-step loop:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Perceive:&lt;/strong&gt; Collects real-time data from APIs or connected systems.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reason:&lt;/strong&gt; Uses the LLM to interpret context and plan multi-step actions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Act:&lt;/strong&gt; Executes tasks through tool integrations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Learn:&lt;/strong&gt; Improves through feedback loops.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Enter Strands SDK and AgentCore&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;You might be asking yourself how to actually do this without creating thousands of lines of boilerplate code. The answer is in Strands SDK and Amazon Bedrock AgentCore.&lt;/p&gt;

&lt;p&gt;AgentCore delivers production ready serverless runtime, controlled state and observability. Strands SDK is the Python framework you use to build on it. Strands offers model flexibility, state management, and simple interface with OpenTelemetry for monitoring.&lt;/p&gt;

&lt;p&gt;Here is how simple it is to create your first agent using Strands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from strands import Agent
from strands.models import BedrockModel

# Create a Bedrock model configuration
model = BedrockModel(
    model_id="anthropic.claude-3-5-sonnet-20241022-v2:0",
    max_tokens=1024
)

# Create an agent
agent = Agent(
    model=model,
    system_prompt="You are a helpful AI assistant specialized in AWS."
)

response = agent("What are the benefits of serverless computing?")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  &lt;strong&gt;Giving Your Agent a Brain: State and Memory&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Without the ability to remember earlier interactions, an agent cannot do complex tasks. Strands handles state in three different ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Request State:&lt;/strong&gt; Context just for a single interaction.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Conversation History:&lt;/strong&gt; The back-and-forth chat history.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Agent State:&lt;/strong&gt; Key-value storage for long-term details (like user preferences) that persists across multiple requests.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In production, you can’t merely rely on your laptop’s memory to perform session persistence. Strands provides a &lt;code&gt;FileSessionManager&lt;/code&gt; for local testing, however it is straightforward to replace this with an &lt;code&gt;S3SessionManager&lt;/code&gt; to store session data on Amazon S3 for distributed cloud environments.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Optimizing the Context Window&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;LLMs are limited in how much text they can process at once. If your talk goes on too long, the agent will crash or forget stuff. The session shared excellent conversation management ways to solve this.&lt;/p&gt;

&lt;p&gt;A &lt;code&gt;SlidingWindowConversationManager&lt;/code&gt; can be used to only keep the past 20 messages. Or, better yet, a &lt;code&gt;SummarizingConversationManager&lt;/code&gt;using a smaller, cheaper model (such Claude Haiku) that intelligently compresses earlier messages while leaving the most current messages alone.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Equipping Agents with Tools&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;An agent is only as good as the tools it’s working with. Imagine you're ordering meals on Swiggy, you need the app to talk to the restaurant, the delivery guy and the payment gateway.&lt;/p&gt;

&lt;p&gt;Strands allows you to construct regular Python functions and simply fit your agent with them with a simple &lt;code&gt;@tool&lt;/code&gt; decorator.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from strands import Agent, tool

@tool
def check_shipping_options(zip_code: str, product_id: str) -&amp;gt; dict:
    """Check available shipping options."""
    # Logic to call your shipping API goes here
    return {"method": "Express", "cost": 15.00}

# Pass the tool to the agent
website_chatbot = Agent(
    model=model,
    tools=[check_shipping_options],
    system_prompt="You are a helpful shopping assistant."
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When the user asks about shipping, the agent automatically reasons that it needs to run the &lt;code&gt;check_shipping_options&lt;/code&gt; function, executes it, and formats the output for the user.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Scaling Up: Multi-Agent Patterns&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;This is where it gets super powerful. Sometimes you give an agent too much responsibility and he gets lost. Or, better yet, you can split and conquer using Multi-Agent patterns.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Workflow Pattern:&lt;/strong&gt; A choreographed performance. A Researcher agent provides data to an Analyst agent, which provides data to a Writer agent.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Agents as Tools:&lt;/strong&gt; The “Orchestrator” agent gets the user prompt, then determines to query a specialist Billing Agent or a Tech Support Agent.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Swarm Pattern:&lt;/strong&gt; A very collaborative environment where an Architect, a Coder and a Reviewer send a task back and forth till it is great.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The golden rule for multi-agent systems? Always specify clear responsibilities, precise time limits, and avoid agents being locked in an unending dialog loop with each other.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Observability and Guardrails&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;When your agent is out in the wild, you need to know what it is doing. Strands deeply integrates with OpenTelemetry and systems such as Langfuse.&lt;/p&gt;

&lt;p&gt;Telemetry setup provides you with three pillars of observability: Traces (end to end flow of the request). Metrics (quantitative data like token consumption and costs). Logs. You may even establish Custom Spans around your tools to monitor exactly how many milliseconds your payment processing tool took to run.&lt;/p&gt;

&lt;p&gt;And to keep the AI safe, Amazon Bedrock Guardrails are like the bumpers at a bowling alley. They can be configured to automatically block harmful content, redact PII (e.g. credit card details) and avoid prompt injection attacks. For example, if a user asks a shopping agent about an approaching political election, the Guardrail immediately jumps in and stops the off-topic remark.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;The Final Mile: Production Deployment&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Long story short, you can’t deploy a local script, thus it’s pointless. Strands and AgentCore make this shockingly easy. Your agent code can be packaged as either a ZIP file (for basic Python setups) or as a Docker container (for heavy dependencies).&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1xlfsq0ffzse7sbmrflq.jpeg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1xlfsq0ffzse7sbmrflq.jpeg" alt=" " width="800" height="478"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You just need to add an entry point decorator around your main function for deployment to AgentCore Runtime:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from bedrock_agentcore_starter_toolkit import Runtime
import boto3

agentcore_runtime = Runtime()

# Configure the deployment
response = agentcore_runtime.configure(
    entrypoint="ecommerce_agent/main.py",
    auto_create_ecr=True,
    requirements_file="ecommerce_agent/requirements.txt",
    agent_name="ecommerce_agent"
)

# Launch it!
launch_result = agentcore_runtime.launch()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When deployed, your application can safely invoke this agent hosted in the cloud with &lt;code&gt;boto3&lt;/code&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Key Takeaways&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Some things to take away from this session:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reactive to Proactive:&lt;/strong&gt; We're expanding beyond the standard chatbot. Agentic AI is autonomous, anticipates needs, and acts through a continuous cycle of perception, reasoning, action, and learning.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Memory is Crucial:&lt;/strong&gt; Agents must have brains to be useful. Short-term and long-term state management is a key area to keep your context windows optimum and your agents intelligent.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Divide and Conquer:&lt;/strong&gt; Don’t overburden one agent. Enhance the reliability and precision of routing jobs to specialized agents with multi-agent patterns like Swarm or Workflow.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Safety and Visibility:&lt;/strong&gt; You can’t control what you can’t see. For real world production, you must trace execution timings, manage token costs, and enforce Bedrock Guardrails.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;In the end, the difference between writing a toy AI script on your laptop and deploying a durable, production-ready AI agent is huge. But tools like Amazon Bedrock AgentCore and the Strands SDK provide a lovely bridge over that divide. Managed memory, simple tool integration, and deep observability provide us what we need to construct scalable, autonomous systems safely.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;About the Author&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;As an &lt;strong&gt;AWS Community Builder&lt;/strong&gt;, I enjoy sharing the things I've learned through my own experiences and events, and I like to help others on their path. If you found this helpful or have any questions, don't hesitate to get in touch! 🚀&lt;/p&gt;

&lt;p&gt;🔗 Connect with me on &lt;a href="https://www.linkedin.com/in/chandra-prakash-reddy/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;References&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Event:&lt;/strong&gt; AWS User Group Chennai Meetup&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Topic:&lt;/strong&gt; From Build to Telemetry - Bedrock Agents with Strands SDK&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Date:&lt;/strong&gt; November 15, 2025&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Also Published On&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://builder.aws.com/content/3FlalGUZMoH25SFySlb0CtcOISR/from-build-to-telemetry-bedrock-agents-with-strands-sdk" rel="noopener noreferrer"&gt;AWS Builder Center&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://devopstour.hashnode.dev/from-build-to-telemetry-bedrock-agents-with-strands-sdk" rel="noopener noreferrer"&gt;Hashnode&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>mcp</category>
      <category>genai</category>
      <category>bedrock</category>
    </item>
  </channel>
</rss>
