--- layout: "aws" page_title: "AWS: aws_lambda_function" sidebar_current: "docs-aws-resource-lambda-function" description: |- Provides a Lambda Function resource. Lambda allows you to trigger execution of code in response to events in AWS. The Lambda Function itself includes source code and runtime configuration. --- # aws\_lambda\_function Provides a Lambda Function resource. Lambda allows you to trigger execution of code in response to events in AWS. The Lambda Function itself includes source code and runtime configuration. For information about Lambda and how to use it, see [What is AWS Lambda?][1] ## Example Usage ``` resource "aws_iam_role" "iam_for_lambda" { name = "iam_for_lambda" assume_role_policy = <