Parse, Build and Generate Terraform code for deploying AWS Lambda functions using Easy Lamb Terraform module.
- Parse a directory containing AWS Lambda functions written in TypeScript.
- Build Terraform code for deploying AWS Lambda functions.
- Generate Terraform code for deploying AWS Lambda functions.
npm install -g easy-lamb-ts
Create an easy-lamb.json
file with your configuration at the root of your project:
{
"lambdaDir": "src/handlers",
"terraformDir": "devops/terraform",
"terraformFilename": "functions.tfvars",
"buildOutput": "bin",
"defaultParams": {
"memory": "128",
"timeout": "30",
"runtime": "nodejs22.x",
"authorizer": "cognito-authorizer",
"override_env": "true"
},
"dotenvLocation": ".env"
}
Run the following commands:
# Create a functions.tfvars file
easy-lamb-ts parse
# Build your TypeScript functions and create functions.tfvars file
easy-lamb-ts build