Pattern: Disabled tracing for AWS API Gateway
Issue: -
X-Ray tracing enables end-to-end debugging and analysis of all API Gateway HTTP requests.
Resolution: Enable tracing.
Example of incorrect code:
resource "aws_api_gateway_stage" "bad_example" {
stage_name = "prod"
rest_api_id = aws_api_gateway_rest_api.test.id
deployment_id = aws_api_gateway_deployment.test.id
xray_tracing_enabled = false
}
Example of correct code:
resource "aws_api_gateway_stage" "good_example" {
stage_name = "prod"
rest_api_id = aws_api_gateway_rest_api.test.id
deployment_id = aws_api_gateway_deployment.test.id
xray_tracing_enabled = true
}