HelloworldAPI
The readme provides the instructions on creating the lambda handler and running the Terraform script to create your AWS infrastructure
Asssumptions:
- AWS cli is installed
- Terraform is installed
- Python3 is installed
Pre-requisites:
- run aws configure and create the aws profile
- S3 bucket is created to store the lambda deployment package
STEP 1. Creating the lambda deployment package
-
Zip the lambda function zip -g sayhello.zip lambda_function.py
-
Upload the zip file to S3 aws s3 cp sayhello.zip s3://
STEP 2. Running the Terrform scripts
-
initialise terrform terrform init
-
update the vars.tf with your account specific details
-
run the script to create the infrastructure. I would advice the creation of a peroperties file varfile.tfvars to override the property values. terraform apply -var-file="varfile.tfvars"