CY.I · CySA+ CS0-004 practice question
An analyst is investigating an alert from a serverless AWS Lambda function that normally only reads from an S3 bucket and writes to DynamoDB. CloudTrail logs suddenly show the Lambda's IAM execution role calling `iam:CreateAccessKey` and `ec2:DescribeInstances`. What is the MOST likely explanation?
Check answer and explanation
Correct answer: Compromise of the Lambda function code or dependencies leading to cloud privilege abuse and discovery
Explanation
A serverless function invoking unexpected IAM persistence (`CreateAccessKey`) and environment discovery (`DescribeInstances`) APIs indicates compromised application logic or stolen temporary role credentials.
Common trap
A serverless function invoking unexpected IAM persistence (`CreateAccessKey`) and environment discovery (`DescribeInstances`) APIs indicates compromised application logic or stolen temporary role credentials.
Source: Original unofficial practice; not an official CompTIA exam item
Checked against the cited text on 2026-11-30.