Courseiva

SCS-C02 Threat Detection and Incident Response Practice Question

A company uses AWS Lambda functions to process sensitive data. The security team wants to ensure that if a Lambda function is compromised, the attacker cannot use the function's IAM role to access other AWS resources. The team has implemented the principle of least privilege by restricting the IAM role's permissions. However, they are concerned about a scenario where an attacker could use the Lambda function to execute AWS API calls that are not intended by the application. What additional measure should the team implement to reduce the risk of such lateral movement?

⚠ Common exam trap

Candidates often confuse service control policies (SCPs) with IAM permissions boundaries or think they can be applied to individual resources, when in fact SCPs only affect accounts in an organization and cannot be attached to a Lambda function.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Use AWS IAM Access Analyzer to generate and refine the IAM policy based on actual usage.

AWS IAM Access Analyzer can generate IAM policies based on the actual API calls made by the Lambda function over a specified period. By reviewing and refining the policy to include only those actions, the team can further tighten least privilege beyond manual estimation, reducing the risk that an attacker could abuse unintended API calls. This directly addresses the concern of lateral movement by ensuring the function's role cannot perform actions not observed in normal operation.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    Use AWS IAM Access Analyzer to generate and refine the IAM policy based on actual usage.

    Why this is correct

    IAM Access Analyzer's policy generation feature reviews CloudTrail logs to identify the specific API actions the Lambda function actually invoked, then proposes a least-privilege IAM policy. You refine and attach that policy to the function's execution role, which prevents the role from calling unrelated AWS services that it never legitimately needs. This is a preventive control because it reduces the attack surface and blast radius if credentials are compromised, as opposed to merely logging or auditing activity.

  • ✗

    Enable AWS CloudTrail data events for the Lambda function.

    Why it's wrong here

    CloudTrail data events for a Lambda function record invocation metadata, such as which caller invoked the function and when, but they do not alter or restrict the function's execution role permissions. Enabling data events gives you forensic visibility after an unauthorized action occurs, making it a detective control rather than a preventive one. It cannot stop a Lambda function with an over-privileged role from making destructive AWS API calls, so it does not address the root cause of excessive permissions.

  • ✗

    Attach a service control policy (SCP) that denies all actions except those explicitly allowed.

    Why it's wrong here

    An SCP attached to the organization root or AWS account imposes a permission guardrail on every principal in that account, including human users, other Lambda functions, and AWS services; it cannot be scoped to one individual function. A blanket 'deny all except allowed' SCP would also require explicitly allow-listing every legitimate AWS service for the entire account, which is operationally unsustainable and would block critical actions. Because the SCP restricts the entire account rather than the function’s execution role, it fails the requirement to secure exactly the one Lambda function.

  • ✗

    Place the Lambda function inside a VPC with no internet access.

    Why it's wrong here

    Placing a Lambda function in a VPC with no internet route prevents it from reaching public internet destinations, but it does nothing to limit the API actions available through the function's IAM execution role. The function can still invoke AWS services through VPC interface endpoints, and the VPC configuration itself has no effect on IAM authorization. As a result, an over-privileged role remains over-privileged; network isolation is a separate concern from identity-based permission boundaries.

Quick reference

Cloud Service Model Comparison

ModelYou ManageProvider ManagesExamples
IaaSOS, runtime, apps, dataHardware, hypervisor, networkingEC2, Azure VMs, GCP Compute Engine
PaaSApps and dataOS, runtime, middleware, hardwareElastic Beanstalk, Azure App Service
SaaSData and settings onlyEverything elseMicrosoft 365, Salesforce, Workday
FaaS / ServerlessFunction code onlyInfra, scaling, runtimeLambda, Azure Functions, Cloud Run
CaaSContainers and appsKubernetes, OS, hardwareEKS, AKS, GKE

About these practice questions

This SCS-C02 question is part of Courseiva's 1,205-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SCS-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SCS-C02 exam.