- AWS_VPC(folder aws_vpc)
- API_GW/LAMBDA/s3 (folder apigw_lambda)
- LAMBDA CODE (folder app_code)
- terraform 0.13.6
- In my case, I use tfswitch is very helpfull for switch/install terraform versions
https://tfswitch.warrensbox.com/Install/
tfswitch 0.13.6
-
1 VPC - 4096 IPS
-
4 Subnets - 256 IPS
-
2 private ( private resources - nat-gw )
-
2 publics ( public resources - igw )
cd aws_vpc
vi terraform.tfvars
terraform init
terraform plan
terraform apply
./network_info.sh
Network Info! update this variables in ../apigw_lambda/terraform.tfvars
network_vpc_id = "vpc-0a2d2408224f0b3ec"
network_subnets_ids=["subnet-0f50d5ef4412e03b8","subnet-060ffdb5c13ec70fe"]
cd apigw_lambda
Edit terraform.tfvars (You need configure AWS_REGION,AWS_PROFILE,VPC_ID and Subnets_ID previously deployed)
aws_region = "us-east-1"
aws_profile = "zz"
network_vpc_id = "vpc-0a2d2408224f0b3ec"
network_subnets_ids = ["subnet-0f50d5ef4412e03b8", "subnet-060ffdb5c13ec70fe"]
terraform init
terraform plan
terraform apply
./app_test.sh
terraform refresh
curl -XGET $(terraform output url)/$(terraform output path)
cd app_code
- Docker
./build.sh zz us-east-1 app-code-lambda