Build a production-ready serverless API with AWS SAM, TypeScript, Lambda, DynamoDB, least-privilege IAM, CORS, and safe error handling.