π‘οΈ AWS API Gateway REST API Stage X-Ray Tracing is not enabledπ’
- Contextual name: π‘οΈ REST API Stage X-Ray Tracing is not enabledπ’
- ID:
/ce/ca/aws/apigateway/rest-api-stage-x-ray-tracing - Tags:
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
PERFORMANCE
Logicβ
- π§ prod.logic.yamlπ’
Similar Policiesβ
- Internal:
dec-x-82388e10
Similar Internal Rulesβ
| Rule | Policies | Flags |
|---|---|---|
| βοΈ dec-x-82388e10 | 1 |
Descriptionβ
Descriptionβ
Enable X-Ray active tracing for API Gateway REST API stages to capture real-time metrics and trace the flow of user requests. This ensures enhanced monitoring and performance optimization across connected API Gateway and backend services.
Rationaleβ
Enabling X-Ray Active tracing provides detailed visibility into API request performance, allowing rapid identification and resolution of bottlenecks or anomalies in the underlying infrastructure. With real-time metrics, teams can respond proactively to issues, reducing downtime risks and improving system performance. This traceability is especially critical for applications with complex dependencies and distributed architectures.
Impactβ
Enabling X-Ray Active tracing incurs costs associated with trace data processing and storage.
Auditβ
This policy marks an API Gateway Stage as
INCOMPLIANTif theX-Ray Tracing Enabledfield is set to No.
Remediationβ
Remediationβ
From Command Lineβ
Enable X-Ray tracingβ
Use the following command to update the Stage settings and enable X-Ray tracing:
aws apigateway update-stage \
--rest-api-id {{rest-api-id}} \
--stage-name {{stage-name}} \
--patch-operations op=replace,path=/tracingEnabled,value=trueTest API callsβ
Perform a few API calls and verify that traces appear in the AWS X-Ray console. Ensure that the traces show accurate request flows and performance metrics.