- Node.js v20 or newer
- AWS CDK v2
- AWS Cli
- npm (for package management)
- AWS Lambda functions (Node.js, TypeScript)
- API Gateway (REST API)
- DynamoDB for caching, history, db
- Swagger/OpenAPI documentation
-
Clone the repository
git clone https://github.com/your-username/backend-nodejs-aws-challenge.git cd backend-nodejs-aws-challenge -
Install dependencies
npm install
-
Set up AWS credentials
- Configure your AWS CLI
aws configureor set environment variables:
export AWS_ACCESS_KEY_ID=your-access-key export AWS_SECRET_ACCESS_KEY=your-secret-key export AWS_DEFAULT_REGION=us-east-1 - Configure your AWS CLI
-
Deploy the stack
npx cdk deploy --all
-
Access the API documentation
- Swagger UI is deployed at:
https://vs2vtevevj.execute-api.us-east-1.amazonaws.com
- Swagger UI is deployed at:
-
Test the API
- Use Swagger UI or tools like Postman/curl to interact with endpoints.
bin/— CDK app entry pointsrc/— Lambda source code and routesapp/- Application logic, queries, and service integrations (e.g., data fetching, business logic)packages/- Shared utilities, helpers, and custom hooks used across the projectroutes/- API route definitions and request/response schemas
stack/— CDK stack definitions
- Synthesize CloudFormation template:
npx cdk synth
- Destroy the stack:
npx cdk destroy --all