A simple three-tier serverless web application built with AWS CDK and TypeScript.
- Web Tier: API Gateway
- App Tier: AWS Lambda functions (Node.js 18)
- Database Tier: DynamoDB
This serverless architecture requires no VPC, no Docker builds, and no container orchestration.
lib/
components/
deployed-application.ts # Main application construct
subcomponents/
app-tier.ts # Lambda functions
web-tier.ts # API Gateway
database-tier.ts # DynamoDB table
app/
lambda-handler.js # Lambda function code
package.json # Lambda dependencies
npm install
npm run build
npx cdk deployAfter deployment, the API Gateway URL will be output to the console.
npm run buildcompile typescript to jsnpm run watchwatch for changes and compilenpx cdk deploydeploy this stack to your default AWS account/regionnpx cdk diffcompare deployed stack with current statenpx cdk synthemits the synthesized CloudFormation templatenpx cdk destroyremove all resources from AWS