Check provider logo

API Gateway REST API stage has X-Ray tracing enabled

apigateway_restapi_tracing_enabled

Severitylow
Serviceapigateway
by Prowler

API Gateway REST API stages have AWS X-Ray active tracing enabled to sample incoming requests and produce distributed traces across connected services.

Risk

Without X-Ray tracing, you lose end-to-end visibility, hindering detection of timeouts, errors, and anomalous latency.

This delays incident response and root-cause analysis, increasing MTTR and risking partial outages (availability) and undetected integration failures (integrity).

Run this check with Prowler CLI

prowler aws --checks apigateway_restapi_tracing_enabled

Recommendation

Enable X-Ray active tracing on all API Gateway stages and propagate trace context through downstream services.

Use prudent sampling, correlate traces with logs/metrics, and alert on errors/latency. Apply least privilege to X-Ray access and use defense in depth for observability.

Remediation

CLI

aws apigateway update-stage --rest-api-id <restapi-id> --stage-name <stage-name> --patch-operations op=replace,path=/tracingEnabled,value=true

Native IaC
Terraform
Other
  1. Open the AWS Console and go to API Gateway
  2. Select your REST API and choose Stages
  3. Select the target stage
  4. Open the Logs/Tracing tab, check Enable X-Ray Tracing
  5. Click Save

Source Code

Resource Type

AwsApiGatewayStage

References