Skip to content

Template repository for creating a TypeScript AWS Lambda with Terraform

License

Notifications You must be signed in to change notification settings

agendrix/terraform-aws-lambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

44be4f3 · Nov 20, 2020

History

9 Commits
Nov 20, 2020
Nov 10, 2020
Nov 20, 2020
Nov 20, 2020
Nov 20, 2020
Nov 20, 2020
Nov 10, 2020
Nov 20, 2020
Nov 10, 2020
Nov 20, 2020
Nov 20, 2020
Nov 10, 2020
Nov 20, 2020

Repository files navigation

Terraform AWS Lambda

Template repository for creating a TypeScript AWS lambda function with Terraform

Release Tests

How to use with Terraform

Add the module to your Terraform project:

module "terraform_aws_lambda" {
  source      = "git@github.com:agendrix/terraform-aws-lambda.git//terraform?ref=v0.2.0"
  lambda_name = "my-typescript-lambda"
  role_arn    = aws_iam_role.iam_for_lambda.role_arn
}

See Resource: aws_lambda_function for more information about the required aws_iam_role.

In order to be able to receive http requests to the lambda, you will need to hook it up with an AWS API Gateway. You can do so by following this guide: Serverless Applications with AWS Lambda and API Gateway.

After applying the terraform plan, a dummy lambda will be available in the AWS Lambda Console.

Deploying a new version of the lambda


Your AWS lambda should now be available at https://console.aws.amazon.com/lambda/.

Logs from the lambda will be available in AWS CloudWatch /aws/lambda/${yourLambdaName} log group.

About

Template repository for creating a TypeScript AWS Lambda with Terraform

Resources

License

Stars

Watchers

Forks

Packages

No packages published