This AI Reads Scary Letters So You Don't Have To (and It Costs Less Than a Penny) A developer built CartaFรกcil, a serverless app that photographs English-language letters and returns a plain-Spanish explanation of who sent them, what they decided, deadlines, amounts, required actions and any free help offered. The app runs on AWS Amplify, API Gateway, Lambda and DynamoDB, calling Amazon Nova 2 Lite on Bedrock with a system prompt that forces a fixed JSON schema and forbids inventing details, at roughly 0.16 cents per text letter and about 0.3 cents with a photo. The developer tested it on a real medical bill and with family and friends, and published the code on GitHub. A lot of the people I love get letters they can't fully read. A bill from a medical billing company, a notice from the school, something from the county. The letter is in English, the deadline is real, and the usual fix is a photo sent to someone on WhatsApp with "ยฟquรฉ dice esto?". So I built CartaFรกcil : you open a link on your phone, take a photo of the letter, and a few seconds later you get a plain-Spanish explanation. Who sent it, what they decided, the date and the amount in big letters, what you have to do, what to bring, the phone number as a "tap to call" button, and this one matters more than I expected any free help the letter offers, like an interpreter or a payment plan. The first real test wasn't a sample. It was a medical bill I had at home. It got the account number, the client number, the phone number and the payment link right. Then my mom tried it, and then a few friends, who found problems I never would have. It's serverless, I built everything in the AWS console, and each letter costs a fraction of a cent. This is a learning project, not legal, medical or financial advice. All the letters shown in this post are fake, from fictional organizations. A single-page app on AWS Amplify sends a photo of a letter to API Gateway and Lambda. Lambda checks a one-person code in DynamoDB and asks Amazon Nova 2 Lite on Bedrock for a structured Spanish explanation. The interesting part was everything the AI got almost right. ๐Ÿ”— GitHub: github.com/sinai07/cartafacil-aws https://github.com/sinai07/cartafacil-aws | Field | Description | |---|---| | ๐Ÿ’Œ Project Name | CartaFรกcil โ€“ AI Letter Explainer | | ๐Ÿšง Status | Working, tested by me, my mom and a few friends | | ๐ŸŽ“ Difficulty | Beginner | | ๐Ÿง  AI Model | Amazon Bedrock โ€“ Amazon Nova 2 Lite | | โ˜๏ธ AWS Services | Lambda, DynamoDB, API Gateway HTTP API , Amplify Hosting, Budgets | | ๐Ÿ“ AWS Region | US East N. Virginia โ€“ us-east-1 | | ๐Ÿ–ฅ๏ธ Tooling | AWS Management Console + CloudShell | | ๐Ÿ Language | Python 3.13 boto3 only + one HTML file | | ๐ŸŒŽ Output | Plain-Spanish explanation of English letters | | ๐Ÿ’ต Cost | About 0.16 cents per text letter, roughly 0.3 cents with a photo | โฌ†๏ธ Back to top index.html , and they type their code. POST /explain . API Gateway applies throttling and CORS. CloudWatch keeps the logs only token counts, not the letters , and a Budget sends an email if anything goes above USD 10. The very first question I had was whether I needed the root user to create a budget. You don't. An IAM user with admin permissions can do it, as long as the root user has turned on "IAM user and role access to Billing information" once Account settings . If the Budgets page says you don't have billing permissions, that's the switch. I created a monthly cost budget of USD 10 with an email alert. A budget only warns you; it doesn't stop anything. The real spending cap in this app is the codes Step 2 . The core is one Lambda function, letter-explainer-fn Python 3.13, only boto3 . It sends the letter to Nova 2 Lite with a system prompt that forces a fixed JSON shape: sender , decision , date , time , amount due , reference numbers , place , contact , what to do , requirements , how to comply , links , phone numbers , help available , if you dont comply , urgency and key terms . The code and field names are in English; the explanation is in Spanish. The language is just an environment variable, OUTPUT LANGUAGE , so another community Portuguese, Haitian Creole is a one-field change. These rules in the prompt mattered most: - Never invent anything. If a detail is not in the letter, write exactly: NOT IN LETTER - LINKS: include ONLY web addresses that are written in the letter, copied character by character. NEVER invent, complete or guess a link, even if you know the official site. - HELP: look carefully for any help the letter offers free interpreter or translation, payment plan, financial assistance, deadline extension, accommodations ... I also gave the function the minimum permission it needs: an inline policy that can call only Nova 2 Lite. { "Version": "2012-10-17", "Statement": { "Sid": "InvokeNova2LiteOnly", "Effect": "Allow", "Action": "bedrock:InvokeModel", "Resource": "arn:aws:bedrock: : :inference-profile/us.amazon.nova-2-lite-v1:0", "arn:aws:bedrock: ::foundation-model/amazon.nova-2-lite-v1:0" } } And I raised the timeout from the default 3 seconds to 30 seconds . A letter takes about 2 seconds, but the default would cut it off. I tested with two fake letters: a past-due water bill and a note from a school. Every round, the AI got the facts right, and every round I still found something a real person would miss. The fix for that last one was simple: the AI writes only the date, and the code adds the weekday: python def fix weekday date text : """LLMs are bad at calendar math in testing, Nova called Tuesday Nov 24, 2026 a Friday . So the code computes the weekday from the original date in parentheses and writes it itself.""" ... parsed = datetime.strptime original, fmt weekday = SPANISH WEEKDAYS parsed.weekday After that, both letters came back complete. Each one used about 1,150 input tokens and 400-500 output tokens. A funny moment: I came back to the lab the next day, saw Spanish in the Lambda console and asked for everything to be in English. Then I remembered that explaining English letters in Spanish is the whole app . The code stayed in English; the explanation stayed in Spanish. Without a limit, anyone who found the URL could use the app as much as they wanted, and every letter costs money. So each person gets a code with 4 uses, stored in a DynamoDB table: | code | friend | uses left | active | |---|---|---|---| | CARTA-ANA | Ana | 4 | true | The Lambda checks the code before calling Bedrock, with one atomic operation: dynamodb.update item TableName=CODES TABLE, Key={"code": {"S": code}}, UpdateExpression="SET uses left = uses left - :one", ConditionExpression="attribute exists code AND active = :yes AND uses left :zero", ... DynamoDB subtracts the use only if the code exists, is active and still has uses left. Two letters sent in the same second can't both spend the last use. If Bedrock fails after the use is spent, the Lambda gives it back. And if a code gets shared in a group chat, I set active to false and nobody else is affected. I didn't want to edit the Bedrock policy its name says "Bedrock only" , so the role got a second inline policy, DynamoDBCodesOnly , with exactly one action: dynamodb:UpdateItem on this one table. One policy per job, named after what it allows. Then I spent the four uses. The first letter left 3, the fourth left 0, the fifth got a 403 , and a made-up code got a 403 without ever reaching Bedrock: Both errors use the same message on purpose: "Invalid code, inactive, or no uses left." If the message said "this code doesn't exist", someone could try codes until they found real ones. APIs were the part I understood least going in, so here's the way it finally clicked for me. Think of a restaurant: the web page is the customer, the Lambda is the kitchen, and API Gateway is the waiter. The customer never walks into the kitchen; they give their order to the waiter, who brings back the answer. I created an HTTP API , the simpler and cheaper type REST APIs add things like caching and API keys that I didn't need , and set four things: GET , gets a 404 and never reaches the Lambda. $default stage. for testing and locked it in Step 4. Two things tripped me up. After creating the API, the console opened the Routes page and I couldn't find the URL anywhere; it's on the API's main page, in the Stages table. And in the CORS screenshot below you can see "No headers are allowed" : I typed content-type but never clicked Add . My tests still passed because curl ignores CORS, so I only caught it in Step 4. Then I tested from CloudShell with curl , the same way the page would call it: curl -s -X POST "$URL/explain" \ -H "Content-Type: application/json" \ -d '{"code":"TEST-7K2P","letter text":"MAPLE RIDGE ELEMENTARY SCHOOL ..."}' \ | python3 -m json.tool --no-ensure-ascii | Test | Result | |---|---| | Real letter + valid code | 200 with the full explanation and "uses left": 3 | | Fake code | 403 , rejected before Bedrock | | GET instead of POST | 404 Not Found , the Lambda never ran | The response through API Gateway looks different from the Lambda console. There it was wrapped statusCode , headers , and an escaped body ; here it's clean JSON, because the HTTP API unwraps the proxy response into a real HTTP status, headers and body. The page is a single index.html , no frameworks. The first version had an airmail-envelope design; I didn't like it. I wanted something that looks like the apps people already use, so the final one has soft lavender, mint and coral, rounded cards, emoji icons, and the "โœจ Explicar mi carta" button pinned to the bottom like in a phone app. To deploy it, I replaced