A lightweight serverless payment logging service built with AWS Lambda.
It simulates payment processing, generates a transaction ID, and writes an audit log entry to CloudWatch Logs.
- Receives a payment request (simulated event input)
- Generates a unique transaction ID
- Logs the payment event for audit + traceability
- Returns a structured success response
Client/Test Event → AWS Lambda → CloudWatch Logs
This mirrors how fintech systems handle audit trails, debugging, and traceability.
During development I attempted to store transactions in DynamoDB, but faced repeated errors due to missing partition key values and table configuration mismatches.
✅ Fix/Alternative: I switched to CloudWatch Logs to capture payment audit logs reliably while keeping the system lightweight.
CloudWatch logging removed the need for:
- DynamoDB table setup
- region mismatch issues
- IAM permission complexity
- schema constraints
✅ Result: a working, clean audit trail system.
This approach supports:
- Audit logging
- Transaction traceability
- Operational monitoring
- Compliance-style logging (useful in fintech + regulated environments)
- AWS Lambda (Python)
- Amazon CloudWatch Logs
- Add API Gateway endpoint (REST)
- Add structured JSON logging
- Add error handling + retries
- Add metrics/alerts for failed transactions



