TypeScript Lambda handler deployment and API Gateway v2 public endpoint
- NodeJS 16
- Terraform
-
- Remove any existing Terraform binary (/usr/bin/terraform and/or /usr/local/bin/terraform)
-
- Install m1-terraform-provider-helper
- 2.1.
brew install kreuzwerker/taps/m1-terraform-provider-helper
-
- Install Terraform
- 3.1.
brew tap hashicorp/tap
- 3.2.
brew install hashicorp/tap/terraform
-
- Install the hashicorp/template version v2.2.0
- 4.1.
m1-terraform-provider-helper activate
- 4.2.
m1-terraform-provider-helper install hashicorp/template -v v2.2.0
➜ ~ terraform --version
Terraform v1.3.1
on darwin_arm64
+ provider registry.terraform.io/hashicorp/aws v4.33.0
+ provider registry.terraform.io/hashicorp/random v3.4.3
+ provider registry.terraform.io/hashicorp/template v2.2.0
- Change your Lambda function name
terraform/locals.tf
name = "{your app name}"
- Change your API Gateway info
terraform/apiGateway.tf
aws_route53_zone
aws_route53_zone
subaws_acm_certificate
: domain_name, subject_alternative_namesaws_apigatewayv2_domain_name
: domain_name
yarn tf:init
yarn tf:plan
yarn tf:apply
yarn destroy:all
-
yarn update:all
-
Check outputs