Skip to content

juliandecoss/whatsapp-webhook-golang

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CREATE AWS LAMBDA (GOLANG) USING TERRAFORM

Requirements

  1. AWS Cli installed and login to AWS account
  2. Terraform installed

How ?

  1. Go to scripts folder
  2. Create bucket using this command, Please type unique name for bucket
./1_create_s3_bucket.sh
  1. Build, zip, and upload code to S3 using this command. You can take a look code inside lambda-go folder. Script will ask you to type version, just type e.g. "1.0.0"
./2_build_zip_upload.sh
  1. Create lambda and api gateway using this command. Script will ask you type for version, pleaset type version you create in step number 2 "1.0.0"
./3_terraform_apply_auto_version.sh
  1. Access your code in terraform output, base_url

Updating Code

  1. Go to scripts folder
  2. Update main.go inside lambda-go folder line 17 "Hello" to "Hello Ludes"
message := fmt.Sprintf(" { \"Message\" : \"Hello %s \" } ", name)
  1. Build, zip, and upload code to S3 using this command. You can take a look code inside lambda-go folder. Script will ask you to type version, you can change your version with another tag e.g. "1.0.1"
./2_build_zip_upload.sh
  1. Create lambda and api gateway using this command. Script will ask you type for version, pleaset type version you create in step number 2 "1.0.1"
./3_terraform_apply_auto_version.sh
  1. Access your code in terraform output, base_url

Delete Everything

  1. Go to scripts folder
  2. To delete s3 type command below
./delete_s3_bucket.sh
  1. To delete lambda + api gateway type command below
./terraform_destroy_auto_version.sh

About

Create AWS Lambda (Golang) via Terraform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 75.5%
  • HCL 18.5%
  • Shell 4.4%
  • Makefile 1.6%