I've installed Claude Code and I had a free trial week. After a while the subscription expired and I wondered: is there a way to pay for Claude Code usage directly through my AWS bill?
The idea makes sense: through Amazon Bedrock we have access to Anthropic models via API, and sometimes we also have AWS promotional credits applied to our account that could help offset the cost...
So, those are basically the two questions:
- Can we use Claude Code through Amazon Bedrock?
- If so, can we use promotional credits to pay the bill?
While the first question has a clear yes answer and a straightforward setup path, the second one is more nuanced — you need to understand how credits work, what their actual scope is, and how to properly monitor Anthropic model costs in your AWS account.
Update — Claude Platform on AWS: AWS and Anthropic now also offer Claude Platform on AWS, which provides access to Anthropic’s native Claude Platform through an AWS account. This is different from using Claude models through Amazon Bedrock. The approach described in this post focuses on Claude Code via Amazon Bedrock, which may be eligible for certain AWS credits depending on the credit terms. Claude Platform on AWS is billed through AWS Marketplace and should be evaluated separately for credit eligibility, governance, and data-processing requirements.
Q1. Can we use Claude Code through Amazon Bedrock?
You just need to set three environment variables and the magic happens:
1. Let's see: Subscription is over
This was my current status after ending my Claude Pro free week.
We can read Sonnet 4.6 · Claude Pro and also the message:
Your account does not have access to Claude Code. Please run /login.
At this point, Claude Code requires a Claude Pro subscription to continue using it.
2. Setting Up the Bedrock Integration
After setting the three variables:
export CLAUDE_CODE_USE_BEDROCK=1
export AWS_PROFILE=my-aws-profile
export AWS_REGION=us-east-1
Now the message is different:
Sonnet 4.5 · API Usage Billing
This means the usage is now billed per API usage through AWS, instead of requiring a Claude Pro subscription.
Cost note: Claude on Amazon Bedrock is billed per token. If your AWS account has eligible credits, they may offset Bedrock usage. However, credit coverage depends on the specific credit program and whether the charge appears as Bedrock usage or AWS Marketplace usage.
3. Changing the models
Another useful feature is the /model command.
Using:
you can change the model used by Claude Code.
Some models are more powerful, while others are more cost-effective for small tasks.
For example:
- Claude Sonnet → better for complex coding tasks
- Claude Haiku → faster and cheaper for simple prompts
This makes it easy to balance performance and cost depending on the task.
But... let's see that there is an uncomfortable message at the bottom:
The model us.anthropic.claude-sonnet-4-5-20250929-v1:0 is not available on your bedrock deployment...
In the next section, we will see how to solve it:
4. First usage of Anthropic models with Amazon Bedrock
When you have a brand new AWS account, the first time you want to use any Anthropic model you must first fill out a form describing your use case.
This is required only once per account, but it is good to be aware of it.
and then
That's all.
And, after only two minutes, the message in the botton line changed from
The model us.anthropic.claude-sonnet-4-5-20250929-v1:0 is not available on your bedrock deployment...
to
Hello! I'm ready to help you with the ShopMind project.
Whizard Caution: Monitor your Bedrock tokens and costs
With this integration, you should be careful abut your Bedrock cost for the Claude Code model usage.
Using AWS Cost Explorer should be trivial, but, at first, when you start using your AWS account and apply your first credits, you may not be fully aware of what you are really using versus what you are actually spending daily or monthly.
That is a subtle difference, but let's review it.
In the following screen, I'm spending $ 0.00, but… where is my usage?
In the first Cost Explorer screen, the usage is hidden by the applied credits. In this case, I had credits from the AWS re:Invent 2025 expo.
To see the real usage (even if the credits are covering the cost), you can activate a filter on the left side. Select Charge type and then choose Usage.
With this filter applied, Cost Explorer will show the actual usage, and you can understand how close you are to consuming your credits without waiting until the end of the month or the billing cycle.
Is That True? AWS Credits for Anthropic Models in Bedrock?
Usually, AWS promotional credits cannot be applied to 3P (Third Party) models in Amazon Bedrock. That makes sense: why would AWS finance, with credits, the usage of models from Anthropic when they are also offering their own models, such as the Nova family, for example?
However, a few days ago I realized that something seems to have changed. It appears that promotional credits can now be applied to 3P models like those from Anthropic, as long as the usage remains within normal limits.
As confirmation, I'm sharing my own AWS Cost Explorer dashboard, which shows that my Amazon Bedrock expenses are being covered by the AWS promotional credits available in my account.
The negative values represent the promotional credits applied, while the green bar shows the Amazon Bedrock service usage that is being covered by those credits.
Why this is useful
Many developers already receive AWS credits through programs like AWS Community Builders, hackathons, startup programs, or educational accounts.
With this configuration, instead of paying for a Claude Pro subscription, you can run Claude Code directly through Amazon Bedrock and consume those credits.
For builders working with AWS infrastructure, this is a very convenient way to experiment with Claude Code while keeping everything inside the AWS ecosystem.
This is the short answer for personal usage...
What about a governated usage?
For a governated usage instead personal level, using Claude Code through Amazon Bedrock also brings several advantages related to governance, compliance, and security. Some of them are the following:
Centralized billing and cost control through the AWS account and Cost Explorer.
Use of AWS IAM and IAM Identity Center to control who can access and use AI models.
No external API keys required, since authentication is handled through AWS credentials.
Integration with AWS governance tools, such as CloudTrail and CloudWatch, for auditing and monitoring usage.
Ability to apply existing AWS credits to AI workloads, including Amazon Bedrock usage.
Alignment with enterprise security policies, since the traffic stays within the AWS environment.
... and more!
All these ones are true, but, beyound the scope of this post :)
See you in the next one!
I hope that this tip helps you get more value from your AWS credits while using Claude Code.
— Pablo















Top comments (0)