Skip to content

code-templates/terraform-APIGateway-lambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Terraform-APIGateway-Lambda

A demo to set up APIGateway & Lambda by Terraform

Usage

Use this repo as template codebase

  • Fork this repo as a template or Clone Code:
git clone git@github.com:code-templates/terraform-APIGateway-lambda.git
  • Package the NodeJS code to zip:
cd terraform-APIGateway-lambda
cd lambda-code
zip example.zip main.js
  • Set up Lambda & API-gateway
cd ../terraform
export AWS_ACCESS_KEY_ID=xxxxx
export AWS_SECRET_ACCESS_KEY=xxxxx
terraform apply

Output