← All projects

Card-authorization bank API

A serverless bank API on AWS Lambda that approves or declines card transactions. Solo build; handled thousands of requests from 19 clearinghouses built by other students.

Architecture diagram: clearinghouses send HTTPS POST requests to an AWS Lambda, which reads and writes DynamoDB and posts audit reports to an external URL

Project name: Wild West Bank

The simulation

During my M.S. in Software Development, my class ran a payment-network simulation. Each graduate student built and ran their own bank, and other students built the credit-card clearinghouses that sit between merchants and banks. When a simulated customer swiped a card, a clearinghouse called the right bank’s API and waited for an approve or decline. Over the last week and a half, my bank handled thousands of transaction requests from 19 clearinghouses, along with my own load tests.

What I built

I built it alone: the requirements, the database design, the Lambda, the deploy pipeline, the tests and the reporting scripts.

  • A Lambda that checks the clearinghouse and the account, moves the money in DynamoDB, logs every request (account numbers masked) and returns one of four fixed answers.
  • A staging-then-prod pipeline in GitHub Actions that signs in to AWS through OIDC, with no stored keys. Prod runs exactly the Lambda version that was tested in staging.
  • An audit endpoint that posts a JSON report of matching transactions to a given URL, with retries.

How it works

Each transaction is applied with one conditional DynamoDB write. A debit withdrawal only succeeds if the balance covers it, and DynamoDB checks that condition on the write itself, so two requests arriving at once can’t overdraw an account.

Known limitations. The audit endpoint follows the simulation’s contract, which had no login for auditors, so this version has none either. A production version would require authentication on /audit, post only to an allow-list of report destinations, and leave full account details out of the report.

How I built it

I wrote the first version of the Lambda, the deploy workflows, the requirements, the database design and the API document myself, and tracked the work as 25 user stories with a weekly burndown. In the last part of the project I started working with Claude Code. With it, I found and fixed a bug where credit withdrawals failed because DynamoDB doesn’t allow arithmetic inside a condition. For the final changes I wrote a design spec and a plan first, then failing tests for the response contract, and changed the code until they passed.