[{"data":1,"prerenderedAt":211},["ShallowReactive",2],{"content-guides-building-serverless-applications-with-terraform-04-lambda-functions":3},{"markdown":4,"frontMatterAttributes":5,"bodyRaw":26,"contributorPaths":27,"menuType":32,"contentName":33,"slug":34,"readingTime":35,"menu":36,"nextDocItem":97,"previousDocItem":75},"\u003Cp>In the previous chapter you&#39;ve learned how to configure and use Terraform to create the source and destination S3 buckets. In this chapter you will learn to create AWS Lambda functions. The function illustrated in this chapter processes photos from the source bucket, generates greeting cards, and uploads them to the destination bucket. \u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"\u002Fassets\u002Fexternal\u002Fguides\u002Fbuilding-serverless-applications-with-terraform\u002Fassets\u002Fmodule4.png\" alt=\"\">\u003C\u002Fp>\n\u003Ch2>Creating IAM role and access policy\u003C\u002Fh2>\n\u003Cp>Lambda function requires an IAM execution role with relevant access permissions. Below snippet creates a role and assigns it a policy with permissions to read from the source bucket and write to the destination bucket.\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-hcl\"># Execution role\nresource &quot;aws_iam_role&quot; &quot;lambda_execution_role&quot; {\n  name = &quot;terraform-lambda-greetings-role&quot;\n\n  assume_role_policy = jsonencode({\n    Version = &quot;2012-10-17&quot;,\n    Statement = [\n      {\n        Action = &quot;sts:AssumeRole&quot;,\n        Principal = {\n          Service = &quot;lambda.amazonaws.com&quot;\n        },\n        Effect = &quot;Allow&quot;,\n        Sid    = &quot;&quot;\n      }\n    ]\n  })\n}\n\n# Access policy\nresource &quot;aws_iam_policy&quot; &quot;lambda_s3_access_policy&quot; {\n  name        = &quot;terraform-lambda-s3-access-policy&quot;\n  description = &quot;Grants access to source and destination buckets&quot;\n\n  policy = jsonencode({\n    Version = &quot;2012-10-17&quot;,\n    Statement = [\n      {\n        Action   = [&quot;s3:GetObject&quot;],\n        Effect   = &quot;Allow&quot;,\n        Resource = [\n          &quot;${aws_s3_bucket.src_bucket.arn}\u002F*&quot;\n        ]\n      },{\n        Action   = [&quot;s3:PutObject&quot;],\n        Effect   = &quot;Allow&quot;,\n        Resource = [\n          &quot;${aws_s3_bucket.dst_bucket.arn}\u002F*&quot;\n        ]\n      }\n    ]\n  })\n}\n\n# Attaches the policy to the role\nresource &quot;aws_iam_role_policy_attachment&quot; &quot;s3_full_access_attachment&quot; {\n  policy_arn = aws_iam_policy.lambda_s3_access_policy.arn\n  role       = aws_iam_role.lambda_execution_role.name\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch2>Creating a Lambda Function\u003C\u002Fh2>\n\u003Cp>Find the \u003Ccode>index.mjs\u003C\u002Fcode> file under Extra Resources on this page. It contains the sample source code of a Lambda function that retrieves an image from the source bucket, creates an HTML greeting card, and uploads it to the destination bucket. \u003C\u002Fp>\n\u003Cp>Terraform provides the \u003Ccode>archive_file\u003C\u002Fcode> data type which can be used to package \u003Ccode>index.mjs\u003C\u002Fcode> into a ZIP file. This ensures that Lambda functions consistently receive the latest code version, reducing manual steps and promoting reliable, automated updates. \u003C\u002Fp>\n\u003Cp>The code snippet below builds a ZIP archive, and uses it for creating a Lambda function. Note that two environment variables that contain references to source and destination bucket names are defined for the function. Those environment variables are used in the function code. The \u003Ccode>source_code_hash\u003C\u002Fcode> property ensures that the Lambda function resource is updated with the latest code version whenever any code changes are detected. \u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-hcl\"># Create a zip file with function code\ndata &quot;archive_file&quot; &quot;lambda_zip&quot; {\n  type        = &quot;zip&quot;\n  source_file = &quot;index.mjs&quot;\n  output_path = &quot;lambda.zip&quot;\n}\n\n# Create a Lambda function\nresource &quot;aws_lambda_function&quot; &quot;greeting_lambda&quot; {\n  function_name = &quot;greetings-lambda-function&quot;\n\n  handler     = &quot;index.handler&quot;\n  runtime     = &quot;nodejs18.x&quot;\n  memory_size = 256\n  role        = aws_iam_role.lambda_execution_role.arn\n\n  environment {\n    variables = {\n      SRC_BUCKET = aws_s3_bucket.src_bucket.id,\n      DST_BUCKET = aws_s3_bucket.dst_bucket.id\n    }\n  }\n\n  filename         = data.archive_file.lambda_zip.output_path\n  source_code_hash = data.archive_file.lambda_zip.output_base64sha256\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Run \u003Ccode>terraform apply\u003C\u002Fcode> to deploy the updated application. Running \u003Ccode>terraform plan\u003C\u002Fcode> before \u003Ccode>terraform apply\u003C\u002Fcode> is a recommended best practice to preview the changes Terraform will make based on your updated configurations. \u003C\u002Fp>\n\u003Cblockquote>\n\u003Cp>The updated configuration uses the new \u003Ccode>archive_file\u003C\u002Fcode> data type, you might be asked to run \u003Ccode>terraform init --upgrade\u003C\u002Fcode> to install the required dependencies. \u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Ch2>Testing the Lambda function locally using SAM\u003C\u002Fh2>\n\u003Cp>A common practice during development is to test the code functionality locally. Developers commonly test their code locally before transitioning to a live cloud environment. While Terraform excels in infrastructure setup, it does not natively provide support for testing Lambda functions locally. \u003Ca href=\"https:\u002F\u002Faws.amazon.com\u002Fserverless\u002Fsam\u002F\">AWS SAM\u003C\u002Fa> is a unique tool to test your Lambda function locally, ensuring everything runs smoothly before deploying to the cloud. This \u003Ca href=\"https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fcompute\u002Fbetter-together-aws-sam-cli-and-hashicorp-terraform\u002F\">blog\u003C\u002Fa> talks in detail about testing your Lambda function locally when using Terraform for IaC. \u003C\u002Fp>\n\u003Cp>Ensure that your SAM CLI is up-to-date with the latest version. Create an \u003Ccode>event.json\u003C\u002Fcode> file with below JSON\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-json\">{\n  &quot;body&quot;: &quot;{\\&quot;employeeId\\&quot;: \\&quot;johnsmith\\&quot;}&quot;\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Run the below command:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-bash\">sam local invoke \\\n  --hook-name terraform \\\n  greeting_lambda \\\n  -e event.json\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Output:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-json\">{\n  &quot;statusCode&quot;: 200, \n  &quot;body&quot;: &quot;{\\&quot;message\\&quot;:\\&quot;Processed successfully\\&quot;}&quot;\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch2>Invoking the Lambda function running on AWS using the AWS CLI\u003C\u002Fh2>\n\u003Cp>The following snippet demonstrates how to use AWS CLI to invoke the Lambda function. It uses the same \u003Ccode>event.json\u003C\u002Fcode> file created in the previous section. \u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-bash\">aws lambda invoke \\\n  --function-name greeting_lambda \\\n  --cli-binary-format raw-in-base64-out  \\\n  --payload file:\u002F\u002Fevent.json \\\n  output.txt\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>This will invoke the Lambda function and store the result in \u003Ccode>output.txt\u003C\u002Fcode>. \u003C\u002Fp>\n\u003Cp>You will see a newly generated greeting card named \u003Ccode>greeting-card-johnsmith.html\u003C\u002Fcode> in the destination S3 bucket.  \u003C\u002Fp>\n\u003Cp>You can use SAM to browse the CloudWatch logs generated during function invocation\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-bash\">sam logs --cw-log-group \u002Faws\u002Flambda\u002Fgreeting_lambda\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch2>Recap\u003C\u002Fh2>\n\u003Cp>In this chapter you&#39;ve learned how to:\u003C\u002Fp>\n\u003Col>\n\u003Cli>Create a Lambda function execution role and assign access policies\u003C\u002Fli>\n\u003Cli>Create a Lambda function\u003C\u002Fli>\n\u003Cli>Test your function locally\u003C\u002Fli>\n\u003Cli>Invoke Lambda function in the cloud using the AWS CLI.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Ch2>Next step\u003C\u002Fh2>\n\u003Cp>In the next chapter you will learn how to set up an API Gateway to expose your Lambda function, allowing external clients to invoke your function via a public API.\u003C\u002Fp>\n",{"title":6,"order":7,"authors":8,"resources":11},"4. Lambda functions",4,[9,10],"Anton Aleksandrov","Debasis Rath",[12,16,19,22],{"link":13,"text":14,"type":15},"https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Faws\u002Flatest\u002Fdocs","AWS Terraform Provider","Documentation",{"link":17,"text":18,"type":15},"https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Faws\u002Flatest\u002Fdocs\u002Fresources\u002Flambda_function","aws_lambda_function",{"link":20,"text":21,"type":15},"https:\u002F\u002Fdocs.aws.amazon.com\u002Fserverless-application-model\u002Flatest\u002Fdeveloperguide\u002Fterraform-support.html","AWS SAM Terraform support",{"link":23,"text":24,"type":25},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fbuilding-serverless-applications-with-terraform\u002Fblob\u002Fmain\u002Flambdas\u002Fgreetings_lambda\u002Findex.mjs","index.mjs","Sample","In the previous chapter you've learned how to configure and use Terraform to create the source and destination S3 buckets. In this chapter you will learn to create AWS Lambda functions. The function illustrated in this chapter processes photos from the source bucket, generates greeting cards, and uploads them to the destination bucket. \n\n![](\u002Fassets\u002Fexternal\u002Fguides\u002Fbuilding-serverless-applications-with-terraform\u002Fassets\u002Fmodule4.png)\n\n## Creating IAM role and access policy\n\nLambda function requires an IAM execution role with relevant access permissions. Below snippet creates a role and assigns it a policy with permissions to read from the source bucket and write to the destination bucket.\n\n```hcl\n# Execution role\nresource \"aws_iam_role\" \"lambda_execution_role\" {\n  name = \"terraform-lambda-greetings-role\"\n\n  assume_role_policy = jsonencode({\n    Version = \"2012-10-17\",\n    Statement = [\n      {\n        Action = \"sts:AssumeRole\",\n        Principal = {\n          Service = \"lambda.amazonaws.com\"\n        },\n        Effect = \"Allow\",\n        Sid    = \"\"\n      }\n    ]\n  })\n}\n\n# Access policy\nresource \"aws_iam_policy\" \"lambda_s3_access_policy\" {\n  name        = \"terraform-lambda-s3-access-policy\"\n  description = \"Grants access to source and destination buckets\"\n\n  policy = jsonencode({\n    Version = \"2012-10-17\",\n    Statement = [\n      {\n        Action   = [\"s3:GetObject\"],\n        Effect   = \"Allow\",\n        Resource = [\n          \"${aws_s3_bucket.src_bucket.arn}\u002F*\"\n        ]\n      },{\n        Action   = [\"s3:PutObject\"],\n        Effect   = \"Allow\",\n        Resource = [\n          \"${aws_s3_bucket.dst_bucket.arn}\u002F*\"\n        ]\n      }\n    ]\n  })\n}\n\n# Attaches the policy to the role\nresource \"aws_iam_role_policy_attachment\" \"s3_full_access_attachment\" {\n  policy_arn = aws_iam_policy.lambda_s3_access_policy.arn\n  role       = aws_iam_role.lambda_execution_role.name\n}\n```\n\n## Creating a Lambda Function\n\nFind the `index.mjs` file under Extra Resources on this page. It contains the sample source code of a Lambda function that retrieves an image from the source bucket, creates an HTML greeting card, and uploads it to the destination bucket. \n\nTerraform provides the `archive_file` data type which can be used to package `index.mjs` into a ZIP file. This ensures that Lambda functions consistently receive the latest code version, reducing manual steps and promoting reliable, automated updates. \n\nThe code snippet below builds a ZIP archive, and uses it for creating a Lambda function. Note that two environment variables that contain references to source and destination bucket names are defined for the function. Those environment variables are used in the function code. The `source_code_hash` property ensures that the Lambda function resource is updated with the latest code version whenever any code changes are detected. \n\n```hcl\n# Create a zip file with function code\ndata \"archive_file\" \"lambda_zip\" {\n  type        = \"zip\"\n  source_file = \"index.mjs\"\n  output_path = \"lambda.zip\"\n}\n\n# Create a Lambda function\nresource \"aws_lambda_function\" \"greeting_lambda\" {\n  function_name = \"greetings-lambda-function\"\n\n  handler     = \"index.handler\"\n  runtime     = \"nodejs18.x\"\n  memory_size = 256\n  role        = aws_iam_role.lambda_execution_role.arn\n\n  environment {\n    variables = {\n      SRC_BUCKET = aws_s3_bucket.src_bucket.id,\n      DST_BUCKET = aws_s3_bucket.dst_bucket.id\n    }\n  }\n\n  filename         = data.archive_file.lambda_zip.output_path\n  source_code_hash = data.archive_file.lambda_zip.output_base64sha256\n}\n```\n\nRun `terraform apply` to deploy the updated application. Running `terraform plan` before `terraform apply` is a recommended best practice to preview the changes Terraform will make based on your updated configurations. \n\n> The updated configuration uses the new `archive_file` data type, you might be asked to run `terraform init --upgrade` to install the required dependencies. \n\n## Testing the Lambda function locally using SAM \n\nA common practice during development is to test the code functionality locally. Developers commonly test their code locally before transitioning to a live cloud environment. While Terraform excels in infrastructure setup, it does not natively provide support for testing Lambda functions locally. [AWS SAM](https:\u002F\u002Faws.amazon.com\u002Fserverless\u002Fsam\u002F) is a unique tool to test your Lambda function locally, ensuring everything runs smoothly before deploying to the cloud. This [blog](https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fcompute\u002Fbetter-together-aws-sam-cli-and-hashicorp-terraform\u002F) talks in detail about testing your Lambda function locally when using Terraform for IaC. \n\nEnsure that your SAM CLI is up-to-date with the latest version. Create an `event.json` file with below JSON\n\n```json\n{\n  \"body\": \"{\\\"employeeId\\\": \\\"johnsmith\\\"}\"\n}\n```\n\nRun the below command:\n\n```bash\nsam local invoke \\\n  --hook-name terraform \\\n  greeting_lambda \\\n  -e event.json\n```\n\nOutput:\n\n```json\n{\n  \"statusCode\": 200, \n  \"body\": \"{\\\"message\\\":\\\"Processed successfully\\\"}\"\n}\n```\n\n## Invoking the Lambda function running on AWS using the AWS CLI\n\nThe following snippet demonstrates how to use AWS CLI to invoke the Lambda function. It uses the same `event.json` file created in the previous section. \n\n```bash\naws lambda invoke \\\n  --function-name greeting_lambda \\\n  --cli-binary-format raw-in-base64-out  \\\n  --payload file:\u002F\u002Fevent.json \\\n  output.txt\n```\n\nThis will invoke the Lambda function and store the result in `output.txt`. \n\nYou will see a newly generated greeting card named `greeting-card-johnsmith.html` in the destination S3 bucket.  \n\nYou can use SAM to browse the CloudWatch logs generated during function invocation\n\n```bash\nsam logs --cw-log-group \u002Faws\u002Flambda\u002Fgreeting_lambda\n```\n\n## Recap\n\nIn this chapter you've learned how to:\n\n1. Create a Lambda function execution role and assign access policies\n2. Create a Lambda function\n3. Test your function locally\n4. Invoke Lambda function in the cloud using the AWS CLI.\n\n## Next step\n\nIn the next chapter you will learn how to set up an API Gateway to expose your Lambda function, allowing external clients to invoke your function via a public API.\n",[28,29,30,31],"content\u002Fcontributors\u002Fanton-aleksandrov.json","content\u002Fcontributors\u002Fdebasis-rath.json","content\u002Fcontributors\u002Fmatt-ridehalgh.json","content\u002Fcontributors\u002Fluis-cerezo.json","LIST","Building Serverless Applications with Terraform","\u002Fcontent\u002Fguides\u002Fbuilding-serverless-applications-with-terraform\u002F04-lambda-functions","5 min",[37],{"title":38,"content":39},"Guide",[40,59,75,88,97,110,125,146,162,177,195],{"title":41,"order":42,"authors":43,"resources":44,"time":55,"path":56,"id":57,"link":58},"1. Introduction",1,[9,10],[45,49,52],{"link":46,"text":47,"type":48},"https:\u002F\u002Faws.amazon.com\u002Fserverless\u002Fsam\u002F","AWS Serverless Application Model (SAM)","link",{"link":50,"text":51,"type":48},"https:\u002F\u002Faws.amazon.com\u002Fcdk\u002F","AWS Cloud Development Kit (CDK)",{"link":53,"text":54,"type":48},"https:\u002F\u002Fwww.terraform.io\u002F","Hashicorp Terraform","4 min","01-introduction","01-introduction.md","\u002Fcontent\u002Fguides\u002Fbuilding-serverless-applications-with-terraform\u002F01-introduction",{"title":60,"order":61,"authors":62,"resources":63,"time":71,"path":72,"id":73,"link":74},"2. Solution Overview",2,[9,10],[64,65,68],{"link":53,"text":54,"type":48},{"link":66,"text":67,"type":48},"https:\u002F\u002Fdocs.aws.amazon.com\u002Fcli\u002Flatest\u002Fuserguide\u002Fgetting-started-install.htm","AWS CLI",{"link":69,"text":70,"type":48},"https:\u002F\u002Fdocs.aws.amazon.com\u002Fiam\u002F","AWS IAM","3 min","02-solution-overview","02-solution-overview.md","\u002Fcontent\u002Fguides\u002Fbuilding-serverless-applications-with-terraform\u002F02-solution-overview",{"title":76,"order":77,"authors":78,"resources":80,"time":55,"path":85,"id":86,"link":87},"3. S3 buckets",3,[9,10,79],"Matt Ridehalgh",[81,82],{"link":13,"text":14,"type":15},{"link":83,"text":84,"type":15},"https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Faws\u002Flatest\u002Fdocs\u002Fresources\u002Fs3_bucket","aws_s3_bucket","03-s3-buckets","03-s3-buckets.md","\u002Fcontent\u002Fguides\u002Fbuilding-serverless-applications-with-terraform\u002F03-s3-buckets",{"title":6,"order":7,"authors":89,"resources":90,"time":55,"path":95,"id":96,"link":34},[9,10],[91,92,93,94],{"link":13,"text":14,"type":15},{"link":17,"text":18,"type":15},{"link":20,"text":21,"type":15},{"link":23,"text":24,"type":25},"04-lambda-functions","04-lambda-functions.md",{"title":98,"order":99,"authors":100,"resources":101,"time":55,"path":107,"id":108,"link":109},"5. API Gateway",5,[9,10],[102,103,106],{"link":13,"text":14,"type":15},{"link":104,"text":105,"type":15},"https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Faws\u002Flatest\u002Fdocs\u002Fresources\u002Fapi_gateway_rest_api","aws_api_gateway_rest_api",{"link":20,"text":21,"type":15},"05-api-gateway","05-api-gateway.md","\u002Fcontent\u002Fguides\u002Fbuilding-serverless-applications-with-terraform\u002F05-api-gateway",{"title":111,"order":112,"authors":113,"resources":114,"time":55,"path":122,"id":123,"link":124},"6. Asynchronous processing",6,[9,10],[115,116,119],{"link":13,"text":14,"type":15},{"link":117,"text":118,"type":15},"https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Faws\u002Flatest\u002Fdocs\u002Fresources\u002Fsqs_queue","aws_sqs_queue",{"link":120,"text":121,"type":15},"https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Faws\u002Flatest\u002Fdocs\u002Fresources\u002Flambda_event_source_mapping","aws_lambda_event_source_mapping","06-async-processing","06-async-processing.md","\u002Fcontent\u002Fguides\u002Fbuilding-serverless-applications-with-terraform\u002F06-async-processing",{"title":126,"order":127,"authors":128,"resources":129,"time":35,"path":143,"id":144,"link":145},"7. Observability",7,[9,10],[130,131,134,137,140],{"link":13,"text":14,"type":15},{"link":132,"text":133,"type":15},"https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Flambda-monitoring.html","Lambda function observability, monitoring, and troubleshooting",{"linke":135,"text":136,"type":15},"https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Frest-api-monitor.html","Monitoring API Gateway REST API",{"link":138,"text":139,"type":15},"https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Faws\u002Flatest\u002Fdocs\u002Fresources\u002Fapi_gateway_account","aws_api_gateway_account",{"link":141,"text":142,"type":15},"https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Faws\u002Flatest\u002Fdocs\u002Fresources\u002Fapi_gateway_stage","aws_api_gateway_stage","07-observability","07-observability.md","\u002Fcontent\u002Fguides\u002Fbuilding-serverless-applications-with-terraform\u002F07-observability",{"title":147,"order":148,"authors":149,"resources":150,"time":158,"path":159,"id":160,"link":161},"8. Modularizing your IaC projects",8,[9,10],[151,152,155],{"link":13,"text":14,"type":15},{"link":153,"text":154,"type":15},"https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform\u002Flanguage\u002Fmodules","Terraform Modules",{"link":156,"text":157,"type":25},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fbuilding-serverless-applications-with-terraform","Sample project source code","8 min","08-modularizing-your-iac-projects","08-modularizing-your-iac-projects.md","\u002Fcontent\u002Fguides\u002Fbuilding-serverless-applications-with-terraform\u002F08-modularizing-your-iac-projects",{"title":163,"order":164,"authors":165,"resources":166,"time":173,"path":174,"id":175,"link":176},"9. Summary and next steps",9,[9,10],[167,168,170,172],{"link":13,"text":14,"type":15},{"link":169,"text":54,"type":15},"https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform",{"link":46,"text":171,"type":15},"AWS SAM",{"link":156,"text":157,"type":25},"2 min","09-summary","09-summary.md","\u002Fcontent\u002Fguides\u002Fbuilding-serverless-applications-with-terraform\u002F09-summary",{"title":178,"order":179,"authors":180,"resources":182,"time":35,"path":192,"id":193,"link":194},"10. Appendix A - Amazon EventBridge",10,[9,10,181],"Luis Cerezo",[183,186,189],{"link":184,"text":185,"type":15},"https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Faws\u002Flatest\u002Fdocs\u002Fresources\u002Fcloudwatch_event_bus","aws_cloudwatch_event_bus Terraform resource",{"link":187,"text":188,"type":15},"https:\u002F\u002Fdocs.aws.amazon.com\u002Fhealth\u002Flatest\u002Fug\u002Fcloudwatch-events-health.html","Monitoring AWS Health events with Amazon EventBridge",{"link":190,"text":191,"type":15},"https:\u002F\u002Fdocs.aws.amazon.com\u002Fhealth\u002Flatest\u002Fug\u002Faws-health-planned-lifecycle-events.html#planned-lifecycle-event-notifications","Planned lifecycle events for AWS Health - What should I expect when I receive a planned lifecycle event notification?","10-appendix-A-EventBridge","10-appendix-A-EventBridge.md","\u002Fcontent\u002Fguides\u002Fbuilding-serverless-applications-with-terraform\u002F10-appendix-A-EventBridge",{"title":196,"order":197,"authors":198,"resources":199,"time":55,"path":208,"id":209,"link":210},"10. Appendix B - AWS Step Functions",11,[9,10,181],[200,203,205],{"link":201,"text":202,"type":15},"https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fdevops\u002Fbest-practices-for-writing-step-functions-terraform-projects\u002F","Best Practices for Writing Step Functions Terraform Projects",{"link":184,"text":204,"type":15},"cloudwatch_event_bus terraform resource",{"link":206,"text":207,"type":15},"https:\u002F\u002Fdocs.aws.amazon.com\u002Fstep-functions\u002Flatest\u002Fdg\u002Fconcepts-amazon-states-language.html","Amazon States Language","10-appendix-B-SFN","10-appendix-B-SFN.md","\u002Fcontent\u002Fguides\u002Fbuilding-serverless-applications-with-terraform\u002F10-appendix-B-SFN",1792578865569]