<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Bhavik Moradiya on Medium]]></title>
        <description><![CDATA[Stories by Bhavik Moradiya on Medium]]></description>
        <link>https://medium.com/@moradiyabhavik?source=rss-aa177ec907d4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*RxLC4-tiinGgZnLFOLCU1Q@2x.jpeg</url>
            <title>Stories by Bhavik Moradiya on Medium</title>
            <link>https://medium.com/@moradiyabhavik?source=rss-aa177ec907d4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 20:18:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@moradiyabhavik/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Your AI Agent Has Production Access. What Could Go Wrong?]]></title>
            <link>https://medium.com/@moradiyabhavik/your-ai-agent-has-production-access-what-could-go-wrong-5812029bb44e?source=rss-aa177ec907d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/5812029bb44e</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Bhavik Moradiya]]></dc:creator>
            <pubDate>Sun, 08 Nov 2026 21:19:55 GMT</pubDate>
            <atom:updated>2026-11-08T21:19:55.526Z</atom:updated>
            <content:encoded><![CDATA[<p><em>The security question is no longer just what an AI model can say. It’s what the surrounding system allows it to do.</em></p><p>Imagine you’ve built an AI assistant for your engineering team.</p><p>It can read documentation, search code, investigate incidents, and interact with cloud infrastructure.</p><p>The team loves it.</p><p>Then someone proposes giving it write access so it can fix problems automatically.</p><p>That sounds like the logical next step.</p><p>But it creates a critical new question.</p><p><strong>What happens when the agent makes a mistake — or follows malicious instructions hidden in data?</strong></p><h3>Agents introduce a different security problem</h3><p>A traditional chatbot might produce an incorrect answer.</p><p>An agent with tools might turn an incorrect decision into a real action.</p><p>It might modify a configuration, reveal sensitive data, invoke an expensive service, or change a production resource.</p><p>OWASP’s <em>Top 10 for Agentic Applications 2026</em> provides a security framework for these systems.</p><p>Among its identified risks are agent goal hijacking, tool misuse, identity and privilege abuse, insecure communication, and other failures involving agent autonomy.</p><p>The central lesson is straightforward.</p><p>Security must apply to the entire workflow, not just the model’s response.</p><h3>Consider prompt injection</h3><p>Imagine a support agent reading a customer-submitted document.</p><p>The document contains legitimate troubleshooting information.</p><p>But it also includes instructions telling the agent to ignore its original task and transmit internal data to an external service.</p><p>Those instructions are not authorized commands.</p><p>They are untrusted content.</p><p>Yet an inadequately protected system might allow the agent to treat that content as instructions.</p><p>This is why prompt injection is a security boundary problem, not merely an issue of clever wording.</p><p>A better system separates trusted instructions from retrieved data and restricts what tools can actually do.</p><h3>The principle of least privilege still matters</h3><p>If an agent only needs to read CloudWatch metrics, why give it permissions to modify production databases?</p><p>If it needs to create a pull request, why give it credentials that can bypass protected branches?</p><p>If it needs to inspect an S3 bucket, why grant access to every bucket in the account?</p><p>These are familiar IAM questions.</p><p>AI doesn’t make them obsolete.</p><p>It makes them more urgent.</p><p>Treat an agent’s permissions with the same seriousness as any service identity.</p><p>Use narrow scopes, temporary credentials where appropriate, and explicit authorization checks.</p><p>Do not rely on a system prompt as the only access-control mechanism.</p><h3>Put approval gates around consequential actions</h3><p>Not every operation needs a human.</p><p>An agent might safely summarize logs or generate draft documentation without approval.</p><p>But deleting resources, changing access policies, deploying code, or sending sensitive information can have significant consequences.</p><p>Create action categories.</p><p><strong>Read-only actions:</strong> Generally low risk, assuming data access is authorized.</p><p><strong>Reversible changes:</strong> Potentially automatable within defined policy limits.</p><p><strong>High-impact changes:</strong> Require stronger authorization, approvals, or additional checks.</p><p><strong>Irreversible or sensitive actions:</strong> Should have explicit human accountability and carefully constrained execution paths.</p><p>The category should depend on the actual environment and potential harm.</p><h3>Logging is part of your security model</h3><p>If an agent changes a configuration, can you answer:</p><p>Who initiated the request?</p><p>Which identity executed it?</p><p>Which tool was invoked?</p><p>What parameters were supplied?</p><p>What approval was recorded?</p><p>What changed as a result?</p><p>These questions matter during ordinary debugging and security incidents.</p><p>Agent reasoning traces can provide useful diagnostic information, but they are not substitutes for authoritative execution audit logs.</p><p>Record actions at the tool and infrastructure boundary.</p><p>Also protect the logs themselves. They may contain sensitive prompts, customer data, or credentials if telemetry is poorly configured.</p><h3>Test how the agent behaves when things go wrong</h3><p>Before production, create controlled adversarial scenarios.</p><p>Feed the agent untrusted content containing fake instructions.</p><p>Ask it to perform an action outside its authorization scope.</p><p>Simulate a failed tool execution.</p><p>Test expired credentials, unavailable approvals, and unexpected API results.</p><p>Verify that it refuses unauthorized operations, stops safely, and records what happened.</p><p>The objective isn’t to make the model promise to behave.</p><p>It’s to establish that the surrounding system prevents unacceptable behavior.</p><h3>A practical security checklist</h3><p>Before granting an AI agent meaningful authority, I would require:</p><ol><li>A documented inventory of tools and permitted actions.</li><li>Least-privilege identities for execution.</li><li>Explicit validation of tool inputs.</li><li>Separation of untrusted content from control instructions.</li><li>Approval requirements for consequential actions.</li><li>Reliable action audit logs.</li><li>Runtime limits and emergency shutdown procedures.</li><li>Regular security tests using realistic failure scenarios.</li></ol><p>These controls may not eliminate every risk.</p><p>They create defense in depth.</p><h3>Final thought</h3><p>AI agents are powerful precisely because they can act.</p><p>But action without boundaries becomes a liability.</p><p>The question isn’t whether we trust the model.</p><p>It’s whether we’ve designed a system that remains safe when the model is mistaken, manipulated, or uncertain.</p><p><strong>Never give an AI agent more authority than its task actually requires.</strong></p><h3>Reader discussion</h3><p>What’s your biggest concern about autonomous agents?</p><p>A. Prompt injection<br>B. Excessive access permissions<br>C. Sensitive-data leakage<br>D. Unauthorized production changes<br>E. Poor auditing and incident response</p><p><strong>Research references</strong></p><ul><li><a href="https://genai.owasp.org/resource/owasp-top-10-for-agentic-applications-for-2026/">OWASP Top 10 for Agentic Applications 2026</a></li><li><a href="https://genai.owasp.org/initiatives/agentic-security-initiative/">OWASP Agentic Security Initiative</a></li><li><a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html">AWS IAM Security Best Practices</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5812029bb44e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes Is Becoming AI Infrastructure. But Do You Actually Need It?]]></title>
            <link>https://medium.com/@moradiyabhavik/kubernetes-is-becoming-ai-infrastructure-but-do-you-actually-need-it-bf5dc4a1e35f?source=rss-aa177ec907d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf5dc4a1e35f</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[platform-engineering]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Bhavik Moradiya]]></dc:creator>
            <pubDate>Sun, 08 Nov 2026 21:17:41 GMT</pubDate>
            <atom:updated>2026-11-08T21:17:41.342Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Just because the biggest engineering organizations use Kubernetes doesn’t mean your next AI application should.</em></p><p>A developer has an idea.</p><p>Build a small internal AI assistant to search company documentation, summarize incidents, and help engineers answer operational questions.</p><p>The team starts with a Python application and a managed model API.</p><p>Then someone suggests Kubernetes.</p><p>Suddenly, the architecture includes clusters, ingress controllers, secrets, autoscaling, service accounts, deployment manifests, and observability components.</p><p>Before anyone has validated whether employees will use the assistant, the team is designing an infrastructure platform.</p><p>This raises a familiar engineering question:</p><p><strong>Are we solving the application’s problem, or creating infrastructure work because we know how?</strong></p><h3>Kubernetes adoption is real</h3><p>The CNCF Annual Cloud Native Survey, published in January 2026, reported that 82% of surveyed container users run Kubernetes in production.</p><p>Among organizations hosting generative AI models, 66% use Kubernetes for some or all inference workloads.</p><p>These numbers demonstrate how important Kubernetes has become in cloud-native engineering.</p><p>But they don’t prove Kubernetes is necessary for every AI application.</p><p>The survey population is not the same as every software team in the world.</p><p>And hosting models is different from calling managed model APIs.</p><h3>First, identify what you’re actually running</h3><p>There are several kinds of AI workloads.</p><p><strong>API-based AI applications</strong> call managed models and spend most of their time coordinating requests, tools, and application data.</p><p><strong>Self-hosted inference services</strong> run models on infrastructure the organization manages.</p><p><strong>Training and fine-tuning workloads</strong> may need GPUs, distributed compute, specialized storage, and job scheduling.</p><p><strong>Multi-service AI platforms</strong> support many applications, teams, environments, and operational requirements.</p><p>These workloads have different infrastructure needs.</p><p>A simple API-based chatbot might run comfortably on AWS Lambda or another managed compute service.</p><p>A multi-model inference platform with GPU scheduling and complex networking requirements might benefit significantly from Kubernetes.</p><p>The architecture should follow the workload.</p><h3>When Kubernetes makes sense</h3><p>Kubernetes becomes attractive when you need consistent orchestration across many containerized services.</p><p>For example, a platform team might need to deploy several model-serving workloads, assign resources, control networking, implement workload identity, and standardize monitoring.</p><p>An existing Kubernetes environment can also reduce incremental complexity when the organization already has reliable operational practices.</p><p>But Kubernetes comes with responsibilities.</p><p>Someone must handle cluster lifecycle management, upgrades, access control, capacity, cost visibility, and incident response.</p><p>Managed Kubernetes can reduce some responsibilities, but it doesn’t eliminate operational ownership.</p><h3>What a simpler AWS architecture might look like</h3><p>Imagine an internal documentation assistant.</p><p>It receives a question, retrieves relevant documents, invokes a model through Amazon Bedrock, and returns an answer.</p><p>A practical implementation could use API Gateway, Lambda or another managed runtime, a retrieval service, IAM, and CloudWatch.</p><p>You might use Step Functions if there are durable multi-step workflows.</p><p>No Kubernetes cluster is inherently required.</p><p>That doesn’t make serverless universally superior.</p><p>Long-running workloads, specialized execution requirements, sustained traffic, or custom model hosting can change the cost and operational trade-offs.</p><p>The goal is to avoid complexity until it earns its place.</p><h3>Kubernetes is not free just because it’s open source</h3><p>Infrastructure cost is not only the cluster bill.</p><p>It also includes engineering time.</p><p>Suppose a small team spends several hours each week maintaining an environment that exists for one modest AI application.</p><p>That opportunity cost matters.</p><p>Could those hours be used to improve answer quality, create evaluations, improve security, or build functionality customers actually need?</p><p>For a larger organization, the calculation might reverse.</p><p>A well-run Kubernetes platform could reduce duplication across dozens of teams.</p><p>That’s why one-size-fits-all architecture advice is dangerous.</p><h3>Five questions before choosing Kubernetes</h3><p><strong>1. Are we hosting our own models?</strong></p><p>If you’re only consuming managed APIs, you may not need a container orchestration platform.</p><p><strong>2. Do we have multiple services requiring coordinated deployment?</strong></p><p>A single API has different needs from an enterprise inference platform.</p><p><strong>3. Does our team already operate Kubernetes well?</strong></p><p>Existing maturity changes the economics.</p><p><strong>4. What are our scaling and hardware requirements?</strong></p><p>GPU scheduling, isolation, and sustained inference traffic may favor specialized infrastructure.</p><p><strong>5. How much operational complexity can we justify?</strong></p><p>The infrastructure should support the product, not become the product accidentally.</p><h3>The AI infrastructure maturity trap</h3><p>There is a temptation to copy architecture diagrams from large technology companies.</p><p>But their scale, staffing, compliance requirements, and workload characteristics might have little resemblance to yours.</p><p>Kubernetes is an excellent technology for many problems.</p><p>It is not proof of engineering maturity by itself.</p><p>Good architecture is about making justified trade-offs.</p><h3>Final thought</h3><p>The most useful question isn’t:</p><p>“Should we use Kubernetes for AI?”</p><p>It’s:</p><p><strong>“What operational problem do we have that Kubernetes solves better than the alternatives?”</strong></p><p>If the answer is clear, Kubernetes may be a strong choice.</p><p>If the answer is vague, start simpler and measure what changes.</p><h3>Reader discussion</h3><p>What runs your AI workloads today?</p><p>A. Kubernetes<br>B. Serverless<br>C. Managed AI platforms<br>D. Traditional VMs or containers<br>E. A combination</p><p>What would make you change your architecture?</p><p><strong>Research references</strong></p><ul><li><a href="https://www.cncf.io/reports/the-cncf-annual-cloud-native-survey/">CNCF Annual Cloud Native Survey 2026</a></li><li><a href="https://aws.amazon.com/lambda/">AWS Lambda</a></li><li><a href="https://aws.amazon.com/eks/">Amazon EKS</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf5dc4a1e35f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Real Cost of an AI Agent Isn’t Just Tokens]]></title>
            <link>https://medium.com/@moradiyabhavik/the-real-cost-of-an-ai-agent-isnt-just-tokens-414cb9c4821c?source=rss-aa177ec907d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/414cb9c4821c</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[superintelligence]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Bhavik Moradiya]]></dc:creator>
            <pubDate>Sun, 08 Nov 2026 21:15:38 GMT</pubDate>
            <atom:updated>2026-11-08T21:15:38.556Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Your model may be cheap. Your retries, tool calls, infrastructure, and human intervention may not be.</em></p><p>Imagine an engineering team celebrating a successful AI project.</p><p>The model costs only a few cents per request.</p><p>The demonstration is fast. The responses look impressive.</p><p>Six months later, leadership wants to know whether the project has actually saved money.</p><p>The team produces an inference bill.</p><p>But what about the cloud infrastructure? The external APIs? The engineer reviewing failed outputs? The repeated requests from users whose tasks weren’t completed?</p><p>Suddenly, the answer isn’t so simple.</p><p><strong>The cost of generating an answer is not the cost of completing a task.</strong></p><h3>AI spending is becoming everyone’s problem</h3><p>The FinOps Foundation’s 2026 State of FinOps survey, covering 1,192 respondents, reported that 98% were managing AI spending.</p><p>Two years earlier, the figure was 31%.</p><p>That is a remarkable shift in the responsibilities of technology finance teams.</p><p>And it raises a difficult question.</p><p>Are we measuring the cost of AI, or the value it creates?</p><p>Those are not the same thing.</p><h3>Understanding the real cost structure</h3><p>For a typical AI agent, total cost can include:</p><p><strong>Model inference:</strong> Input tokens, output tokens, and sometimes additional model-specific charges.</p><p><strong>Tool execution:</strong> Database queries, search APIs, third-party services, and compute used by tools.</p><p><strong>Orchestration:</strong> Runtime, workflow execution, state storage, and networking.</p><p><strong>Observability:</strong> Logs, tracing, evaluation datasets, and monitoring.</p><p><strong>Recovery:</strong> Retries, fallbacks, repeated tool calls, and failed workflows.</p><p><strong>Human labor:</strong> Reviews, escalations, incident investigation, and correcting mistakes.</p><p>Not every application incurs all these costs in the same way.</p><p>But excluding them makes comparisons misleading.</p><h3>A simple example</h3><p>Suppose a customer-support agent receives 10,000 requests per month.</p><p>Here is a hypothetical cost breakdown:</p><p>Cost componentMonthlyModel inference$600Search and tool APIs$200Runtime and storage$150Logging and evaluation$100Human review and corrections$900<strong>Total$1,950</strong></p><p>Assume the agent completes 7,500 requests successfully without later rework.</p><p>The fully allocated cost per verified success is:</p><p><strong>$1,950 / 7,500 = $0.26</strong></p><p>That is more informative than looking only at the $600 model bill.</p><p>The figures are illustrative, not an AWS pricing quotation.</p><p>Now compare this with the cost and quality of the previous human or software process.</p><p>Only then can you estimate whether the agent generates economic value.</p><h3>Why cheaper models aren’t automatically cheaper systems</h3><p>Consider two candidate agents.</p><p>Agent A costs $0.01 per attempt and completes 60% of tasks.</p><p>Agent B costs $0.02 per attempt and completes 95%.</p><p>Assuming each attempt has an independent chance of success and an unchanged cost:</p><p>Agent A’s expected inference cost per successful task is roughly $0.0167.</p><p>Agent B’s is roughly $0.0211.</p><p>Agent A remains cheaper on inference alone.</p><p>But imagine a failed request requires a five-minute human review.</p><p>At an illustrative fully loaded labor cost of $60 an hour, that review costs $5.</p><p>Now failure rates dominate the economics.</p><p>A one-cent model saving becomes unimportant compared with the time spent repairing a failed workflow.</p><p>The right optimization target depends on the consequences of failure.</p><h3>What engineers should instrument</h3><p>I would begin with five metrics.</p><p><strong>1. Cost per verified successful task.</strong> Connect spending to completed outcomes rather than raw invocations.</p><p><strong>2. First-attempt success rate.</strong> Understand how often the agent gets the result right without retries.</p><p><strong>3. Human-intervention rate.</strong> Measure how frequently someone needs to inspect or correct a run.</p><p><strong>4. End-to-end latency.</strong> A cheaper system that takes far longer may create a poor user experience.</p><p><strong>5. Value per completed task.</strong> Estimate time saved, revenue supported, or another measurable business outcome.</p><p>For higher-risk applications, also measure the severity of failures. Two systems with identical completion rates may have very different business risks.</p><h3>The hidden problem with unlimited autonomy</h3><p>An agent can call several tools, inspect results, plan again, and continue.</p><p>That flexibility is powerful.</p><p>But without boundaries, one request can expand into dozens of model calls and external operations.</p><p>Put limits around execution.</p><p>Set sensible budgets, maximum tool-call counts, timeouts, and escalation rules.</p><p>Some difficult tasks genuinely justify more expensive reasoning.</p><p>Others should be completed by a smaller model or conventional application logic.</p><p>The business should decide which is which.</p><h3>A useful experiment</h3><p>Select 100 representative tasks from your actual workload.</p><p>Run them through two model configurations.</p><p>For each task, record total operational cost, successful completion, retries, latency, human intervention, and any consequential errors.</p><p>Don’t compare only the average token price.</p><p>Compare the total cost of obtaining an acceptable outcome.</p><p>If the cheaper configuration wins without degrading quality, use it.</p><p>If a more expensive model reduces costly failures, its higher inference bill may be justified.</p><h3>Final thought</h3><p>The future of AI economics isn’t simply reducing token prices.</p><p>It’s understanding how intelligence, compute, workflow design, and human labor combine to create a useful outcome.</p><p><strong>The cheapest answer isn’t necessarily the most economical solution.</strong></p><h3>Reader discussion</h3><p>What is your biggest AI cost challenge?</p><p>A. Model inference<br>B. Tool calls and infrastructure<br>C. Retries and unreliable outputs<br>D. Human review<br>E. We don’t have proper cost attribution yet</p><p><strong>Research references</strong></p><ul><li><a href="https://data.finops.org/">FinOps Foundation — State of FinOps 2026</a></li><li><a href="https://www.finops.org/insights/mission-update/">FinOps Foundation — AI and technology value</a></li><li><a href="https://aws.amazon.com/bedrock/pricing/">AWS — Amazon Bedrock pricing</a></li></ul><p><strong>Medium tags:</strong> FinOps, Artificial Intelligence, AWS, Machine Learning, Cloud Computing</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=414cb9c4821c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS Bedrock, Lambda, and Step Functions: Who Should Control Your AI Agent?]]></title>
            <link>https://medium.com/@moradiyabhavik/aws-bedrock-lambda-and-step-functions-who-should-control-your-ai-agent-9cb61b96c77d?source=rss-aa177ec907d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/9cb61b96c77d</guid>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Bhavik Moradiya]]></dc:creator>
            <pubDate>Sun, 08 Nov 2026 21:13:03 GMT</pubDate>
            <atom:updated>2026-11-08T21:13:03.081Z</atom:updated>
            <content:encoded><![CDATA[<p><em>We keep asking AI models to make decisions. But who should be responsible for making those decisions happen?</em></p><p>Imagine you’re building an AI agent to investigate production incidents.</p><p>The requirements sound simple.</p><p>When an alert arrives, the agent should inspect logs, identify the likely cause, recommend a fix, and help restore the application.</p><p>A demonstration might take a day.</p><p>A trustworthy production implementation is another story.</p><p>What happens when the model selects the wrong action? What if an API times out after successfully applying a change? What if an engineer needs to approve the remediation before anything happens?</p><p>This is where agent architecture becomes more important than the model itself.</p><h3>The architectural mistake: making the LLM responsible for everything</h3><p>An LLM can interpret symptoms, compare explanations, and recommend next steps.</p><p>But should it also decide how long to wait, whether to retry a failed operation, or which credentials to use?</p><p>Not necessarily.</p><p>These are different responsibilities.</p><p>A useful way to design agentic systems is to separate three layers:</p><p><strong>Reasoning:</strong> What appears to be happening, and what should we consider doing?</p><p><strong>Execution:</strong> Which approved, explicitly defined operations can the system perform?</p><p><strong>Orchestration:</strong> What sequence of steps, approvals, retries, and recovery rules controls the overall process?</p><p>AWS offers different services that can help with these responsibilities.</p><p>The mistake is assuming one service must own all three.</p><h3>What Amazon Bedrock should do</h3><p>Amazon Bedrock provides access to foundation models and services for building generative AI applications.</p><p>For an incident-response workflow, a model can help classify an alert, summarize logs, compare possible root causes, and propose a recovery plan.</p><p>Amazon Bedrock AgentCore provides services for deploying and operating agentic applications, including runtime, connectivity, identity, and observability capabilities.</p><p>That’s useful when you want an agent to carry out multi-step work.</p><p>But having an agent runtime does not mean every high-impact action should be left to the model.</p><p>The model may suggest restarting a service. The surrounding system should determine whether that action is permitted.</p><h3>Where Lambda fits</h3><p>AWS Lambda is useful for narrowly defined operations.</p><p>For example:</p><ul><li>Retrieve CloudWatch metrics.</li><li>Query deployment status.</li><li>Create an incident ticket.</li><li>Validate a proposed configuration.</li><li>Invoke an approved remediation procedure.</li></ul><p>Instead of granting the model broad AWS permissions, expose carefully scoped operations.</p><p>The model asks for a capability; the application validates the request and executes it using appropriately restricted credentials.</p><p>This creates a clearer security boundary.</p><p>It also makes behavior easier to test.</p><p>A function that retrieves deployment status can be independently tested without involving the LLM.</p><h3>Where Step Functions becomes valuable</h3><p>Now imagine remediation requires an engineer’s approval.</p><p>The workflow might be:</p><p><strong>Alert → Investigation → Proposed fix → Validation → Approval → Execution → Verification</strong></p><p>AWS Step Functions can coordinate these steps, retain workflow state, and support human approval patterns.</p><p>AWS documents workflows that pause while waiting for a person to approve an action before continuing.</p><p>That is fundamentally different from asking an LLM to remember to wait.</p><p>Consider a production deployment rollback.</p><p>The model could identify the rollback as a reasonable response.</p><p>Step Functions could coordinate the approval and subsequent execution.</p><p>Lambda could perform the bounded rollback operation.</p><p>Monitoring could then verify whether the service recovered.</p><p>No single component needs unlimited authority.</p><h3>A practical reference architecture</h3><p>For a hypothetical production incident assistant:</p><ol><li>Amazon EventBridge receives the incident event.</li><li>Step Functions initiates the controlled workflow.</li><li>Lambda collects authorized diagnostic data.</li><li>A Bedrock model analyzes the evidence and proposes next steps.</li><li>Deterministic validation checks the proposed action.</li><li>An engineer approves consequential changes.</li><li>Lambda executes the authorized operation.</li><li>CloudWatch and application health checks verify the outcome.</li></ol><p>AgentCore can support agent execution, tools, and telemetry where appropriate.</p><p>This is one possible design, not a universal AWS blueprint.</p><p>A simpler application might need only Lambda and Bedrock. Another might run most agent logic in AgentCore and use Step Functions for high-stakes workflows.</p><p>Choose complexity based on the business requirements.</p><h3>What I would test before production</h3><p>A successful happy-path demonstration isn’t enough.</p><p>Try these failure scenarios:</p><p><strong>The model proposes an unauthorized action.</strong> Does the system reject it?</p><p><strong>A tool succeeds but its response times out.</strong> Can the system avoid executing the operation twice?</p><p><strong>The approval never arrives.</strong> Does the workflow expire safely?</p><p><strong>The model gives an invalid structured response.</strong> Does the application validate it?</p><p><strong>The post-change health check fails.</strong> Does the system stop, escalate, or execute a defined rollback?</p><p>These tests reveal whether the architecture is resilient when the model is not.</p><h3>Final thought</h3><p>The best agent architecture isn’t necessarily the one with the most autonomy.</p><p>It’s the one where reasoning, permissions, execution, and accountability have clear owners.</p><p>Let models interpret ambiguity.</p><p>Let ordinary software enforce boundaries.</p><p>Let workflow systems manage critical state transitions.</p><p><strong>Your AI agent should be intelligent. Your surrounding infrastructure should be predictable.</strong></p><h3>Reader discussion</h3><p>Would you allow an AI agent to execute a production rollback automatically?</p><p>A. Yes, within strict boundaries<br>B. Only after human approval<br>C. Diagnosis only — never execution</p><p>What safeguards would change your answer?</p><p><strong>Research references</strong></p><ul><li><a href="https://aws.amazon.com/bedrock/agentcore/">Amazon Bedrock AgentCore</a></li><li><a href="https://docs.aws.amazon.com/step-functions/latest/dg/tutorial-human-approval.html">AWS Step Functions: Human approval workflows</a></li><li><a href="https://docs.aws.amazon.com/step-functions/latest/dg/use-cases.html">AWS Step Functions use cases</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9cb61b96c77d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your AI Agent Works in a Demo. Why Does It Fail in Production?]]></title>
            <link>https://medium.com/@moradiyabhavik/your-ai-agent-works-in-a-demo-why-does-it-fail-in-production-b95123102e6a?source=rss-aa177ec907d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/b95123102e6a</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Bhavik Moradiya]]></dc:creator>
            <pubDate>Sun, 08 Nov 2026 20:49:38 GMT</pubDate>
            <atom:updated>2026-11-08T20:49:38.826Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ryxYVf-RnE-6_ccOtEhgRA.png" /></figure><p><em>The uncomfortable engineering questions we need to ask before giving AI agents real responsibilities.</em></p><p>Imagine it’s Friday afternoon.</p><p>Your team has spent two weeks building an AI agent. It can search internal documentation, analyze incidents, suggest code fixes, and open pull requests.</p><p>The demo goes beautifully.</p><p>Everyone is impressed.</p><p>Then Monday arrives.</p><p>The agent repeats an API call, generates an incorrect configuration, and confidently reports that the task is complete.</p><p>Someone asks the question nobody asked during the demo:</p><p><strong>“How do we know when this thing is actually working?”</strong></p><p>This scenario is hypothetical, but the underlying problem is real.</p><p>According to LangChain’s <em>2026 State of Agent Engineering</em> survey of more than 1,300 professionals, approximately 57% of respondents have agents in production. Yet quality remains the leading barrier, cited by 32% of respondents.</p><p>We have learned how to make agents act.</p><p>Now we need to learn how to make them dependable.</p><h3>1. A successful response is not a successful task</h3><p>Traditional software gives engineers useful signals.</p><p>A request returns HTTP 200. A test passes. A database transaction commits.</p><p>AI agents complicate that picture.</p><p>An agent can successfully execute every API call and still solve the wrong problem.</p><p>Consider a DevOps agent investigating a failed deployment.</p><p>It reads logs, discovers a resource issue, updates a configuration, and reports success.</p><p>But what if the configuration introduces a security risk? What if the original failure is still present?</p><p>The tool calls worked. The task didn’t.</p><p><strong>The metric that matters is verified task completion, not merely successful execution.</strong></p><p>For an incident-response agent, that might mean the incident is resolved, monitoring confirms recovery, and the resolution is documented.</p><h3>2. Give the agent boundaries, not unlimited freedom</h3><p>Here is a design choice every engineering team eventually faces.</p><p><strong>Your AI agent identifies a production configuration problem. What should happen next?</strong></p><ul><li><strong>Option A:</strong> Let the agent change production immediately.</li><li><strong>Option B:</strong> Let it prepare a fix, run checks, and request approval.</li><li><strong>Option C:</strong> Limit it to diagnosis and recommendations.</li></ul><p>My preferred starting point is B for well-defined, reversible changes, and C for sensitive systems.</p><p>Why?</p><p>Because autonomy should follow evidence of reliability.</p><p>An agent that can read logs does not automatically need permission to modify infrastructure.</p><p>An agent that can create a pull request does not automatically need permission to merge it.</p><p>OWASP’s <em>Top 10 for Agentic Applications 2026</em> highlights the importance of securing agent permissions, tools, and autonomous actions.</p><p>A practical principle:</p><p><strong>Start with read access. Add write permissions only when the workflow demonstrates the need and the necessary controls exist.</strong></p><h3>3. The model shouldn’t control everything</h3><p>AI models are good at interpreting ambiguous information and proposing next steps.</p><p>They are not inherently reliable transaction managers.</p><p>Imagine a workflow that needs to:</p><ol><li>Investigate a failure.</li><li>Identify a possible fix.</li><li>Validate the proposed change.</li><li>Obtain approval.</li><li>Execute the change.</li><li>Verify the result or roll back.</li></ol><p>The model can help with investigation and recommendations.</p><p>But deterministic systems should enforce permissions, approval requirements, retries, and execution state.</p><p>On AWS, that separation might involve Amazon Bedrock for reasoning, Step Functions for durable workflow coordination, Lambda for controlled actions, and CloudWatch for monitoring.</p><p>Amazon Bedrock AgentCore also provides capabilities for running, observing, and securing agents.</p><p>The architecture will depend on the workload.</p><p>The important distinction is <strong>what the model recommends versus what the system permits</strong>.</p><h3>4. Observability is no longer optional</h3><p>Here’s a question worth asking your team:</p><p>If an agent makes a wrong decision, can you reconstruct why?</p><p>Could you identify:</p><ul><li>Which request initiated the action?</li><li>Which model and version were used?</li><li>Which tools were called?</li><li>What information influenced the decision?</li><li>Who approved an irreversible action?</li></ul><p>If the answer is no, debugging becomes guesswork.</p><p>LangChain’s 2026 survey found that nearly 89% of respondents had implemented observability, while approximately 52% had implemented evaluations.</p><p>Those are different capabilities.</p><p>Observability helps explain what happened.</p><p>Evaluations help determine whether behavior meets expectations.</p><p>You need both.</p><p>For example, AWS announced unified AgentCore observability in July 2026, allowing supported runtime configurations to bring traces and logs together in CloudWatch.</p><p>That makes investigation easier, but collecting logs alone doesn’t establish correctness.</p><p>Teams still need representative test cases, quality metrics, and safeguards for sensitive data.</p><h3>5. The cheapest AI agent might be the expensive one</h3><p>Let’s consider a simple hypothetical scenario.</p><p>Agent A costs $0.02 per attempt and successfully completes 60% of tasks.</p><p>Agent B costs $0.04 per attempt and successfully completes 95%.</p><p>Assuming independent attempts with unchanged success probabilities:</p><p>MetricAgent AAgent BCost per attempt$0.02$0.04Successful completion rate60%95%Expected model cost per success$0.033$0.042</p><p>Agent A is still cheaper on this narrow metric.</p><p>But now add the engineering time spent identifying errors, the cost of retries, and the consequences of incorrect actions.</p><p>The economics may change significantly.</p><p>That’s why I would track <strong>cost per verified successful task</strong>, along with latency, intervention rates, and failure impact.</p><p>Not simply cost per token.</p><h3>A five-minute exercise for your team</h3><p>Before deploying your next AI agent, answer these five questions:</p><p><strong>1. What does success actually mean?</strong></p><p>A valid response, a completed task, or a verified business outcome?</p><p><strong>2. What is the worst action this agent could take?</strong></p><p>Delete information? Change infrastructure? Expose private data?</p><p><strong>3. Who can stop or reverse it?</strong></p><p>Is rollback automated, manual, or impossible?</p><p><strong>4. Can we explain a failure afterward?</strong></p><p>Do we have sufficient traces, tool records, and evaluation results?</p><p><strong>5. Is automation saving more effort than it creates?</strong></p><p>Measure the real workflow, including human interventions.</p><p>If your team cannot answer these questions, that is valuable information. It tells you what to improve before expanding autonomy.</p><h3>The bigger lesson</h3><p>Google’s 2025 DORA research describes AI as an amplifier of organizational strengths and weaknesses.</p><p>That insight applies especially well to agents.</p><p>A team with clear processes, reliable testing, strong observability, and sensible security boundaries has a better foundation for automation.</p><p>A team without those fundamentals may simply automate confusion.</p><p>The goal should not be to remove humans from every decision.</p><p>It should be to remove repetitive work while preserving accountability where it matters.</p><p><strong>The next competitive advantage in AI engineering won’t come from building the most autonomous demo. It will come from building systems people can trust when nobody is watching.</strong></p><h3>Over to you</h3><p>I’d love to hear from engineers, architects, SREs, and technology leaders:</p><p><strong>What’s your biggest obstacle to taking AI agents into production?</strong></p><p>A. Reliability and accuracy<br>B. Security and permissions<br>C. Cost and performance<br>D. Monitoring and debugging<br>E. Organizational trust and approvals</p><p>Share your answer in the comments, along with one thing your team has learned.</p><p><em>Research references:</em></p><ul><li><a href="https://www.langchain.com/state-of-agent-engineering">LangChain — State of Agent Engineering, June 2026</a></li><li><a href="https://dora.dev/research/2025/dora-report/">Google DORA — State of AI-assisted Software Development</a></li><li><a href="https://aws.amazon.com/bedrock/agentcore/resources/">AWS — Amazon Bedrock AgentCore Resources</a></li><li><a href="https://aws.amazon.com/about-aws/whats-new/2026/07/amazon-bedrock-agentcore-unified-observability-single-log-group/">AWS — AgentCore Unified Observability, July 2026</a></li><li><a href="https://genai.owasp.org/resource/owasp-top-10-for-agentic-applications-for-2026/">OWASP — Top 10 for Agentic Applications</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b95123102e6a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Securing Software with JKS, CyberArk, and LDAP Authentication]]></title>
            <link>https://medium.com/@moradiyabhavik/securing-software-with-jks-cyberark-and-ldap-authentication-633459c3780b?source=rss-aa177ec907d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/633459c3780b</guid>
            <category><![CDATA[ldap]]></category>
            <category><![CDATA[certification]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Bhavik Moradiya]]></dc:creator>
            <pubDate>Sat, 15 Jun 2024 20:57:04 GMT</pubDate>
            <atom:updated>2024-06-15T20:57:04.545Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s rapidly evolving digital landscape, ensuring the security of software systems is paramount. With the increasing prevalence of cyber threats, integrating robust security measures into your software architecture is crucial. This blog explores how you can leverage Java KeyStore (JKS), CyberArk, and LDAP for authentication to build a secure software system.</p><h3>Understanding the Components</h3><h3>Java KeyStore (JKS)</h3><p>JKS is a repository of security certificates, either authorization certificates or public key certificates, used in SSL encryption. It is a file-based system that holds cryptographic keys and certificates, making it an essential tool for managing your application’s cryptographic material.</p><h3>CyberArk</h3><p>CyberArk is a leading provider of privileged access management (PAM) solutions. It helps organizations secure, manage, and monitor privileged accounts and credentials, providing a robust mechanism to control access to critical systems and sensitive information.</p><h3>LDAP (Lightweight Directory Access Protocol)</h3><p>LDAP is an open, vendor-neutral application protocol for accessing and maintaining distributed directory information services. It is widely used for authentication and authorization, allowing organizations to manage user credentials and permissions centrally.</p><h3>Integrating JKS, CyberArk, and LDAP for Secure Authentication</h3><p>To build a secure software system, you can integrate JKS, CyberArk, and LDAP in a complementary manner. Here’s how you can do it:</p><h3>1. Secure Key Management with JKS</h3><p>Using JKS for storing cryptographic keys ensures that your keys are securely stored and managed. This is crucial for protecting sensitive data and maintaining the integrity of your software.</p><h4>Steps to Use JKS:</h4><ol><li><strong>Generate a Key Pair</strong>: Use the keytool command-line utility to generate a public-private key pair.</li></ol><pre>keytool -genkeypair -alias mykey -keyalg RSA -keysize 2048 -keystore mykeystore.jks -validity 365</pre><p><strong>2. Import Certificates</strong>: Import trusted certificates into the keystore.</p><pre>keytool -importcert -alias mycert -file mycert.cer -keystore mykeystore.jks</pre><p><strong>3. Use in Application</strong>: Configure your application to use the keystore for SSL/TLS encryption.</p><h3>2. Manage Privileged Access with CyberArk</h3><p>CyberArk ensures that privileged accounts are secure, reducing the risk of credential theft and misuse. By integrating CyberArk, you can manage and monitor privileged access, ensuring that only authorized users can access critical systems.</p><h4>Steps to Use CyberArk:</h4><ol><li><strong>Deploy CyberArk Vault</strong>: Set up CyberArk’s Digital Vault to securely store and manage privileged credentials.</li><li><strong>Integrate with Applications</strong>: Use CyberArk’s APIs or plugins to retrieve credentials securely at runtime.</li><li><strong>Monitor and Audit</strong>: Enable continuous monitoring and auditing of privileged access to detect and respond to suspicious activities.</li></ol><h3>3. Centralize Authentication with LDAP</h3><p>LDAP provides a centralized authentication mechanism, allowing users to authenticate using a single set of credentials. This simplifies user management and enhances security by enforcing consistent authentication policies.</p><h4>Steps to Use LDAP:</h4><ol><li><strong>Set Up LDAP Server</strong>: Install and configure an LDAP server such as OpenLDAP or Microsoft Active Directory.</li><li><strong>Create Directory Structure</strong>: Define the directory structure and add user entries.</li><li><strong>Integrate with Applications</strong>: Configure your applications to authenticate users against the LDAP directory.</li></ol><pre>Hashtable&lt;String, String&gt; env = new Hashtable&lt;&gt;();<br>env.put(Context.INITIAL_CONTEXT_FACTORY, &quot;com.sun.jndi.ldap.LdapCtxFactory&quot;);<br>env.put(Context.PROVIDER_URL, &quot;ldap://localhost:389&quot;);<br>env.put(Context.SECURITY_AUTHENTICATION, &quot;simple&quot;);<br>env.put(Context.SECURITY_PRINCIPAL, &quot;cn=admin,dc=example,dc=com&quot;);<br>env.put(Context.SECURITY_CREDENTIALS, &quot;adminpassword&quot;);<br>DirContext ctx = new InitialDirContext(env);</pre><h3>Putting It All Together</h3><p>Integrating JKS, CyberArk, and LDAP can significantly enhance the security of your software. Here’s a high-level overview of how they work together:</p><ol><li><strong>Authentication</strong>: Users authenticate via LDAP, ensuring a centralized and consistent authentication process.</li><li><strong>Privileged Access</strong>: CyberArk manages and secures privileged accounts, ensuring that only authorized users have access to sensitive systems.</li><li><strong>Data Encryption</strong>: JKS stores and manages cryptographic keys, ensuring that data is encrypted and protected both in transit and at rest.</li></ol><h3>Example Scenario</h3><p>Consider an enterprise application that handles sensitive financial data. Here’s how you might secure it:</p><ol><li><strong>User Authentication</strong>: Users authenticate via LDAP. This ensures that only authorized users can access the application.</li><li><strong>Privileged Access Management</strong>: Administrators and service accounts are managed through CyberArk, ensuring that privileged access is tightly controlled and monitored.</li><li><strong>Secure Communication</strong>: The application uses SSL/TLS for secure communication, with keys and certificates stored in JKS.</li></ol><h3>Conclusion</h3><p>By integrating JKS, CyberArk, and LDAP, you can build a robust and secure software system. This combination ensures that user authentication is centralized, privileged access is controlled, and data is encrypted, providing comprehensive security coverage. As cyber threats continue to evolve, leveraging these tools will help you stay ahead and protect your software and data from potential breaches.</p><p>Remember, security is not a one-time effort but an ongoing process. Regularly update and audit your security measures to adapt to new threats and vulnerabilities.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=633459c3780b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS Compute Services: Lambda vs EC2 vs ECS — Choosing the Most Cost-Effective and Highly Available…]]></title>
            <link>https://medium.com/@moradiyabhavik/aws-compute-services-lambda-vs-ec2-vs-ecs-choosing-the-most-cost-effective-and-highly-available-1cfb410aff1f?source=rss-aa177ec907d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/1cfb410aff1f</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[lambda]]></category>
            <category><![CDATA[ec2]]></category>
            <category><![CDATA[ecs-fargate]]></category>
            <dc:creator><![CDATA[Bhavik Moradiya]]></dc:creator>
            <pubDate>Thu, 13 Jun 2024 23:33:32 GMT</pubDate>
            <atom:updated>2024-06-13T23:40:10.014Z</atom:updated>
            <content:encoded><![CDATA[<h3>AWS Compute Services: Lambda vs EC2 vs ECS — Choosing the Most Cost-Effective and Highly Available Solution</h3><h3>Introduction</h3><p>When architecting applications on AWS, choosing the right compute service is crucial for optimizing both performance and cost. AWS offers a variety of compute services, each tailored for specific use cases: AWS Lambda, Amazon EC2, and Amazon ECS. In this blog, we’ll compare these services in terms of cost-effectiveness and high availability, helping you make an informed decision for your application needs.</p><h3>AWS Lambda</h3><h4>Overview</h4><p>AWS Lambda is a serverless compute service that runs your code in response to events and automatically manages the underlying compute resources. It allows you to focus solely on writing your code without worrying about provisioning or managing servers.</p><h4>Key Features</h4><ul><li><strong>Automatic Scaling</strong>: Lambda scales automatically with the number of incoming requests.</li><li><strong>Pay-as-you-go</strong>: You pay only for the compute time you consume, which is measured in milliseconds.</li><li><strong>Event-driven</strong>: Lambda functions can be triggered by various AWS services, including S3, DynamoDB, and API Gateway.</li></ul><h4>Cost-Effectiveness</h4><p>Lambda is extremely cost-effective for workloads with intermittent or unpredictable traffic patterns. You only pay for the compute time and resources your function consumes. This eliminates the need for over-provisioning, which can save significant costs, especially for applications with variable load.</p><h4>High Availability</h4><p>Lambda automatically manages the availability and fault tolerance of your functions. AWS ensures that your Lambda function runs within multiple Availability Zones in a region, providing built-in high availability without any extra configuration.</p><h4>When to Use Lambda</h4><ul><li>Applications with unpredictable or highly variable traffic.</li><li>Event-driven applications.</li><li>Microservices architectures requiring granular scaling.</li></ul><h3>Amazon EC2</h3><h4>Overview</h4><p>Amazon Elastic Compute Cloud (EC2) provides scalable virtual servers (instances) in the cloud. You have complete control over your instances, including the operating system, network, and storage.</p><h4>Key Features</h4><ul><li><strong>Flexible Compute Options</strong>: Wide range of instance types tailored to various workloads.</li><li><strong>Customizability</strong>: Full control over the operating system and software stack.</li><li><strong>Persistent Storage</strong>: Use EBS volumes for persistent storage that can be detached and reattached to instances.</li></ul><h4>Cost-Effectiveness</h4><p>EC2 can be cost-effective for consistently high workloads that require dedicated resources. However, costs can escalate with underutilized resources. Cost management strategies include:</p><ul><li><strong>On-Demand Instances</strong>: Pay for compute capacity by the hour with no long-term commitments.</li><li><strong>Reserved Instances</strong>: Significant savings for workloads with predictable usage.</li><li><strong>Spot Instances</strong>: Up to 90% discount for workloads that can handle interruptions.</li></ul><h4>High Availability</h4><p>EC2 instances can be deployed across multiple Availability Zones and regions to achieve high availability. You can use Elastic Load Balancers (ELBs) and Auto Scaling groups to distribute traffic and automatically replace unhealthy instances.</p><h4>When to Use EC2</h4><ul><li>Applications requiring full control over the server environment.</li><li>Consistently high or predictable workloads.</li><li>Legacy applications that need a traditional server environment.</li></ul><h3>Amazon ECS</h3><h4>Overview</h4><p>Amazon Elastic Container Service (ECS) is a fully managed container orchestration service that makes it easy to deploy, manage, and scale containerized applications using Docker.</p><h4>Key Features</h4><ul><li><strong>Integrated with AWS Services</strong>: Seamless integration with other AWS services like VPC, IAM, and CloudWatch.</li><li><strong>Flexible Scheduling</strong>: Supports both EC2 and Fargate launch types for container deployment.</li><li><strong>Task Definition and Service Management</strong>: Define and manage containers using task definitions and services.</li></ul><h4>Cost-Effectiveness</h4><p>ECS can be cost-effective by leveraging the benefits of containerization, such as efficient resource utilization. Cost considerations include:</p><ul><li><strong>EC2 Launch Type</strong>: Pay for the EC2 instances you use.</li><li><strong>Fargate Launch Type</strong>: Pay for vCPU and memory resources your containers use, providing a serverless option for containers.</li></ul><h4>High Availability</h4><p>ECS provides high availability by allowing you to deploy containers across multiple Availability Zones. With the Fargate launch type, AWS manages the underlying infrastructure, enhancing availability and reducing operational overhead.</p><h4>When to Use ECS</h4><ul><li>Microservices architectures with containerized workloads.</li><li>Applications requiring efficient resource utilization through container orchestration.</li><li>Teams familiar with Docker and containerization concepts.</li></ul><h3>Comparison</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rkv1raO3-rC3ukVRbLtkmg.png" /></figure><p>Choosing between AWS Lambda, Amazon EC2, and Amazon ECS depends on your specific application requirements, traffic patterns, and operational preferences:</p><ul><li><strong>AWS Lambda</strong> is ideal for event-driven, variable workloads where you want minimal operational overhead and cost-efficiency for intermittent usage.</li><li><strong>Amazon EC2</strong> offers the most control and flexibility, suitable for consistent high-demand workloads or legacy applications requiring specific configurations.</li><li><strong>Amazon ECS</strong> provides a balanced approach for containerized applications, enabling efficient resource utilization and scalable microservices architectures.</li></ul><p>By understanding the strengths and cost implications of each service, you can make an informed decision that aligns with your business needs and budget.</p><h3>Further Reading</h3><ul><li><a href="https://aws.amazon.com/lambda/pricing/">AWS Lambda Pricing</a></li><li><a href="https://aws.amazon.com/ec2/pricing/">Amazon EC2 Pricing</a></li><li><a href="https://aws.amazon.com/ecs/pricing/">Amazon ECS Pricing</a></li><li><a href="https://aws.amazon.com/products/compute/">AWS Compute Services Overview</a></li></ul><p>Feel free to leave comments or questions below, and happy architecting!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1cfb410aff1f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building and Deploying Packer Images with AWS and On-Prem VMWare using tcServer Template]]></title>
            <link>https://medium.com/@moradiyabhavik/building-and-deploying-packer-images-with-aws-and-on-prem-vmware-using-tcserver-template-92c4c4569a71?source=rss-aa177ec907d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/92c4c4569a71</guid>
            <category><![CDATA[ami]]></category>
            <category><![CDATA[packers]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[hashicorp]]></category>
            <category><![CDATA[aws-ami]]></category>
            <dc:creator><![CDATA[Bhavik Moradiya]]></dc:creator>
            <pubDate>Thu, 13 Jun 2024 23:23:45 GMT</pubDate>
            <atom:updated>2024-06-13T23:23:45.665Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is Packer?</h3><p>Packer is an open-source tool that enables you to create identical machine images for multiple platforms from a single configuration file. It supports a variety of platforms including AWS, Google Cloud, Azure, VMWare, and more. By using Packer, you can ensure that the images running in your cloud environments are consistent with those running on your on-premises infrastructure.</p><h3>Prerequisites</h3><p>Before we dive into the configuration, ensure you have the following:</p><ul><li><strong>Packer installed</strong>: Installation guide</li><li><strong>AWS account and credentials</strong>: For AWS image creation.</li><li><strong>VMWare setup</strong>: For creating images on-premises.</li><li><strong>tcServer template</strong>: A pre-configured template for building your server.</li></ul><h3>Step-by-Step Guide</h3><h4>1. Setting Up the Packer Configuration File</h4><p>Create a new file named template.json. This file will contain the configurations for both AWS and VMWare.</p><h4>2. Define Builders</h4><p>Packer uses builders to create images for various platforms. In this case, we’ll define two builders: one for AWS and one for VMWare.</p><pre>{<br>  &quot;variables&quot;: {<br>    &quot;aws_access_key&quot;: &quot;{{env `AWS_ACCESS_KEY`}}&quot;,<br>    &quot;aws_secret_key&quot;: &quot;{{env `AWS_SECRET_KEY`}}&quot;,<br>    &quot;aws_region&quot;: &quot;us-west-2&quot;,<br>    &quot;vmware_host&quot;: &quot;your-vmware-host&quot;,<br>    &quot;vmware_username&quot;: &quot;your-vmware-username&quot;,<br>    &quot;vmware_password&quot;: &quot;your-vmware-password&quot;<br>  },<br>  &quot;builders&quot;: [<br>    {<br>      &quot;type&quot;: &quot;amazon-ebs&quot;,<br>      &quot;access_key&quot;: &quot;{{user `aws_access_key`}}&quot;,<br>      &quot;secret_key&quot;: &quot;{{user `aws_secret_key`}}&quot;,<br>      &quot;region&quot;: &quot;{{user `aws_region`}}&quot;,<br>      &quot;source_ami&quot;: &quot;ami-0c55b159cbfafe1f0&quot;,<br>      &quot;instance_type&quot;: &quot;t2.micro&quot;,<br>      &quot;ssh_username&quot;: &quot;ec2-user&quot;,<br>      &quot;ami_name&quot;: &quot;packer-example {{timestamp}}&quot;<br>    },<br>    {<br>      &quot;type&quot;: &quot;vmware-iso&quot;,<br>      &quot;host&quot;: &quot;{{user `vmware_host`}}&quot;,<br>      &quot;username&quot;: &quot;{{user `vmware_username`}}&quot;,<br>      &quot;password&quot;: &quot;{{user `vmware_password`}}&quot;,<br>      &quot;iso_url&quot;: &quot;path-to-your-iso-file&quot;,<br>      &quot;iso_checksum&quot;: &quot;checksum&quot;,<br>      &quot;iso_checksum_type&quot;: &quot;md5&quot;,<br>      &quot;ssh_username&quot;: &quot;root&quot;,<br>      &quot;ssh_password&quot;: &quot;password&quot;,<br>      &quot;vm_name&quot;: &quot;packer-vmware-example&quot;,<br>      &quot;guest_os_type&quot;: &quot;ubuntu64Guest&quot;<br>    }<br>  ]<br>}</pre><h4>3. Define Provisioners</h4><p>Provisioners are used to install and configure software within the created image. Here, we’ll use a simple shell provisioner to install tcServer.</p><pre>{<br>  &quot;provisioners&quot;: [<br>    {<br>      &quot;type&quot;: &quot;shell&quot;,<br>      &quot;inline&quot;: [<br>        &quot;echo &#39;Installing tcServer...&#39;&quot;,<br>        &quot;curl -O http://example.com/path-to-tcserver-installer.sh&quot;,<br>        &quot;chmod +x path-to-tcserver-installer.sh&quot;,<br>        &quot;./path-to-tcserver-installer.sh&quot;<br>      ]<br>    }<br>  ]<br>}</pre><h4>4. Combine Builders and Provisioners</h4><p>Combine the builders and provisioners in your template.json file.</p><pre>{<br>  &quot;variables&quot;: {<br>    &quot;aws_access_key&quot;: &quot;{{env `AWS_ACCESS_KEY`}}&quot;,<br>    &quot;aws_secret_key&quot;: &quot;{{env `AWS_SECRET_KEY`}}&quot;,<br>    &quot;aws_region&quot;: &quot;us-west-2&quot;,<br>    &quot;vmware_host&quot;: &quot;your-vmware-host&quot;,<br>    &quot;vmware_username&quot;: &quot;your-vmware-username&quot;,<br>    &quot;vmware_password&quot;: &quot;your-vmware-password&quot;<br>  },<br>  &quot;builders&quot;: [<br>    {<br>      &quot;type&quot;: &quot;amazon-ebs&quot;,<br>      &quot;access_key&quot;: &quot;{{user `aws_access_key`}}&quot;,<br>      &quot;secret_key&quot;: &quot;{{user `aws_secret_key`}}&quot;,<br>      &quot;region&quot;: &quot;{{user `aws_region`}}&quot;,<br>      &quot;source_ami&quot;: &quot;ami-0c55b159cbfafe1f0&quot;,<br>      &quot;instance_type&quot;: &quot;t2.micro&quot;,<br>      &quot;ssh_username&quot;: &quot;ec2-user&quot;,<br>      &quot;ami_name&quot;: &quot;packer-example {{timestamp}}&quot;<br>    },<br>    {<br>      &quot;type&quot;: &quot;vmware-iso&quot;,<br>      &quot;host&quot;: &quot;{{user `vmware_host`}}&quot;,<br>      &quot;username&quot;: &quot;{{user `vmware_username`}}&quot;,<br>      &quot;password&quot;: &quot;{{user `vmware_password`}}&quot;,<br>      &quot;iso_url&quot;: &quot;path-to-your-iso-file&quot;,<br>      &quot;iso_checksum&quot;: &quot;checksum&quot;,<br>      &quot;iso_checksum_type&quot;: &quot;md5&quot;,<br>      &quot;ssh_username&quot;: &quot;root&quot;,<br>      &quot;ssh_password&quot;: &quot;password&quot;,<br>      &quot;vm_name&quot;: &quot;packer-vmware-example&quot;,<br>      &quot;guest_os_type&quot;: &quot;ubuntu64Guest&quot;<br>    }<br>  ],<br>  &quot;provisioners&quot;: [<br>    {<br>      &quot;type&quot;: &quot;shell&quot;,<br>      &quot;inline&quot;: [<br>        &quot;echo &#39;Installing tcServer...&#39;&quot;,<br>        &quot;curl -O http://example.com/path-to-tcserver-installer.sh&quot;,<br>        &quot;chmod +x path-to-tcserver-installer.sh&quot;,<br>        &quot;./path-to-tcserver-installer.sh&quot;<br>      ]<br>    }<br>  ]<br>}</pre><h4>5. Run Packer</h4><p>Open your terminal and navigate to the directory containing your template.json file. Run the following command:</p><pre>packer validate template.json</pre><p>If there are no errors, proceed to build the image:</p><pre>packer build template.json</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92c4c4569a71" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Best Practices for Running Containers on AWS]]></title>
            <link>https://medium.com/@moradiyabhavik/best-practices-for-running-containers-on-aws-113ad44c8edf?source=rss-aa177ec907d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/113ad44c8edf</guid>
            <category><![CDATA[containers]]></category>
            <category><![CDATA[lambda]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Bhavik Moradiya]]></dc:creator>
            <pubDate>Tue, 11 Jun 2024 21:03:53 GMT</pubDate>
            <atom:updated>2024-06-11T21:03:53.682Z</atom:updated>
            <content:encoded><![CDATA[<p>Containers have transformed the way applications are developed, shipped, and deployed, offering a consistent environment across various stages of development. AWS provides a robust ecosystem to run containerized applications, including services like Amazon ECS, Amazon EKS, and AWS Fargate. This blog post will guide you through the best practices for running containers on AWS, ensuring your applications are scalable, secure, and cost-efficient.</p><h3>Why Run Containers on AWS?</h3><p>AWS offers several benefits for running containerized applications:</p><ul><li><strong>Scalability</strong>: Automatically scale your containerized applications to meet demand.</li><li><strong>Flexibility</strong>: Choose from a variety of container orchestration services and tools.</li><li><strong>Integration</strong>: Seamlessly integrate with other AWS services like IAM, VPC, and CloudWatch.</li><li><strong>Cost Efficiency</strong>: Optimize costs with flexible pricing models and efficient resource utilization.</li></ul><h3>Best Practices for Running Containers on AWS</h3><h3>1. Choose the Right Orchestration Service</h3><p>AWS provides multiple options for container orchestration:</p><ul><li><strong>Amazon Elastic Container Service (ECS)</strong>: A fully managed container orchestration service that simplifies running and scaling containerized applications.</li><li><strong>Amazon Elastic Kubernetes Service (EKS)</strong>: A managed Kubernetes service that makes it easy to run Kubernetes on AWS.</li><li><strong>AWS Fargate</strong>: A serverless compute engine for containers that works with both ECS and EKS, allowing you to run containers without managing servers.</li></ul><p><strong>Best Practice</strong>: Choose ECS for simplicity and integration with AWS services, EKS for Kubernetes workloads, and Fargate for serverless containers.</p><h3>2. Optimize Container Images</h3><p>Optimizing your container images can significantly improve the performance and security of your applications:</p><ul><li><strong>Use Minimal Base Images</strong>: Start with minimal base images like Alpine Linux to reduce the attack surface and image size.</li><li><strong>Layer Images Effectively</strong>: Order your Dockerfile instructions to maximize layer caching and minimize the number of layers.</li><li><strong>Scan for Vulnerabilities</strong>: Regularly scan your container images for vulnerabilities using tools like Amazon Inspector or third-party solutions.</li></ul><p><strong>Best Practice</strong>: Maintain small, secure, and efficient container images by using minimal base images, optimizing Dockerfile instructions, and conducting regular vulnerability scans.</p><h3>3. Implement Robust Security Practices</h3><p>Security is paramount when running containerized applications on AWS:</p><ul><li><strong>Use IAM Roles</strong>: Assign IAM roles to ECS tasks or EKS pods to grant the least privilege necessary for each task.</li><li><strong>Enable VPC Security</strong>: Run your containers within a VPC to isolate them and use security groups to control traffic.</li><li><strong>Encrypt Data</strong>: Use AWS Key Management Service (KMS) to encrypt data at rest and in transit.</li></ul><p><strong>Best Practice</strong>: Apply the principle of least privilege with IAM roles, isolate containers within a VPC, and encrypt sensitive data.</p><h3>4. Monitor and Log Effectively</h3><p>Monitoring and logging are crucial for maintaining the health and performance of your containerized applications:</p><ul><li><strong>Use CloudWatch</strong>: Leverage Amazon CloudWatch for logging, metrics, and alarms. Collect logs from ECS tasks or EKS pods for centralized monitoring.</li><li><strong>Integrate with AWS X-Ray</strong>: Use AWS X-Ray to trace requests through your application and identify performance bottlenecks.</li><li><strong>Set Up Alarms</strong>: Configure CloudWatch Alarms to notify you of critical issues in your container workloads.</li></ul><p><strong>Best Practice</strong>: Implement comprehensive monitoring and logging using CloudWatch and AWS X-Ray to gain insights into application performance and health.</p><h3>5. Automate CI/CD Pipelines</h3><p>Automating the deployment process ensures consistency and reduces the risk of human error:</p><ul><li><strong>Use AWS CodePipeline</strong>: Set up CI/CD pipelines using AWS CodePipeline, AWS CodeBuild, and AWS CodeDeploy to automate the build, test, and deployment stages.</li><li><strong>Implement Blue/Green Deployments</strong>: Use blue/green deployment strategies to minimize downtime and reduce deployment risk.</li></ul><p><strong>Best Practice</strong>: Automate your CI/CD pipelines using AWS CodePipeline and implement blue/green deployments for safer and more reliable deployments.</p><h3>6. Optimize Costs</h3><p>Cost optimization is critical for maintaining a sustainable containerized environment:</p><ul><li><strong>Use Spot Instances</strong>: Leverage EC2 Spot Instances for cost-effective compute resources, particularly for non-critical workloads.</li><li><strong>Implement Auto Scaling</strong>: Configure Auto Scaling for ECS tasks or EKS nodes to match your application’s demand, ensuring efficient resource usage.</li><li><strong>Monitor Usage</strong>: Regularly review and monitor your resource usage to identify and eliminate waste.</li></ul><p><strong>Best Practice</strong>: Utilize Spot Instances for cost savings, implement Auto Scaling to match demand, and continuously monitor resource usage to optimize costs.</p><h3>7. Ensure High Availability</h3><p>Designing for high availability ensures your applications remain accessible and resilient:</p><ul><li><strong>Deploy Across Multiple AZs</strong>: Run your containerized applications across multiple Availability Zones (AZs) to protect against AZ failures.</li><li><strong>Use Load Balancers</strong>: Employ Elastic Load Balancing (ELB) to distribute traffic across your containers and ensure even load distribution.</li><li><strong>Implement Health Checks</strong>: Set up health checks to automatically detect and replace unhealthy containers.</li></ul><p><strong>Best Practice</strong>: Ensure high availability by deploying across multiple AZs, using load balancers, and implementing health checks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=113ad44c8edf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Amazon SageMaker: Machine Learning at Scale]]></title>
            <link>https://medium.com/@moradiyabhavik/introducing-amazon-sagemaker-machine-learning-at-scale-81347052ab05?source=rss-aa177ec907d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/81347052ab05</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[sagemaker]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[aws-ai-services]]></category>
            <dc:creator><![CDATA[Bhavik Moradiya]]></dc:creator>
            <pubDate>Tue, 11 Jun 2024 21:02:22 GMT</pubDate>
            <atom:updated>2024-06-11T21:02:22.270Z</atom:updated>
            <content:encoded><![CDATA[<p>In the rapidly evolving world of artificial intelligence and machine learning (ML), scalability and ease of use are critical factors for success. Amazon SageMaker, a fully managed service from AWS, addresses these needs by providing an end-to-end solution to build, train, and deploy machine learning models at scale. Whether you’re a data scientist, developer, or ML enthusiast, SageMaker simplifies the machine learning process and accelerates your journey from ideation to production.</p><h3>What is Amazon SageMaker?</h3><p>Amazon SageMaker is a comprehensive machine learning service that enables data scientists and developers to create, train, and deploy ML models quickly and efficiently. It integrates seamlessly with other AWS services, offering a unified platform for managing the entire machine learning workflow. SageMaker provides a range of tools and features designed to make ML accessible and scalable, from data preparation and model building to training and deployment.</p><h3>Key Features of Amazon SageMaker</h3><h3>1. SageMaker Studio</h3><p>SageMaker Studio is an integrated development environment (IDE) for machine learning. It provides a visual interface to manage all stages of the ML lifecycle, including preparing data, building models, training, tuning, and deployment. With SageMaker Studio, you can easily track experiments, visualize data, and collaborate with team members.</p><h3>2. SageMaker Notebooks</h3><p>SageMaker Notebooks are Jupyter notebooks that can be spun up with a single click. These notebooks come pre-configured with popular ML frameworks and libraries, allowing you to start coding immediately without worrying about infrastructure setup. You can also easily share and collaborate on notebooks within your team.</p><h3>3. SageMaker Autopilot</h3><p>SageMaker Autopilot automates the process of building and training ML models. It automatically explores different data preprocessing steps, algorithms, and hyperparameters to find the best model for your dataset. This feature makes it possible for users with minimal ML expertise to create high-quality models.</p><h3>4. SageMaker Experiments</h3><p>SageMaker Experiments helps you manage and track your machine learning experiments. It captures the input parameters, configurations, and results of your model training runs, making it easy to compare and reproduce experiments. This feature is crucial for maintaining the reproducibility and transparency of your ML workflows.</p><h3>5. SageMaker Model Training</h3><p>SageMaker provides a fully managed environment to train your models at scale. It supports distributed training, allowing you to train large models faster by leveraging multiple GPU instances. SageMaker also offers built-in algorithms optimized for speed and accuracy, as well as support for custom algorithms.</p><h3>6. SageMaker Model Deployment</h3><p>Once your model is trained, SageMaker simplifies the deployment process with one-click deployment to a fully managed environment. You can deploy your model as an endpoint that scales automatically based on traffic, ensuring high availability and low latency. SageMaker also supports A/B testing and canary deployments to facilitate safe and gradual rollouts.</p><h3>7. SageMaker Neo</h3><p>SageMaker Neo optimizes models for inference on various hardware platforms, including AWS Inferentia, NVIDIA GPUs, and edge devices. This optimization ensures that your models run efficiently with minimal latency and resource consumption.</p><h3>Getting Started with Amazon SageMaker</h3><h3>Step 1: Set Up SageMaker Studio</h3><p>To get started with Amazon SageMaker, first set up SageMaker Studio:</p><ol><li><strong>Open the SageMaker Console</strong>: Navigate to the <a href="https://console.aws.amazon.com/sagemaker/">AWS SageMaker Console</a>.</li><li><strong>Create a New SageMaker Studio Domain</strong>: Follow the prompts to create a new SageMaker Studio domain and user profile.</li><li><strong>Launch SageMaker Studio</strong>: Once the domain and user profile are created, launch SageMaker Studio from the console.</li></ol><h3>Step 2: Prepare Your Data</h3><p>Use SageMaker Studio to import and prepare your data for training. You can use SageMaker Data Wrangler, a tool within Studio, to clean, transform, and visualize your data. Data Wrangler simplifies the data preparation process with a visual interface and built-in transformations.</p><h3>Step 3: Build and Train Your Model</h3><p>With your data ready, you can start building and training your model:</p><ol><li><strong>Create a SageMaker Notebook</strong>: Launch a new Jupyter notebook in SageMaker Studio.</li><li><strong>Write Your Code</strong>: Use the notebook to write your ML code. You can choose from various built-in algorithms or bring your own.</li><li><strong>Train Your Model</strong>: Use SageMaker’s training APIs to train your model. Specify the dataset, algorithm, and training parameters.</li></ol><h3>Step 4: Deploy and Monitor Your Model</h3><p>After training, deploy your model to a SageMaker endpoint:</p><ol><li><strong>Deploy the Model</strong>: Use the SageMaker console or APIs to deploy your trained model as an endpoint.</li><li><strong>Monitor the Endpoint</strong>: Use SageMaker Model Monitor to track the performance of your deployed model and detect data drift or anomalies.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81347052ab05" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>