# 4.1 Ensure unauthorized API calls are monitored (Manual)

- Source: https://support.icompaas.com/support/solutions/articles/62000234255-4-1-ensure-unauthorized-api-calls-are-monitored-manual-
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [CIS Amazon Web Services Foundations Benchmark v5.0.0](https://support.icompaas.com/support/solutions/62000112684) › [CIS AWS Benchmarks](https://support.icompaas.com/support/solutions/folders/62000169233)
- Last updated: 2026-05-29
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

#### Profile Applicability

-   **Level 1**
    

#### Description:

Monitoring unauthorized API calls is a critical step in maintaining the security of an AWS environment. Unauthorized API calls can indicate a potential security threat or attempt to exploit vulnerabilities in your AWS resources. These may include attempts to access services or perform actions for which the user does not have appropriate permissions.

By tracking and monitoring unauthorized API calls, organizations can quickly identify potential security incidents, investigate unauthorized access attempts, and enforce the principle of least privilege across their AWS environment.

#### Rationale:

Unauthorized API calls can lead to:

-   Unauthorized access to AWS resources.
    
-   Data breaches or loss if sensitive data is exposed.
    
-   Violations of security policies and non-compliance with regulatory requirements (e.g., SOC 2, HIPAA).
    

Monitoring unauthorized API calls ensures that all access attempts are legitimate and properly authorized, reducing the risk of a breach and maintaining the integrity of AWS environments.

#### Impact:

Failure to monitor unauthorized API calls can result in:

-   Lack of visibility into potentially malicious activity.
    
-   Increased vulnerability to attacks, data exfiltration, or accidental exposure of sensitive data.
    
-   Non-compliance with security standards and regulations.
    

Monitoring these events helps detect unauthorized access attempts, preventing potential security incidents and improving compliance posture.

#### Default Value:

AWS CloudTrail by default logs all API calls, including unauthorized ones. However, organizations must configure AWS CloudWatch to actively monitor these logs and set up alerts for unauthorized access attempts.

#### Pre-Requisites:

-   AWS CLI installed and configured
    
-   IAM permissions:
    
    -   cloudtrail:LookupEvents
        
    -   cloudwatch:PutMetricData
        
    -   cloudwatch:DescribeAlarms
        
-   AWS CloudTrail enabled for logging all API calls
    
-   AWS CloudWatch configured to monitor unauthorized API calls
    

#### Remediation:

##### Test Plan:

Using AWS Console:

1.  Go to the [CloudTrail Console](https://console.aws.amazon.com/cloudtrail/).
    
2.  Ensure that Management Events are enabled for logging all API calls, including failed attempts.
    
3.  Go to the [CloudWatch Console](https://console.aws.amazon.com/cloudwatch/) to confirm that CloudWatch is configured to monitor and alert on unauthorized API calls.
    

Using AWS CLI:

aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=UnauthorizedOperation --query "Events" --output table

To verify CloudWatch monitoring for unauthorized API calls:

aws cloudwatch describe-alarms --query "MetricAlarms\[?AlarmName=='UnauthorizedApiCallAlarm'\]" --output table

##### Implementation Plan:

Using AWS Console:

1.  Ensure CloudTrail is logging all API calls:
    
    -   Go to the [CloudTrail Console](https://console.aws.amazon.com/cloudtrail/).
        
    -   Ensure Management Events are enabled, especially for logging UnauthorizedOperation or any failed API calls.
        
    -   Ensure logs are being stored in an S3 bucket for long-term retention and auditing.
        
2.  Set up CloudWatch metrics and alarms for unauthorized API calls:
    
    -   In the [CloudWatch Console](https://console.aws.amazon.com/cloudwatch/), create a custom metric filter to track UnauthorizedOperation events or failed ConsoleLogin events.
        
    -   Set up a CloudWatch alarm to trigger when unauthorized API calls exceed a threshold.
        

Using AWS CLI:

1.  Verify CloudTrail logging for unauthorized API calls:
    

aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=UnauthorizedOperation --query "Events" --output table

2.  Set up CloudWatch to monitor unauthorized API calls:
    

aws cloudwatch put-metric-alarm --alarm-name "UnauthorizedApiCallAlarm" --metric-name "UnauthorizedApiCalls" --namespace "AWS/CloudTrail" --statistic "Sum" --period 300 --threshold 1 --comparison-operator "GreaterThanOrEqualToThreshold" --evaluation-periods 1 --actions-enabled

#### Backout Plan:

Using AWS Console:

1.  If monitoring unauthorized API calls creates excessive alarms or logs:
    
    -   Go to the [CloudWatch Console](https://console.aws.amazon.com/cloudwatch/).
        
    -   Adjust the threshold or modify the metric filter to reduce the number of triggered alarms.
        
    -   Optionally, disable the alarm temporarily if it’s generating too many notifications.
        
2.  If CloudTrail logging causes performance issues:
    
    -   Modify CloudTrail settings to reduce the scope of logged events, or exclude non-critical API calls.
        

Using AWS CLI:

1.  Temporarily disable CloudWatch alarms:
    

aws cloudwatch disable-alarm-actions --alarm-name "UnauthorizedApiCallAlarm"

2.  Stop logging unauthorized API calls in CloudTrail:
    

aws cloudtrail update-trail --name <trail-name> --no-log-management-events

3.  Re-enable monitoring once issues are resolved:
    

aws cloudwatch enable-alarm-actions --alarm-name "UnauthorizedApiCallAlarm"
aws cloudtrail update-trail --name <trail-name> --log-management-events

#### References:

-   [AWS CloudTrail Documentation](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html)
    
-   [AWS CloudWatch Documentation](https://docs.aws.amazon.com/cloudwatch/latest/monitoring/)
    
-   [AWS IAM Documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html)
    

#### CIS Controls Mapping:

<table style="border:none;border-collapse:collapse"><tbody><tr style="height:39.25pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px;text-align:justify"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:700;font-family:&quot;Helvetica Neue&quot;">CIS Control Version</span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;text-align:justify;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:700;font-family:&quot;Helvetica Neue&quot;">Control ID</span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;text-align:justify;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:700;font-family:&quot;Helvetica Neue&quot;">Control Description</span></span></span></p></td></tr><tr style="height:39.25pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px;text-align:justify"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">CIS v8</span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px;text-align:justify"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">4.9</span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px;text-align:justify"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">Perform Continuous Security Monitoring and Incident Detection</span></span></span></p></td></tr><tr style="height:25pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px;text-align:justify"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">CIS v7</span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px;text-align:justify"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">6.3</span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px;text-align:justify"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">Monitor Security Configurations for Compliance</span></span></span></p></td></tr><tr style="height:39.25pt"><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px;text-align:justify"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">CIS v7</span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px;text-align:justify"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">5.2</span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;text-align:justify"><span style="font-family:&quot;Helvetica Neue&quot;;font-size:14px"><span dir="ltr" style="color:rgb(0, 0, 0);font-weight:400">Securely Manage and Monitor Cloud Accounts and Services</span></span></p></td></tr></tbody></table>

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
