π 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
- Located in: π AWS API Gateway
Flagsβ
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
PERFORMANCE
Similar Policiesβ
- Internal
dec-x-82388e10
Similar Internal Rulesβ
Rule | Policies | Flags |
---|---|---|
βοΈ dec-x-82388e10 | 1 |
Logicβ
- π§ prod.logic.yaml π’
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
INCOMPLIANT
if theX-Ray Tracing Enabled
field 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.