惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Schneier on Security
A
Arctic Wolf
Scott Helme
Scott Helme
S
Securelist
Schneier on Security
Schneier on Security
W
WeLiveSecurity
Attack and Defense Labs
Attack and Defense Labs
Security Latest
Security Latest
Project Zero
Project Zero
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Know Your Adversary
Know Your Adversary
P
Palo Alto Networks Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Google DeepMind News
Google DeepMind News
P
Proofpoint News Feed
C
Check Point Blog
F
Full Disclosure
Stack Overflow Blog
Stack Overflow Blog
H
Hacker News: Front Page
T
The Blog of Author Tim Ferriss
TaoSecurity Blog
TaoSecurity Blog
Vercel News
Vercel News
A
About on SuperTechFans
N
News and Events Feed by Topic
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The GitHub Blog
The GitHub Blog
S
Security Affairs
Y
Y Combinator Blog
T
The Exploit Database - CXSecurity.com
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Forbes - Security
Forbes - Security
IT之家
IT之家
WordPress大学
WordPress大学
Last Week in AI
Last Week in AI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
The Register - Security
The Register - Security
Jina AI
Jina AI
云风的 BLOG
云风的 BLOG
T
Tailwind CSS Blog
K
Kaspersky official blog
Hacker News: Ask HN
Hacker News: Ask HN
C
Cisco Blogs
MyScale Blog
MyScale Blog
博客园 - 【当耐特】
T
Threat Research - Cisco Blogs
D
Docker
G
GRAHAM CLULEY

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
How My First Claude Code on AWS Bedrock Experiment Cost Me $8.43 in Just One Day
Venkatesh K · 2026-06-16 · via DEV Community

My AWS Bedrock Experiment Cost Me $8.43 in Just One Day

What I learned about AWS Bedrock pricing the hard way, and why budget alerts saved me


Why I Even Tried Claude Code on Bedrock

I have been using Claude Code for a while now, connected to Anthropic directly. It works well. But two things were bothering me.

First, the usage limits. Claude Code on Anthropic's native setup has 5hours session limit and a weekly usage cap. Once you hit it, you have to wait. If you are in the middle of something or just want to experiment freely, that gets frustrating fast.

Second, billing. I already manage everything on AWS. I'm very familiar with it, the invoices go to one place, and I understand how to track and control costs there. Adding a separate Anthropic subscription meant one more billing account, one more credit card charge, one more thing to track. I just wanted everything under one roof.

So I thought, why not try Claude Code connected to Amazon Bedrock? Same tool, runs on AWS, billed through AWS. Seemed like a clean solution to both problems.

What happened next is why I am writing this post.


The Two Ways to Run Claude Code

Most people do not realise Claude Code can be configured to run in two different ways.

Option 1: Claude Code via Anthropic directly
You connect Claude Code to Anthropic's API or use it under your Claude subscription. Billing goes through Anthropic. If you are on a subscription plan, you pay a flat monthly fee and the usage limits apply to how much you can do within that.

Option 2: Claude Code via Amazon Bedrock
You connect Claude Code to AWS Bedrock as the backend. Same Claude models, but now AWS is your provider. Billing goes through your AWS account. No Anthropic subscription needed.

From the outside, it looks and feels the same. But the billing model underneath is completely different, and that is where things get interesting.


What Happened When I Tried It

I set up Claude Code to use Bedrock and gave it a prompt. A fairly detailed one, nothing unusual, the kind I have run through Claude Code before without any issues.

What I got back was this:

API Error: {"message":"Bedrock is unable to process your request."}

aws-bedrock-api-error

Okay, maybe a one-off. I tried again.

API Error: The operation timed out.

And again.

API Error: The operation timed out.

aws-bedrock-api-error

At one point Claude Code even said "Now I have everything I need. Let me build..." and then immediately hit a timeout. I asked it to continue. Same error. I asked again. Same error.

I never got a usable output. Not once.


Then My Budget Alert Fired

I had already set up two AWS budget alerts before starting any of this. One at $5 and one at $10, I was alerted by my budget alert.

aws-budgets-alert

When I opened the AWS Cost and Usage dashboard, this is what I saw for a single day (June 12):

  • Claude Sonnet 4.6 (Bedrock Edition): $4.34
  • Claude Sonnet 4.5 (Bedrock Edition): $2.74
  • Tax: $1.27
  • Total for the period: $8.43 (minor other AWS charges included)

cost-explorer

cost-explorer

My $5 monthly budget was sitting at 197.74% used, with AWS forecasting $11.59 by end of month. For zero working output.

alt text


Wait, It Charges Even When It Fails?

Yes. This is the part most people do not expect.

AWS Bedrock charges you based on tokens processed. Tokens are roughly the units of text going in (your prompt) and coming out (the response). You are not being charged for a successful result. You are being charged for the compute that happened while trying to process your request.

So every time I retried, my detailed prompt was being sent to Bedrock again. Each retry was being counted. Even the requests that timed out halfway through still consumed tokens on the input side.

This is not a flaw in how AWS works. This is exactly how pay-per-token cloud services are designed. But if you are coming from a flat-rate subscription mindset, it can catch you off guard quickly.


The Cost Comparison That Really Surprised Me

Here is the part I want to highlight clearly.

Claude Code via Anthropic direct: roughly $20 per month (1999 INR if purchased through Google Play Store in India). That covers a lot of usage within the weekly limits.

Claude Code via Bedrock, in my case: $8.43 in a single day with few attempts, across a handful of prompts, none of which gave me a working result.

I was trying Bedrock partly to avoid the usage limits and consolidate billing. But what I ended up with was a higher cost for fewer results, billed in a way that is much harder to predict or control.

That does not mean Bedrock is the wrong choice. For teams with enterprise AWS accounts, compliance requirements, or very specific usage patterns, it can absolutely make sense. But for an individual developer experimenting or doing day-to-day coding work, the flat subscription through Anthropic is almost certainly the cheaper and more predictable option.


What Made It Worse: Large Prompts and Retries

Longer prompts mean more input tokens, which means higher cost per attempt. When those attempts keep failing and you keep retrying, the cost multiplies fast even though you are getting nothing useful out of it.

On a flat subscription, retrying costs you nothing extra. On pay-per-token, every retry has a price.

This is something to keep in mind especially during the exploration phase, when you are naturally going to send things multiple times, adjust, and try again.


What Saved Me: Budget Alerts Set Up in Advance

The only reason this stopped at $8.43 and did not keep going is that I had AWS Budgets configured before I started.

If you are on AWS and have not set this up yet, please do it before anything else. It takes about two minutes.

  1. Go to AWS Console and search for Billing and Cost Management
  2. Click on Budgets in the left menu
  3. Click Create budget
  4. Choose Cost budget
  5. Set a monthly amount, even $5 is a good starting point
  6. Add your email address and set alerts at 80% and 100%
  7. Save it

This will not stop charges from happening. But it will tell you when you are approaching a limit, so you can make a decision before the bill gets out of hand.


When Does Bedrock Actually Make Sense?

To be fair, there are real reasons to use Claude on Bedrock.

If your organisation is already deep in AWS and needs everything billed and audited in one place, Bedrock makes that possible. If you have data residency or compliance requirements that mean your prompts cannot leave AWS infrastructure, Bedrock gives you that control. If you are building a production application and want to integrate Claude into an existing AWS architecture, Bedrock fits naturally.

But if you are an individual developer who just wants to use Claude Code freely without hitting weekly limits, Bedrock is probably not the right solution. You are trading a predictable monthly cost for an unpredictable per-token cost, and in most cases you will spend more.


What I Would Do Differently

Set up a budget alert before touching any new AWS service, especially anything AI-related.

Start with a tiny test prompt when trying a new model or service setup. Make sure it actually works at small scale before sending your real workload.

Understand what the error means before retrying. The "Bedrock is unable to process your request" error can mean the model is not available in your region, or you have hit a service quota. Retrying will not fix that, it will just add to the bill.

Know your pricing model before you start. Flat subscription and pay-per-token are very different things, and mixing them up is an expensive lesson.


The Bottom Line

I spent $8.43 and got nothing working. That is not a huge amount, but the pattern it represents matters a lot if you scale it up or do not catch it early.

Cloud costs are quiet. They do not ask for permission. AI services on the cloud feel lightweight because all you are doing is typing a prompt, but what is happening on the billing side is a different story.

If you are exploring AWS Bedrock or any cloud AI service for the first time, set your budgets first, start with something small, and understand whether you are on a subscription model or a pay-per-token model before you begin.

Learned this one the slightly expensive way. Hopefully this saves someone else from the same surprise.


Have you run into unexpected AWS charges when experimenting with AI services? Would love to hear about it in the comments.


Thanks for reading! If this was helpful:

  • ❤️ Like if it added value
  • 💾 Save for later
  • 🔄 Share with your team

Let's connect and discuss Cloud:

#AWS, #AmazonBedrock, #Cloud #ClaudeCode, #AWSBudgets, #AWScommunity #LetUsCloud