Case Study

Deploying a Secure AI Coding Assistant on AWS Bedrock

Picture of ITGix Team
ITGix Team
Passionate DevOps & Cloud Engineers
03.11.2026
Reading time: 5 mins.
Last Updated: 03.11.2026

Table of Contents

The client is a digital health company that brings together personal health data, including medical records, wearable fitness data, lab results, and medications, with a library of vetted medical content. Its platform transforms this information into personalized health summaries rather than leaving users to navigate fragmented data.

The platform serves individual users as well as healthcare-provider partners operating their own branded versions.

Its infrastructure runs on AWS, with containerized workloads on Amazon ECS with AWS Fargate, CloudFront for web frontends, and Keycloak for identity and single sign-on (SSO). Amazon Bedrock powers several AI capabilities within the product, alongside services including OpenSearch, Amazon RDS, Amazon SQS, Amazon SES, Amazon SNS, and AgentCore.

The company wanted to extend its use of AI to developer workflows by introducing Claude Code through Amazon Bedrock, while maintaining control over access, security, and costs.

ai coding

The development team wanted to deploy an AI coding assistant using Claude Code with Amazon Bedrock. This approach kept model access within the company’s existing AWS security boundary rather than relying on a separate third-party API integration.

To accelerate the initial rollout, access was configured through a shared IAM user with two long-lived access keys. Although this gave developers immediate access to the assistant, it introduced significant security and cost-management risks.

The shared credentials made it impossible to attribute model calls to individual developers or set clear usage limits per person. During a cost evaluation, ITGix identified a spike of approximately 581 model calls per hour from a single key, traced to the Claude command-line tool.

There was also no effective spending limit in place. An uncontrolled session or leaked credential could therefore result in unexpected costs.

The requirements were clear: move to individual, short-lived, auditable developer access; restrict access to approved models; establish a defined budget with early warnings for unusual spending; and automatically block further Bedrock model invocations when the budget threshold was breached.

However, the first round of cost controls exposed another issue. Claude Sonnet 5 charges had exceeded the agreed monthly limit, yet the AWS Budget reported zero spend and triggered no alert.

The investigation found two contributing factors:

  • Incorrect service filtering: The budget filtered on the Amazon Bedrock service, while model charges appeared under separate service line items.
  • An additional tag filter: The combined filters resulted in no matching charges.

CloudWatch billing metrics shared the same limitation because they did not expose the required per-model charges.

The problem was compounded by the fact that other parts of the platform also used these models. Although developer spending was tracked through a cost allocation tag, the model calls were not routed through a tagged resource. As a result, the tag did not reach the relevant model charges.

Finally, restricting the developer permission set to a newly created custom inference profile caused Claude Code requests to fail. Although the custom profile was explicitly allowed, Amazon Bedrock also checked access to the original inference profile and underlying model when processing requests through the custom profile.

The solution needed to address identity, authorization, cost attribution, budget enforcement, and model access together.

ITGix deployed Claude Code through Amazon Bedrock in the client’s own AWS account, then strengthened the configuration as real usage exposed gaps in the original setup.

The work covered individual developer authentication, model-specific access permissions, cost allocation, automated budget enforcement, and anomaly detection.

ITGix retired the shared IAM user and migrated developer access to AWS IAM Identity Center.

Developers now authenticate through SSO and receive temporary credentials through a dedicated permission set scoped to Amazon Bedrock and approved Anthropic models, including Sonnet.

Sessions expire after eight hours, requiring developers to authenticate again. This removes the dependency on shared, long-lived access keys and avoids persistent sessions.

The change established individual identities for model usage, allowing calls to be attributed to the developer who made them. Access can also be revoked for an individual without affecting other team members.

To move beyond cost monitoring, ITGix configured a monthly AWS Budget to track Claude Code usage.

When the budget threshold is breached, an automated budget action triggers an execution role that attaches an IAM deny policy blocking Bedrock model invocation. This changes the control from a notification-only mechanism to an enforced spending limit.

AWS Cost Anomaly Detection was also introduced to identify unusual usage and spending patterns earlier.

Together, these controls provide both proactive detection and an automated mechanism to stop further model calls when the configured budget threshold is exceeded.

To distinguish Claude Code usage from other workloads using the same models, ITGix created a dedicated inference profile by copying the global Claude Sonnet 5 inference profile and assigning it a specific tag.

The BedrockDeveloper permission set was tightened to restrict access to the intended profile, and developers were instructed to configure Claude Code to use the custom inference profile.

This provided a dedicated, tagged resource through which Claude Code usage could be identified and tracked separately in billing.

During testing, requests failed because Amazon Bedrock also required permission to access the original global inference profile and the underlying model.

To resolve this, ITGix added the global Claude Sonnet 5 inference profile to the permission set alongside the custom profile. Developers then manually set their default model to the new custom profile.

Claude Code worked as expected after this change. The custom profile remained the configured target for Claude Code, allowing usage to carry the explicit tag and be attributed to the appropriate budget. The permission set remained restricted to Sonnet 5, keeping access limited to the intended model and coding-assistant use case.

The client now operates an AI coding assistant through Amazon Bedrock with individual developer identities, auditable access, and an enforced cost ceiling.

The changes addressed the security and cost-control gaps that emerged as model usage increased.

Shared, long-lived credentials were removed. Developers authenticate through AWS IAM Identity Center and receive temporary credentials scoped to the approved Bedrock resources. Model calls can be traced to individual developers, and access can be revoked without affecting other users.

The permission set limits developers to the approved model scope. The dedicated inference profile provides a separate, tagged resource for Claude Code usage without removing the permissions needed for Bedrock to resolve the underlying model and global profile.

Monthly budget controls now support automated blocking of further Bedrock model invocations when the configured threshold is breached. AWS Cost Anomaly Detection provides an additional layer for identifying unusual usage.

The dedicated, tagged inference profile allows Claude Code charges to be distinguished from model usage generated by other parts of the platform. This helps align cost monitoring with the intended developer budget.

The result is a secure and cost-controlled AI coding assistant deployed on AWS Bedrock, with a configuration designed to scale to more developers without returning to shared credentials.

By addressing authentication, model permissions, inference-profile tagging, budget enforcement, and anomaly detection together, ITGix helped establish a controlled environment for AI-assisted development while retaining the company’s existing AWS architecture and security boundaries.

Check out more of our blog posts here.

More Case Studies

About the Client Aurora Serverless PostgreSQL was selected as the core database technology for a European healthcare startup delivering compliance-ready AI solutions for medical organizations. Built on Amazon Aurora PostgreSQL,...
Reading
Introduction During the peak of the COVID-19 pandemic, a major online testing platform faced significant challenges in handling exponential user growth. The platform, which facilitated appointment scheduling and test result...
Reading

Blog Posts

How DevOps is Revolutionizing Patient Care, Compliance, and Innovation in the Healthcare Sector Introduction: The Healthcare Industry at a Turning Point The global healthcare sector is undergoing an unprecedented digital...
Reading
Importance of technology in Healthcare Presently, technologies have exceptionally rapid development, and the observed potential is increasing with time. Technology is not only changing the way we lead our personal...
Reading
Get In Touch
ITGix provides you with expert consultancy and tailored DevOps services to accelerate your business growth.
Newsletter for
Tech Experts
Join 12,000+ business leaders, designers, and developers who receive blogs, e-Books, and case studies on emerging technology.