Skip to content

pcpratheesh/terraform-lambda-deployment-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-lambda-deployment-sample

Sample code for configure a lambda function with terraform

Terraform

  • init Prepare your working directory for other commands
  • validate Check whether the configuration is valid
  • plan Show changes required by the current configuration
  • apply Create or update infrastructure
  • destroy Destroy previously-created infrastructure

This infra-structure will create a new lambda along with an api gateway connected.

Terraform will keep the state in an s3 bucket under a state.tfstate key. In order that to happen we need to set up three environment variables:

    $ export AWS_SECRET_ACCESS_KEY=...
    $ export AWS_ACCESS_KEY_ID=..
    $ export AWS_DEFAULT_REGION=...

Also you can configure the data inside variables.tf

Releases

No releases published

Packages

No packages published

Languages