Courseiva

SCS-C02 Identity and Access Management Practice Question

A security engineer is configuring an IAM role for a Lambda function that must access an Amazon RDS database. The engineer wants the Lambda function to retrieve database credentials from AWS Secrets Manager without hardcoding them. Which combination of IAM permissions and trust policy is required?

⚠ Common exam trap

It's easy for candidates to confuse the trust policy principal with the permissions policy action, and assuming the service that stores the secret is the one that assumes the role.

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

✓

The role's trust policy must allow lambda.amazonaws.com to assume it, and the role's permissions policy must allow secretsmanager:GetSecretValue on the specific secret ARN.

A Lambda execution role requires a trust policy that allows the Lambda service principal to assume it, and a permissions policy that grants the specific Secrets Manager action on the secret ARN. This enables secure, dynamic credential retrieval without hardcoding. Trusting the wrong principal or granting excessive permissions fails the security and functional requirements.

Answer analysis

Option-by-option breakdown

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

  • ✓

    The role's trust policy must allow lambda.amazonaws.com to assume it, and the role's permissions policy must allow secretsmanager:GetSecretValue on the specific secret ARN.

    Why this is correct

    Lambda functions assume an execution role via the service principal lambda.amazonaws.com. The trust policy must allow that principal to call sts:AssumeRole. The permissions policy then grants secretsmanager:GetSecretValue on the secret ARN, enabling the function to retrieve credentials securely without embedding them in code. This is the standard, least-privilege approach for Lambda accessing Secrets Manager.

  • ✗

    The role's trust policy must allow the Lambda function's IAM user to assume it, and the permissions policy must allow secretsmanager:GetSecretValue.

    Why it's wrong here

    Lambda functions do not assume roles through an IAM user; they use the service-linked execution role. The trust policy should trust the Lambda service principal, not a user. Allowing a user to assume the role would not enable the function itself to obtain credentials, and it introduces unnecessary human access, violating least privilege.

  • ✗

    The role's trust policy must allow lambda.amazonaws.com, and the permissions policy must allow secretsmanager:* on all resources.

    Why it's wrong here

    While the trust policy is correct, granting secretsmanager:* on all resources violates least privilege. The function only needs GetSecretValue on a specific secret. A wildcard action and resource would allow the function to delete or modify any secret in the account if compromised. The scenario calls for secure retrieval, so overly broad permissions are inappropriate.

  • ✗

    The role's trust policy must allow secretsmanager.amazonaws.com to assume it, and the permissions policy must allow rds:DescribeDBInstances.

    Why it's wrong here

    Secrets Manager does not assume roles on behalf of Lambda; the Lambda service does. Trusting secretsmanager.amazonaws.com is incorrect and would not allow the function to assume the role. Additionally, rds:DescribeDBInstances does not grant access to secret values, so the function could not retrieve credentials. Both parts of this option are wrong for the scenario.

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 and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint

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.