"# AWS"
- lambda-sqs-cdk -> IaC demo
This repository contains AWS Infrastructure as Code (IaC) demos using AWS CDK with TypeScript.
- lambda-sqs-cdk/: Main CDK project for deploying a Lambda + SQS + API Gateway stack.
bin/: CDK app entrypoint.lib/: CDK stack definition (lambda-sqs-cdk-stack.ts).lambda/: Lambda function source code.api/: Lambda for API Gateway integration.consumer/: Lambda for SQS message consumption.
layer/axios-node/: Lambda layer for sharing theaxioslibrary.test/: Jest unit tests.cdk.json,tsconfig.json,package.json: Project configuration files.
- .github/workflows/: GitHub Actions CI/CD workflows for build and deploy.
- Node.js 20+
- AWS CLI configured (
aws configure) - AWS CDK (
npm install -g aws-cdk)
cd lambda-sqs-cdk
npm installnpm run buildnpx cdk bootstrap
npx cdk deploynpm run test- Automated deployment is configured via deploy.yml on pushes to
main.
- API Lambda (lambda/api/index.js): Receives HTTP requests and sends messages to SQS.
- Consumer Lambda (lambda/consumer/index.js): Processes messages from SQS and makes HTTP requests using
axiosfrom a shared Lambda layer.
See lambda-sqs-cdk/Architecture.png for a diagram of the deployed resources.