[{"data":1,"prerenderedAt":212},["ShallowReactive",2],{"content-guides-building-serverless-applications-with-terraform-07-observability":3},{"markdown":4,"frontMatterAttributes":5,"bodyRaw":28,"contributorPaths":29,"menuType":34,"contentName":35,"slug":36,"readingTime":37,"menu":38,"nextDocItem":147,"previousDocItem":122},"\u003Cp>In this chapter you will learn about adding observability capabilities to your serverless applications using Terraform and IaC. Observability is a vital trait of any cloud application, as it provides insights into system behavior and interactions, aiding in issue detection and performance optimization. It is common to name Logging, Traces, and Metrics as three pillars of observability. \u003C\u002Fp>\n\u003Cp>Another crucial aspect of observability is tagging. Tags assist in organizing resources, enable precise cost tracking, and when used with a Configuration Management Database (CMDB), help manage assets and ensure compliance. In a cloud environment, where resources and configurations are dynamic, a structured observability approach, supported by effective tagging, is essential for operational efficiency and cost management.\u003C\u002Fp>\n\u003Ch2>Lambda and CloudWatch Logs\u003C\u002Fh2>\n\u003Cp>AWS Lambda natively integrates with CloudWatch Logs, pushing all logs from your code to a CloudWatch Logs group. Make sure that the execution role you assign to your functions have permissions to create log groups and write log events to CloudWatch Logs:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-hcl\">resource &quot;aws_iam_policy&quot; &quot;lambda_cloudwatch_policy&quot; {\n  name        = &quot;LambdaCloudWatchPolicy&quot;\n  description = &quot;Allows Lambda to write logs to CloudWatch.&quot;\n\n  policy = jsonencode({\n    Version = &quot;2012-10-17&quot;,\n    Statement = [\n      {\n        Action   = [&quot;logs:CreateLogGroup&quot;, &quot;logs:CreateLogStream&quot;, &quot;logs:PutLogEvents&quot;],\n        Effect   = &quot;Allow&quot;,\n        Resource = &quot;arn:aws:logs:{region}:{account-id}:log-group:{log-group-name}&quot; \n      }\n    ]\n  })\n}\n\nresource &quot;aws_iam_role_policy_attachment&quot; &quot;lambda_cloudwatch_attach&quot; {\n  policy_arn = aws_iam_policy.lambda_cloudwatch_policy.arn\n  role       = aws_iam_role.lambda_execution_role.name\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Once you grant the permissions, the Lambda service will automatically create and update the Log Groups and streams for you. \u003C\u002Fp>\n\u003Ch2>API Gateway and CloudWatch Logs\u003C\u002Fh2>\n\u003Cp>API Gateway supports two types of logging - execution and access. With execution logging, API Gateway will create and manage the log group for you. You will need to configure the API Gateway with an execution role that has the required permissions. \u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-hcl\">resource &quot;aws_api_gateway_account&quot; &quot;api_gateway_account&quot; {\n  cloudwatch_role_arn = aws_iam_role.cloudwatch.arn\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>See \u003Ca href=\"https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Faws\u002Flatest\u002Fdocs\u002Fresources\u002Fapi_gateway_account\">aws_api_gateway_account\u003C\u002Fa> for a full example. \u003C\u002Fp>\n\u003Cp>In order to enable access logging for API Gateway, you need to create a CloudWatch Log Group, ensure the IAM role used by the API Gateway has permissions to publish logs, and enable the access logs for the API Gateway:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-hcl\"># Create a CloudWatch Logs Group\nresource &quot;aws_cloudwatch_log_group&quot; &quot;api_gateway_log_group&quot; {\n  name = &quot;\u002Faws\u002Fapi-gateway\u002Fgreeting_api&quot;\n}\n\n# Create an access policy for API Gateway to send execution logs to CloudWatch Logs Group\nresource &quot;aws_iam_role_policy&quot; &quot;api_gateway_cloudwatch_logs&quot; {\n  name   = &quot;ApiGatewayCloudWatchLogs&quot;\n  role   = aws_iam_role.api_gateway_execution_role.name\n  \n  policy = jsonencode({\n    Version = &quot;2012-10-17&quot;,\n    Statement = [\n      {\n        Action   = [&quot;logs:PutLogEvents&quot;, &quot;logs:CreateLogStream&quot;],\n        Effect   = &quot;Allow&quot;,\n        Resource = aws_cloudwatch_log_group.api_gateway_log_group.arn\n      }\n    ]\n  })\n}\n\n# Enable access logs in your API Gateway\nresource &quot;aws_api_gateway_stage&quot; &quot;api_gateway_stage&quot; {\n  # ... (other configurations)\n\n  access_log_settings {\n    destination_arn = aws_cloudwatch_log_group.api_gateway_log_group.arn\n    format          = &quot;[$context.requestId] ($context.identity.sourceIp) \\&quot;$context.httpMethod $context.routeKey $context.protocol\\&quot; $context.status $context.responseLength $context.requestTime&quot;\n  }\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch2>Distributed Tracing with AWS X-Ray\u003C\u002Fh2>\n\u003Cp>AWS X-Ray offers a tracing perspective into the performance of your applications. It pinpoints how well your applications are operating and helps to identify bottlenecks. When following a request journey from Client --&gt; API Gateway --&gt; SQS --&gt; Lambda --&gt; S3, it&#39;s crucial to have such visibility. Integrating X-Ray with managed services like API Gateway and Lambda is straightforward. \u003C\u002Fp>\n\u003Cp>Enable distributing tracing with X-Ray for your Lambda functions by adding the \u003Ccode>tracing_config\u003C\u002Fcode> element to the function resource definition:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-hcl\">resource &quot;aws_lambda_function&quot; &quot;greeting_lambda&quot; {\n  # ... (other configurations)\n\n  tracing_config {\n    mode = &quot;Active&quot;\n  }\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Enable distributing tracing with X-Ray for your API Gateway by adding the \u003Ccode>xray_tracing_enabled\u003C\u002Fcode> element to the stage resource definition:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-hcl\">resource &quot;aws_api_gateway_stage&quot; &quot;api_gateway_stage&quot; {\n  # ... (other configurations)\n  \n  xray_tracing_enabled = true\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Make sure that the execution roles have permissions for publishing telemetry to X-Ray, e.g.\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-hcl\">resource &quot;aws_iam_policy&quot; &quot;lambda_xray_policy&quot; {\n  name        = &quot;LambdaXRayPolicy&quot;\n  description = &quot;Allows Lambda to send trace data to X-Ray.&quot;\n\n  policy = jsonencode({\n    Version = &quot;2012-10-17&quot;,\n    Statement = [\n      {\n        Action   = [&quot;xray:PutTraceSegments&quot;, &quot;xray:PutTelemetryRecords&quot;],\n        Effect   = &quot;Allow&quot;,\n        Resource = &quot;*&quot;\n      }\n    ]\n  })\n}\n\nresource &quot;aws_iam_role_policy_attachment&quot; &quot;lambda_xray_attach&quot; {\n  policy_arn = aws_iam_policy.lambda_xray_policy.arn\n  role       = aws_iam_role.lambda_execution_role.name\n}\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch2>Tagging Resources\u003C\u002Fh2>\n\u003Cp>Tagging resources in straightforward with Terraform - you simply attach your desired tags to the relevant resources. The advantage is that you can define a Terraform variable at the start of your \u003Ccode>main.tf\u003C\u002Fcode> file and then reference these values throughout your configurations for consistent tagging. This approach ensures uniformity while keeping your setup clean and organized.\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-hcl\">resource &quot;aws_lambda_function&quot; &quot;greeting_lambda&quot; {\n  # ... (other configurations)\n\n  tags = {\n    Environment = &quot;Production&quot;\n    OwnerTeam   = &quot;Engineering&quot;\n  }\n}\n\nresource &quot;aws_api_gateway_rest_api&quot; &quot;greeting_api&quot; {\n  # ... (other configurations)\n\n  tags = {\n    Environment = &quot;Production&quot;\n    OwnerTeam   = &quot;Platform&quot;\n  }\n}\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>Set up logging for both Lambda and API Gateway, sending logs to CloudWatch for easy monitoring and debugging.\u003C\u002Fli>\n\u003Cli>Integrate AWS X-Ray for both Lambda and API Gateway for in-depth insights into the application&#39;s execution and performance.\u003C\u002Fli>\n\u003Cli>Institute a tagging strategy across your application resources for streamlined resource management and cost allocation.\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cp>Observability is a linchpin for successful and manageable modern infrastructures. Having insights into how components of your applications interact and perform under various conditions is invaluable in timely issue resolution, as well as cost and performance management. \u003C\u002Fp>\n\u003Ch2>Next Steps\u003C\u002Fh2>\n\u003Cp>In the previous chapters you&#39;ve learned how to construct a scalable and comprehensive architecture, however all of the IaC configuration resided within a monolithic \u003Ccode>main.tf\u003C\u002Fcode> file. In following chapters you will learn how to refactor the monolithic \u003Ccode>main.tf\u003C\u002Fcode> into a collection of modular, reusable, and configurable Terraform modules.\u003C\u002Fp>\n",{"title":6,"order":7,"authors":8,"resources":11},"7. Observability",7,[9,10],"Anton Aleksandrov","Debasis Rath",[12,16,19,22,25],{"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\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Flambda-monitoring.html","Lambda function observability, monitoring, and troubleshooting",{"linke":20,"text":21,"type":15},"https:\u002F\u002Fdocs.aws.amazon.com\u002Fapigateway\u002Flatest\u002Fdeveloperguide\u002Frest-api-monitor.html","Monitoring API Gateway REST API",{"link":23,"text":24,"type":15},"https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Faws\u002Flatest\u002Fdocs\u002Fresources\u002Fapi_gateway_account","aws_api_gateway_account",{"link":26,"text":27,"type":15},"https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Faws\u002Flatest\u002Fdocs\u002Fresources\u002Fapi_gateway_stage","aws_api_gateway_stage","In this chapter you will learn about adding observability capabilities to your serverless applications using Terraform and IaC. Observability is a vital trait of any cloud application, as it provides insights into system behavior and interactions, aiding in issue detection and performance optimization. It is common to name Logging, Traces, and Metrics as three pillars of observability. \n\nAnother crucial aspect of observability is tagging. Tags assist in organizing resources, enable precise cost tracking, and when used with a Configuration Management Database (CMDB), help manage assets and ensure compliance. In a cloud environment, where resources and configurations are dynamic, a structured observability approach, supported by effective tagging, is essential for operational efficiency and cost management.\n\n## Lambda and CloudWatch Logs\n\nAWS Lambda natively integrates with CloudWatch Logs, pushing all logs from your code to a CloudWatch Logs group. Make sure that the execution role you assign to your functions have permissions to create log groups and write log events to CloudWatch Logs:\n\n```hcl\nresource \"aws_iam_policy\" \"lambda_cloudwatch_policy\" {\n  name        = \"LambdaCloudWatchPolicy\"\n  description = \"Allows Lambda to write logs to CloudWatch.\"\n\n  policy = jsonencode({\n    Version = \"2012-10-17\",\n    Statement = [\n      {\n        Action   = [\"logs:CreateLogGroup\", \"logs:CreateLogStream\", \"logs:PutLogEvents\"],\n        Effect   = \"Allow\",\n        Resource = \"arn:aws:logs:{region}:{account-id}:log-group:{log-group-name}\" \n      }\n    ]\n  })\n}\n\nresource \"aws_iam_role_policy_attachment\" \"lambda_cloudwatch_attach\" {\n  policy_arn = aws_iam_policy.lambda_cloudwatch_policy.arn\n  role       = aws_iam_role.lambda_execution_role.name\n}\n```\n\nOnce you grant the permissions, the Lambda service will automatically create and update the Log Groups and streams for you. \n\n## API Gateway and CloudWatch Logs\n\nAPI Gateway supports two types of logging - execution and access. With execution logging, API Gateway will create and manage the log group for you. You will need to configure the API Gateway with an execution role that has the required permissions. \n\n```hcl\nresource \"aws_api_gateway_account\" \"api_gateway_account\" {\n  cloudwatch_role_arn = aws_iam_role.cloudwatch.arn\n}\n```\n\nSee [aws_api_gateway_account](https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Faws\u002Flatest\u002Fdocs\u002Fresources\u002Fapi_gateway_account) for a full example. \n\nIn order to enable access logging for API Gateway, you need to create a CloudWatch Log Group, ensure the IAM role used by the API Gateway has permissions to publish logs, and enable the access logs for the API Gateway:\n\n```hcl\n# Create a CloudWatch Logs Group\nresource \"aws_cloudwatch_log_group\" \"api_gateway_log_group\" {\n  name = \"\u002Faws\u002Fapi-gateway\u002Fgreeting_api\"\n}\n\n# Create an access policy for API Gateway to send execution logs to CloudWatch Logs Group\nresource \"aws_iam_role_policy\" \"api_gateway_cloudwatch_logs\" {\n  name   = \"ApiGatewayCloudWatchLogs\"\n  role   = aws_iam_role.api_gateway_execution_role.name\n  \n  policy = jsonencode({\n    Version = \"2012-10-17\",\n    Statement = [\n      {\n        Action   = [\"logs:PutLogEvents\", \"logs:CreateLogStream\"],\n        Effect   = \"Allow\",\n        Resource = aws_cloudwatch_log_group.api_gateway_log_group.arn\n      }\n    ]\n  })\n}\n\n# Enable access logs in your API Gateway\nresource \"aws_api_gateway_stage\" \"api_gateway_stage\" {\n  # ... (other configurations)\n\n  access_log_settings {\n    destination_arn = aws_cloudwatch_log_group.api_gateway_log_group.arn\n    format          = \"[$context.requestId] ($context.identity.sourceIp) \\\"$context.httpMethod $context.routeKey $context.protocol\\\" $context.status $context.responseLength $context.requestTime\"\n  }\n}\n```\n\n## Distributed Tracing with AWS X-Ray\n\nAWS X-Ray offers a tracing perspective into the performance of your applications. It pinpoints how well your applications are operating and helps to identify bottlenecks. When following a request journey from Client --> API Gateway --> SQS --> Lambda --> S3, it's crucial to have such visibility. Integrating X-Ray with managed services like API Gateway and Lambda is straightforward. \n\nEnable distributing tracing with X-Ray for your Lambda functions by adding the `tracing_config` element to the function resource definition:\n\n```hcl\nresource \"aws_lambda_function\" \"greeting_lambda\" {\n  # ... (other configurations)\n\n  tracing_config {\n    mode = \"Active\"\n  }\n}\n```\n\nEnable distributing tracing with X-Ray for your API Gateway by adding the `xray_tracing_enabled` element to the stage resource definition:\n\n```hcl\nresource \"aws_api_gateway_stage\" \"api_gateway_stage\" {\n  # ... (other configurations)\n  \n  xray_tracing_enabled = true\n}\n```\n\n\nMake sure that the execution roles have permissions for publishing telemetry to X-Ray, e.g.\n\n```hcl\nresource \"aws_iam_policy\" \"lambda_xray_policy\" {\n  name        = \"LambdaXRayPolicy\"\n  description = \"Allows Lambda to send trace data to X-Ray.\"\n\n  policy = jsonencode({\n    Version = \"2012-10-17\",\n    Statement = [\n      {\n        Action   = [\"xray:PutTraceSegments\", \"xray:PutTelemetryRecords\"],\n        Effect   = \"Allow\",\n        Resource = \"*\"\n      }\n    ]\n  })\n}\n\nresource \"aws_iam_role_policy_attachment\" \"lambda_xray_attach\" {\n  policy_arn = aws_iam_policy.lambda_xray_policy.arn\n  role       = aws_iam_role.lambda_execution_role.name\n}\n```\n\n## Tagging Resources\n\nTagging resources in straightforward with Terraform - you simply attach your desired tags to the relevant resources. The advantage is that you can define a Terraform variable at the start of your `main.tf` file and then reference these values throughout your configurations for consistent tagging. This approach ensures uniformity while keeping your setup clean and organized.\n\n```hcl\nresource \"aws_lambda_function\" \"greeting_lambda\" {\n  # ... (other configurations)\n\n  tags = {\n    Environment = \"Production\"\n    OwnerTeam   = \"Engineering\"\n  }\n}\n\nresource \"aws_api_gateway_rest_api\" \"greeting_api\" {\n  # ... (other configurations)\n\n  tags = {\n    Environment = \"Production\"\n    OwnerTeam   = \"Platform\"\n  }\n}\n```\n\n## Recap\n\nIn this chapter you've learned how to:\n\n1. Set up logging for both Lambda and API Gateway, sending logs to CloudWatch for easy monitoring and debugging.\n2. Integrate AWS X-Ray for both Lambda and API Gateway for in-depth insights into the application's execution and performance.\n3. Institute a tagging strategy across your application resources for streamlined resource management and cost allocation.\n\nObservability is a linchpin for successful and manageable modern infrastructures. Having insights into how components of your applications interact and perform under various conditions is invaluable in timely issue resolution, as well as cost and performance management. \n\n## Next Steps\n\nIn the previous chapters you've learned how to construct a scalable and comprehensive architecture, however all of the IaC configuration resided within a monolithic `main.tf` file. In following chapters you will learn how to refactor the monolithic `main.tf` into a collection of modular, reusable, and configurable Terraform modules.\n\n",[30,31,32,33],"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\u002F07-observability","5 min",[39],{"title":40,"content":41},"Guide",[42,61,77,90,109,122,137,147,163,178,196],{"title":43,"order":44,"authors":45,"resources":46,"time":57,"path":58,"id":59,"link":60},"1. Introduction",1,[9,10],[47,51,54],{"link":48,"text":49,"type":50},"https:\u002F\u002Faws.amazon.com\u002Fserverless\u002Fsam\u002F","AWS Serverless Application Model (SAM)","link",{"link":52,"text":53,"type":50},"https:\u002F\u002Faws.amazon.com\u002Fcdk\u002F","AWS Cloud Development Kit (CDK)",{"link":55,"text":56,"type":50},"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":62,"order":63,"authors":64,"resources":65,"time":73,"path":74,"id":75,"link":76},"2. Solution Overview",2,[9,10],[66,67,70],{"link":55,"text":56,"type":50},{"link":68,"text":69,"type":50},"https:\u002F\u002Fdocs.aws.amazon.com\u002Fcli\u002Flatest\u002Fuserguide\u002Fgetting-started-install.htm","AWS CLI",{"link":71,"text":72,"type":50},"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":78,"order":79,"authors":80,"resources":82,"time":57,"path":87,"id":88,"link":89},"3. S3 buckets",3,[9,10,81],"Matt Ridehalgh",[83,84],{"link":13,"text":14,"type":15},{"link":85,"text":86,"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":91,"order":92,"authors":93,"resources":94,"time":57,"path":106,"id":107,"link":108},"4. Lambda functions",4,[9,10],[95,96,99,102],{"link":13,"text":14,"type":15},{"link":97,"text":98,"type":15},"https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Faws\u002Flatest\u002Fdocs\u002Fresources\u002Flambda_function","aws_lambda_function",{"link":100,"text":101,"type":15},"https:\u002F\u002Fdocs.aws.amazon.com\u002Fserverless-application-model\u002Flatest\u002Fdeveloperguide\u002Fterraform-support.html","AWS SAM Terraform support",{"link":103,"text":104,"type":105},"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":110,"order":111,"authors":112,"resources":113,"time":57,"path":119,"id":120,"link":121},"5. API Gateway",5,[9,10],[114,115,118],{"link":13,"text":14,"type":15},{"link":116,"text":117,"type":15},"https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Faws\u002Flatest\u002Fdocs\u002Fresources\u002Fapi_gateway_rest_api","aws_api_gateway_rest_api",{"link":100,"text":101,"type":15},"05-api-gateway","05-api-gateway.md","\u002Fcontent\u002Fguides\u002Fbuilding-serverless-applications-with-terraform\u002F05-api-gateway",{"title":123,"order":124,"authors":125,"resources":126,"time":57,"path":134,"id":135,"link":136},"6. Asynchronous processing",6,[9,10],[127,128,131],{"link":13,"text":14,"type":15},{"link":129,"text":130,"type":15},"https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Faws\u002Flatest\u002Fdocs\u002Fresources\u002Fsqs_queue","aws_sqs_queue",{"link":132,"text":133,"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":6,"order":7,"authors":138,"resources":139,"time":37,"path":145,"id":146,"link":36},[9,10],[140,141,142,143,144],{"link":13,"text":14,"type":15},{"link":17,"text":18,"type":15},{"linke":20,"text":21,"type":15},{"link":23,"text":24,"type":15},{"link":26,"text":27,"type":15},"07-observability","07-observability.md",{"title":148,"order":149,"authors":150,"resources":151,"time":159,"path":160,"id":161,"link":162},"8. Modularizing your IaC projects",8,[9,10],[152,153,156],{"link":13,"text":14,"type":15},{"link":154,"text":155,"type":15},"https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform\u002Flanguage\u002Fmodules","Terraform Modules",{"link":157,"text":158,"type":105},"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":164,"order":165,"authors":166,"resources":167,"time":174,"path":175,"id":176,"link":177},"9. Summary and next steps",9,[9,10],[168,169,171,173],{"link":13,"text":14,"type":15},{"link":170,"text":56,"type":15},"https:\u002F\u002Fdeveloper.hashicorp.com\u002Fterraform",{"link":48,"text":172,"type":15},"AWS SAM",{"link":157,"text":158,"type":105},"2 min","09-summary","09-summary.md","\u002Fcontent\u002Fguides\u002Fbuilding-serverless-applications-with-terraform\u002F09-summary",{"title":179,"order":180,"authors":181,"resources":183,"time":37,"path":193,"id":194,"link":195},"10. Appendix A - Amazon EventBridge",10,[9,10,182],"Luis Cerezo",[184,187,190],{"link":185,"text":186,"type":15},"https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Faws\u002Flatest\u002Fdocs\u002Fresources\u002Fcloudwatch_event_bus","aws_cloudwatch_event_bus Terraform resource",{"link":188,"text":189,"type":15},"https:\u002F\u002Fdocs.aws.amazon.com\u002Fhealth\u002Flatest\u002Fug\u002Fcloudwatch-events-health.html","Monitoring AWS Health events with Amazon EventBridge",{"link":191,"text":192,"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":197,"order":198,"authors":199,"resources":200,"time":57,"path":209,"id":210,"link":211},"10. Appendix B - AWS Step Functions",11,[9,10,182],[201,204,206],{"link":202,"text":203,"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":185,"text":205,"type":15},"cloudwatch_event_bus terraform resource",{"link":207,"text":208,"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",1792578865655]