Source: https://github.com/terraform-providers/terraform-provider-aws/tree/master/examples/lambda
This examples shows how to deploy an AWS Lambda function using Terraform only.
To run, configure your AWS provider as described in https://www.terraform.io/docs/providers/aws/index.html
Running the example
run terraform apply
to see it work.