If you notice a sudden jump in your Amazon Bedrock costs—from around $1,000 up to $400,000 in just a few days—it’s probably not a billing mistake. Instead, it’s usually because your application is using way more tokens than expected. This can happen quickly and requires some immediate investigation. Here’s what you should do to understand and fix the issue.
First, understand why this can happen. Amazon Bedrock charges are based on token usage, so costs can go up sharply and unexpectedly. Unlike regular compute costs that increase gradually with server hours, token consumption can skyrocket if something isn’t configured correctly. Common reasons include retry loops that keep calling the API without delays, prompts that pass entire documents without trimming, batch jobs that run too many tasks at once, or errors in your application causing repeated API calls.
Next, note why you might not see the problem right away. AWS Cost Explorer updates billing data a few hours after the charges happen, so there’s often a delay before you realize there’s a spike. However, Amazon Bedrock publishes metrics like InputTokenCount and OutputTokenCount to CloudWatch shortly after each API invocation. These metrics are your earliest warning signs, often within minutes of high usage.
To respond quickly, follow these steps:
1. Visit the AWS Support Center and either add more details to a current support case or create a new support request if you haven’t already.
2. Check CloudWatch for the InputTokenCount and OutputTokenCount metrics during the time of the spike. This helps you see precisely how many tokens were used.
3. Review your CloudTrail logs to find out which user or role made the calls to the API during the spike.
4. If you suspect unauthorized activity, temporarily restrict access to the affected model until you can identify the cause.
5. Look through your application logs for errors, retry patterns, or other unusual behavior that might have caused excessive API calls.
For a deeper investigation, examine your application’s code for issues like infinite loops, missing rate limiting, or logic errors leading to repeated calls. Even if only one model shows a spike, it might be caused by a specific feature or code path rather than someone unauthorized accessing your account.
To prevent similar problems in the future, set up CloudWatch alarms based on token usage thresholds. Enable detailed logging of model invocations for better analysis. Use cost allocation tags with your Application Inference Profiles so you can track which parts of your app are responsible for costs. Using AWS Budgets can also help you set limits and receive automatic alerts if costs get too high.
Because this kind of spike indicates a serious issue, work with AWS Support right away through the Support Center. They can help you identify the root cause and decide on the best steps to stop it from happening again.
By taking these actions quickly, you can prevent big surprises in your bills and keep your Amazon Bedrock usage under control.
