Check ID:
Provider: AWS
Service:
Severity: MEDIUM
Categories:
Resource type:
cloudwatch_log_metric_filter_unauthorized_api_callsProvider: AWS
Service:
cloudwatchSeverity: MEDIUM
Categories:
loggingResource type:
AwsCloudWatchAlarmWhat this check verifies
CloudWatch Logs for CloudTrail include a metric filter that matches unauthorized API errors ($.errorCode="*UnauthorizedOperation" or $.errorCode="AccessDenied*") and a linked alarm that triggers when events match the filter.
Risk
Without alerting on unauthorized API calls, permission probing and failed access by compromised identities can go unnoticed. Attackers can enumerate services, pivot, and attempt privilege escalation, threatening data confidentiality and integrity.Recommendation
Enable real-time alerting by adding a CloudWatch Logs metric filter for unauthorized errors (*UnauthorizedOperation, AccessDenied*) and associating it with an alarm that notifies responders.
- Enforce least privilege to reduce noise
- Integrate with IR tooling for defense in depth
Remediation
- Terraform
- Native IaC
- Dashboard steps
References
- https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudwatch-alarms-for-cloudtrail.html
- https://asecure.cloud/a/unauthorized_api_calls/
- https://www.trendmicro.com/trendaivisiononecloudriskmanagement/knowledge-base/aws/CloudWatchLogs/authorization-failures-alarm.html
- https://www.tenable.com/policies/[type]/AC_AWS_0559
- https://www.intelligentdiscovery.io/controls/cloudwatch/cloudwatch-unauthorized-api-calls
- https://support.icompaas.com/support/solutions/articles/62000083561-ensure-a-log-metric-filter-and-alarm-exist-for-unauthorized-api-calls
Where this check fires
This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable byCheck ID = cloudwatch_log_metric_filter_unauthorized_api_calls. 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