[{"data":1,"prerenderedAt":210},["ShallowReactive",2],{"content-guides-building-serverless-applications-with-terraform-05-api-gateway":3},{"markdown":4,"frontMatterAttributes":5,"bodyRaw":22,"contributorPaths":23,"menuType":28,"contentName":29,"slug":30,"readingTime":31,"menu":32,"nextDocItem":108,"previousDocItem":83},"\u003Cp>The ability to invoke a Lambda function through an HTTPS request opens up many integration opportunities. This chapter will illustrate creating a public RESTful API for a Lambda function using the Amazon API Gateway, as well as testing the API locally.\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"\u002Fassets\u002Fexternal\u002Fguides\u002Fbuilding-serverless-applications-with-terraform\u002Fassets\u002Fmodule5.png\" alt=\"\">\u003C\u002Fp>\n\u003Ch2>Setting up the Amazon API Gateway\u003C\u002Fh2>\n\u003Cp>The following snippet creates a regional REST API Gateway, defines a RESTful resource, sets access permissions, and integrates the resource with Lambda function. \u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-hcl\"># Create a REST API Gateway\nresource &quot;aws_api_gateway_rest_api&quot; &quot;greeting_api&quot; {\n  name        = &quot;greeting_api&quot;\n  description = &quot;API for invoking the Greeting Lambda Function&quot;\n  endpoint_configuration {\n    types = [&quot;REGIONAL&quot;]\n  }\n}\n\n# Create an API Resource\nresource &quot;aws_api_gateway_resource&quot; &quot;greet_resource&quot; {\n  rest_api_id = aws_api_gateway_rest_api.greeting_api.id\n  parent_id   = aws_api_gateway_rest_api.greeting_api.root_resource_id\n  path_part   = &quot;greet&quot;\n}\n\n# Create an API Method\nresource &quot;aws_api_gateway_method&quot; &quot;greet_method&quot; {\n  rest_api_id   = aws_api_gateway_rest_api.greeting_api.id\n  resource_id   = aws_api_gateway_resource.greet_resource.id\n  http_method   = &quot;POST&quot;\n  authorization = &quot;NONE&quot;\n}\n\n# Grant API Gateway permissions to invoke the Lambda function\nresource &quot;aws_lambda_permission&quot; &quot;allow_api_gateway&quot; {\n  statement_id  = &quot;AllowAPIGatewayInvoke&quot;\n  action        = &quot;lambda:InvokeFunction&quot;\n  function_name = aws_lambda_function.greeting_lambda.function_name\n  principal     = &quot;apigateway.amazonaws.com&quot;\n\n  # This will only allow a specific API resource and method to invoke the Lambda function. \n  # Otherwise any API Gateway in the account will be able to invoke the Lambda function. \n  # This is required for adhering to least privileged access principle\n  source_arn = &quot;${aws_api_gateway_rest_api.greeting_api.execution_arn}\u002F*\u002F${aws_api_gateway_method.greet_method.http_method}${aws_api_gateway_resource.greet_resource.path}&quot;\n}\n\n# Integrate API Gateway with the Lambda function\nresource &quot;aws_api_gateway_integration&quot; &quot;greet_lambda_integration&quot; {\n  rest_api_id = aws_api_gateway_rest_api.greeting_api.id\n  resource_id = aws_api_gateway_resource.greet_resource.id\n  http_method = aws_api_gateway_method.greet_method.http_method\n\n  integration_http_method = &quot;POST&quot;\n  type                    = &quot;AWS_PROXY&quot;\n  uri                     = aws_lambda_function.greeting_lambda.invoke_arn\n\n  depends_on = [aws_lambda_permission.allow_api_gateway]\n}\n\n# Create a new API Gateway deployment \nresource &quot;aws_api_gateway_deployment&quot; &quot;greeting_api_deployment&quot; {\n  rest_api_id = aws_api_gateway_rest_api.greeting_api.id\n  stage_name  = &quot;prod&quot;\n\n  triggers = {\n    redeployment = sha256(jsonencode(aws_api_gateway_rest_api.greeting_api.body))\n  }\n\n  lifecycle {\n    create_before_destroy = true\n  }\n  depends_on = [aws_api_gateway_method.greet_method]\n}\n\n# Output the API Gateway invocation endpoint\noutput &quot;greeting_api_endpoint&quot; {\n  value = &quot;${aws_api_gateway_deployment.greeting_api_deployment.invoke_url}\u002Fgreet&quot;\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Running \u003Ccode>terraform apply\u003C\u002Fcode> will deploy the updated application. \u003C\u002Fp>\n\u003Ch2>Testing the API locally with SAM\u003C\u002Fh2>\n\u003Cp>Run the following command from the directory where the \u003Ccode>main.tf\u003C\u002Fcode> file is located.\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-bash\">sam local start-api --hook-name terraform\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>This is what output will look like\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-text\">Mounting greeting_lambda at http:\u002F\u002F127.0.0.1:3000\u002Fgreet [POST]\nYou can now browse to the above endpoints to invoke your functions. \nYou do not need to restart\u002Freload SAM CLI while working on your \nfunctions, changes will be reflected instantly\u002Fautomatically. \nIf you used sam build before running local commands, you will need \nto re-run sam build for the changes to be picked up. You only need \nto restart SAM CLI if you update your AWS SAM template\n2023-10-06 18:35:33 WARNING: This is a development server. Do not \nuse it in a production deployment. Use a production WSGI server \ninstead.\n * Running on http:\u002F\u002F127.0.0.1:3000\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Use curl, Postman, or a similar tool to send requests to the local API endpoint. The API will call the local Lambda function instance which is instantiated by SAM in the local environment. To know more about how SAM makes it happen visit \u003Ca href=\"https:\u002F\u002Fdocs.aws.amazon.com\u002Fserverless-application-model\u002Flatest\u002Fdeveloperguide\u002Fusing-samcli-terraform.html\">this url\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-bash\">curl  -v http:\u002F\u002F127.0.0.1:3000\u002Fgreet \\\n      -H &#39;Content-Type:application\u002Fjson&#39; \\\n      -d &#39;{&quot;employeeId&quot;:&quot;johnsmith&quot;}&#39;\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch2>Deploying and testing the API in cloud environment\u003C\u002Fh2>\n\u003Cp>You can use Terraform outputs to print out the newly created API Gateway invocation endpoint. \u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-hcl\">output &quot;greeting_api_endpoint&quot; {\n  value = &quot;${aws_api_gateway_deployment.greeting_api_deployment.invoke_url}\u002Fgreet&quot;\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cpre>\u003Ccode class=\"language-bash\">Outputs:\n\ngreeting_api_endpoint = &quot;https:\u002F\u002F{api-id}.execute-api.{region}.amazonaws.com\u002Fprod\u002Fgreet&quot;\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Use curl, Postman, or similar tools to send requests to the API Gateway endpoint. \u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-bash\">curl -X POST \\\n     -H &#39;Content-Type: application\u002Fjson&#39; \\\n     -d &#39;{&quot;employeeId&quot;:&quot;johnsmith&quot;}&#39; \\\n     https:\u002F\u002F&lt;api-id&gt;.execute-api.&lt;region&gt;.amazonaws.com\u002Fprod\u002Fgreet\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Replace \u003Ccode>&lt;api-id&gt;\u003C\u002Fcode> and \u003Ccode>&lt;region&gt;\u003C\u002Fcode> with the values you got in the previous step.\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\u003Chr>\n\u003Ch2>Recap\u003C\u002Fh2>\n\u003Cp>In this chapter you&#39;ve learned how to:\u003C\u002Fp>\n\u003Col>\n\u003Cli>Create a RESTful API Gateway \u003C\u002Fli>\n\u003Cli>Define an API Gateway resource with a POST method\u003C\u002Fli>\n\u003Cli>Define access permission and integrate the API Gateway with a Lambda function\u003C\u002Fli>\n\u003Cli>Test the API locally\u003C\u002Fli>\n\u003Cli>Deploy and test the API in cloud\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Chr>\n\u003Ch2>Next Step\u003C\u002Fh2>\n\u003Cp>The next chapter will add scalability and resilience to the application architecture by introducing an SQS queue between API Gateway and Lambda function. Instead of sending requests to the Lambda function directly, the API Gateway will put messages to the queue instead, and Lambda function will process messages asynchronously by polling from the queue.\u003C\u002Fp>\n",{"title":6,"order":7,"authors":8,"resources":11},"5. API Gateway",5,[9,10],"Anton Aleksandrov","Debasis Rath",[12,16,19],{"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\u002Fapi_gateway_rest_api","aws_api_gateway_rest_api",{"link":20,"text":21,"type":15},"https:\u002F\u002Fdocs.aws.amazon.com\u002Fserverless-application-model\u002Flatest\u002Fdeveloperguide\u002Fterraform-support.html","AWS SAM Terraform support","The ability to invoke a Lambda function through an HTTPS request opens up many integration opportunities. This chapter will illustrate creating a public RESTful API for a Lambda function using the Amazon API Gateway, as well as testing the API locally.\n\n![](\u002Fassets\u002Fexternal\u002Fguides\u002Fbuilding-serverless-applications-with-terraform\u002Fassets\u002Fmodule5.png)\n\n## Setting up the Amazon API Gateway\n\nThe following snippet creates a regional REST API Gateway, defines a RESTful resource, sets access permissions, and integrates the resource with Lambda function. \n\n```hcl\n# Create a REST API Gateway\nresource \"aws_api_gateway_rest_api\" \"greeting_api\" {\n  name        = \"greeting_api\"\n  description = \"API for invoking the Greeting Lambda Function\"\n  endpoint_configuration {\n    types = [\"REGIONAL\"]\n  }\n}\n\n# Create an API Resource\nresource \"aws_api_gateway_resource\" \"greet_resource\" {\n  rest_api_id = aws_api_gateway_rest_api.greeting_api.id\n  parent_id   = aws_api_gateway_rest_api.greeting_api.root_resource_id\n  path_part   = \"greet\"\n}\n\n# Create an API Method\nresource \"aws_api_gateway_method\" \"greet_method\" {\n  rest_api_id   = aws_api_gateway_rest_api.greeting_api.id\n  resource_id   = aws_api_gateway_resource.greet_resource.id\n  http_method   = \"POST\"\n  authorization = \"NONE\"\n}\n\n# Grant API Gateway permissions to invoke the Lambda function\nresource \"aws_lambda_permission\" \"allow_api_gateway\" {\n  statement_id  = \"AllowAPIGatewayInvoke\"\n  action        = \"lambda:InvokeFunction\"\n  function_name = aws_lambda_function.greeting_lambda.function_name\n  principal     = \"apigateway.amazonaws.com\"\n\n  # This will only allow a specific API resource and method to invoke the Lambda function. \n  # Otherwise any API Gateway in the account will be able to invoke the Lambda function. \n  # This is required for adhering to least privileged access principle\n  source_arn = \"${aws_api_gateway_rest_api.greeting_api.execution_arn}\u002F*\u002F${aws_api_gateway_method.greet_method.http_method}${aws_api_gateway_resource.greet_resource.path}\"\n}\n\n# Integrate API Gateway with the Lambda function\nresource \"aws_api_gateway_integration\" \"greet_lambda_integration\" {\n  rest_api_id = aws_api_gateway_rest_api.greeting_api.id\n  resource_id = aws_api_gateway_resource.greet_resource.id\n  http_method = aws_api_gateway_method.greet_method.http_method\n\n  integration_http_method = \"POST\"\n  type                    = \"AWS_PROXY\"\n  uri                     = aws_lambda_function.greeting_lambda.invoke_arn\n\n  depends_on = [aws_lambda_permission.allow_api_gateway]\n}\n\n# Create a new API Gateway deployment \nresource \"aws_api_gateway_deployment\" \"greeting_api_deployment\" {\n  rest_api_id = aws_api_gateway_rest_api.greeting_api.id\n  stage_name  = \"prod\"\n\n  triggers = {\n    redeployment = sha256(jsonencode(aws_api_gateway_rest_api.greeting_api.body))\n  }\n\n  lifecycle {\n    create_before_destroy = true\n  }\n  depends_on = [aws_api_gateway_method.greet_method]\n}\n\n# Output the API Gateway invocation endpoint\noutput \"greeting_api_endpoint\" {\n  value = \"${aws_api_gateway_deployment.greeting_api_deployment.invoke_url}\u002Fgreet\"\n}\n```\n\nRunning `terraform apply` will deploy the updated application. \n\n## Testing the API locally with SAM\n\nRun the following command from the directory where the `main.tf` file is located.\n\n```bash\nsam local start-api --hook-name terraform\n```\n\nThis is what output will look like\n\n```text\nMounting greeting_lambda at http:\u002F\u002F127.0.0.1:3000\u002Fgreet [POST]\nYou can now browse to the above endpoints to invoke your functions. \nYou do not need to restart\u002Freload SAM CLI while working on your \nfunctions, changes will be reflected instantly\u002Fautomatically. \nIf you used sam build before running local commands, you will need \nto re-run sam build for the changes to be picked up. You only need \nto restart SAM CLI if you update your AWS SAM template\n2023-10-06 18:35:33 WARNING: This is a development server. Do not \nuse it in a production deployment. Use a production WSGI server \ninstead.\n * Running on http:\u002F\u002F127.0.0.1:3000\n```\n\nUse curl, Postman, or a similar tool to send requests to the local API endpoint. The API will call the local Lambda function instance which is instantiated by SAM in the local environment. To know more about how SAM makes it happen visit [this url](https:\u002F\u002Fdocs.aws.amazon.com\u002Fserverless-application-model\u002Flatest\u002Fdeveloperguide\u002Fusing-samcli-terraform.html).\n\n```bash\ncurl  -v http:\u002F\u002F127.0.0.1:3000\u002Fgreet \\\n      -H 'Content-Type:application\u002Fjson' \\\n      -d '{\"employeeId\":\"johnsmith\"}'\n```\n\n## Deploying and testing the API in cloud environment\n\nYou can use Terraform outputs to print out the newly created API Gateway invocation endpoint. \n\n```hcl\noutput \"greeting_api_endpoint\" {\n  value = \"${aws_api_gateway_deployment.greeting_api_deployment.invoke_url}\u002Fgreet\"\n}\n```\n\n```bash\nOutputs:\n\ngreeting_api_endpoint = \"https:\u002F\u002F{api-id}.execute-api.{region}.amazonaws.com\u002Fprod\u002Fgreet\"\n```\n\nUse curl, Postman, or similar tools to send requests to the API Gateway endpoint. \n\n```bash\ncurl -X POST \\\n     -H 'Content-Type: application\u002Fjson' \\\n     -d '{\"employeeId\":\"johnsmith\"}' \\\n     https:\u002F\u002F\u003Capi-id>.execute-api.\u003Cregion>.amazonaws.com\u002Fprod\u002Fgreet\n```\n\nReplace `\u003Capi-id>` and `\u003Cregion>` with the values you got in the previous step.\n\nYou will see a newly generated greeting card named `greeting-card-johnsmith.html` in the destination S3 bucket.  \n\n---\n\n## Recap\n\nIn this chapter you've learned how to:\n\n1. Create a RESTful API Gateway \n2. Define an API Gateway resource with a POST method\n3. Define access permission and integrate the API Gateway with a Lambda function\n4. Test the API locally\n5. Deploy and test the API in cloud \n\n---\n\n## Next Step\n\nThe next chapter will add scalability and resilience to the application architecture by introducing an SQS queue between API Gateway and Lambda function. Instead of sending requests to the Lambda function directly, the API Gateway will put messages to the queue instead, and Lambda function will process messages asynchronously by polling from the queue.\n",[24,25,26,27],"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\u002F05-api-gateway","4 min",[33],{"title":34,"content":35},"Guide",[36,54,70,83,100,108,123,145,161,176,194],{"title":37,"order":38,"authors":39,"resources":40,"time":31,"path":51,"id":52,"link":53},"1. Introduction",1,[9,10],[41,45,48],{"link":42,"text":43,"type":44},"https:\u002F\u002Faws.amazon.com\u002Fserverless\u002Fsam\u002F","AWS Serverless Application Model (SAM)","link",{"link":46,"text":47,"type":44},"https:\u002F\u002Faws.amazon.com\u002Fcdk\u002F","AWS Cloud Development Kit (CDK)",{"link":49,"text":50,"type":44},"https:\u002F\u002Fwww.terraform.io\u002F","Hashicorp Terraform","01-introduction","01-introduction.md","\u002Fcontent\u002Fguides\u002Fbuilding-serverless-applications-with-terraform\u002F01-introduction",{"title":55,"order":56,"authors":57,"resources":58,"time":66,"path":67,"id":68,"link":69},"2. Solution Overview",2,[9,10],[59,60,63],{"link":49,"text":50,"type":44},{"link":61,"text":62,"type":44},"https:\u002F\u002Fdocs.aws.amazon.com\u002Fcli\u002Flatest\u002Fuserguide\u002Fgetting-started-install.htm","AWS CLI",{"link":64,"text":65,"type":44},"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":71,"order":72,"authors":73,"resources":75,"time":31,"path":80,"id":81,"link":82},"3. S3 buckets",3,[9,10,74],"Matt Ridehalgh",[76,77],{"link":13,"text":14,"type":15},{"link":78,"text":79,"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":84,"order":85,"authors":86,"resources":87,"time":31,"path":97,"id":98,"link":99},"4. Lambda functions",4,[9,10],[88,89,92,93],{"link":13,"text":14,"type":15},{"link":90,"text":91,"type":15},"https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Faws\u002Flatest\u002Fdocs\u002Fresources\u002Flambda_function","aws_lambda_function",{"link":20,"text":21,"type":15},{"link":94,"text":95,"type":96},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fbuilding-serverless-applications-with-terraform\u002Fblob\u002Fmain\u002Flambdas\u002Fgreetings_lambda\u002Findex.mjs","index.mjs","Sample","04-lambda-functions","04-lambda-functions.md","\u002Fcontent\u002Fguides\u002Fbuilding-serverless-applications-with-terraform\u002F04-lambda-functions",{"title":6,"order":7,"authors":101,"resources":102,"time":31,"path":106,"id":107,"link":30},[9,10],[103,104,105],{"link":13,"text":14,"type":15},{"link":17,"text":18,"type":15},{"link":20,"text":21,"type":15},"05-api-gateway","05-api-gateway.md",{"title":109,"order":110,"authors":111,"resources":112,"time":31,"path":120,"id":121,"link":122},"6. Asynchronous processing",6,[9,10],[113,114,117],{"link":13,"text":14,"type":15},{"link":115,"text":116,"type":15},"https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Faws\u002Flatest\u002Fdocs\u002Fresources\u002Fsqs_queue","aws_sqs_queue",{"link":118,"text":119,"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":124,"order":125,"authors":126,"resources":127,"time":141,"path":142,"id":143,"link":144},"7. Observability",7,[9,10],[128,129,132,135,138],{"link":13,"text":14,"type":15},{"link":130,"text":131,"type":15},"https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Flambda-monitoring.html","Lambda function observability, monitoring, and troubleshooting",{"linke":133,"text":134,"type":15},"https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Frest-api-monitor.html","Monitoring API Gateway REST API",{"link":136,"text":137,"type":15},"https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Faws\u002Flatest\u002Fdocs\u002Fresources\u002Fapi_gateway_account","aws_api_gateway_account",{"link":139,"text":140,"type":15},"https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Faws\u002Flatest\u002Fdocs\u002Fresources\u002Fapi_gateway_stage","aws_api_gateway_stage","5 min","07-observability","07-observability.md","\u002Fcontent\u002Fguides\u002Fbuilding-serverless-applications-with-terraform\u002F07-observability",{"title":146,"order":147,"authors":148,"resources":149,"time":157,"path":158,"id":159,"link":160},"8. Modularizing your IaC projects",8,[9,10],[150,151,154],{"link":13,"text":14,"type":15},{"link":152,"text":153,"type":15},"https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform\u002Flanguage\u002Fmodules","Terraform Modules",{"link":155,"text":156,"type":96},"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":162,"order":163,"authors":164,"resources":165,"time":172,"path":173,"id":174,"link":175},"9. Summary and next steps",9,[9,10],[166,167,169,171],{"link":13,"text":14,"type":15},{"link":168,"text":50,"type":15},"https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform",{"link":42,"text":170,"type":15},"AWS SAM",{"link":155,"text":156,"type":96},"2 min","09-summary","09-summary.md","\u002Fcontent\u002Fguides\u002Fbuilding-serverless-applications-with-terraform\u002F09-summary",{"title":177,"order":178,"authors":179,"resources":181,"time":141,"path":191,"id":192,"link":193},"10. Appendix A - Amazon EventBridge",10,[9,10,180],"Luis Cerezo",[182,185,188],{"link":183,"text":184,"type":15},"https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Faws\u002Flatest\u002Fdocs\u002Fresources\u002Fcloudwatch_event_bus","aws_cloudwatch_event_bus Terraform resource",{"link":186,"text":187,"type":15},"https:\u002F\u002Fdocs.aws.amazon.com\u002Fhealth\u002Flatest\u002Fug\u002Fcloudwatch-events-health.html","Monitoring AWS Health events with Amazon EventBridge",{"link":189,"text":190,"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":195,"order":196,"authors":197,"resources":198,"time":31,"path":207,"id":208,"link":209},"10. Appendix B - AWS Step Functions",11,[9,10,180],[199,202,204],{"link":200,"text":201,"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":183,"text":203,"type":15},"cloudwatch_event_bus terraform resource",{"link":205,"text":206,"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",1792665264384]