Check ID: apigateway_restapi_logging_enabled
Provider: AWS
Service: apigateway
Severity: MEDIUM
Categories: logging, forensics-ready
Resource type: AwsApiGatewayStage

What this check verifies

API Gateway REST API stages with stage logging enabled to emit execution or access logs to CloudWatch

Risk

Without stage logging, API activity lacks visibility, hindering detection of abuse and incident response. Attackers can probe endpoints, exfiltrate data, or tamper integrations without traces, impacting confidentiality, integrity, and availability and blocking forensic investigation.

Recommendation

Enable CloudWatch Logs for all API Gateway stages, using ERROR or INFO as appropriate. Include request IDs (e.g., $context.requestId). Enforce least privilege on logs, set retention and alerts for anomalies. Avoid sensitive data in logs and use defense in depth with tracing.

Remediation

aws apigateway update-stage --rest-api-id <REST_API_ID> --stage-name <STAGE_NAME> --patch-operations op=replace,path='/*/*/logging/loglevel',value=ERROR

References

Where this check fires

This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable by Check ID = apigateway_restapi_logging_enabled. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to AWS checks