AWS Certified Solutions Architect Professional SAP-C02 Practice Question

A financial services company operates a multi-account AWS environment with a dedicated 'Developer Tools' account (ID: 111122223333) and a 'Production' account (ID: 999988887777). A CI/CD pipeline, running on an EC2 instance in the Developer Tools account, needs to deploy updates to a specific Lambda function named 'TradeProcessor' (ARN: arn:aws:lambda:us-east-1:999988887777:function:TradeProcessor). A solutions architect has been tasked with designing an IAM configuration that provides the necessary cross-account access while adhering strictly to the principle of least privilege. Which of the following configurations is the most secure and meets the requirements?

  • In the Production account, create an IAM user with programmatic access. Attach a policy to the user that allows the lambda:UpdateFunctionCode action on the TradeProcessor function ARN. Store the user's access key and secret key in AWS Secrets Manager in the Developer Tools account and grant the EC2 instance's IAM role permission to retrieve them.

  • In the Production account, create an IAM role named LambdaUpdateRole with an IAM policy that allows the lambda:UpdateFunctionCode action on the resource arn:aws:lambda:us-east-1:999988887777:function:TradeProcessor. Configure the role's trust policy to allow sts:AssumeRole actions from the specific IAM role ARN associated with the EC2 instance in the Developer Tools account.

  • In the Production account, create an IAM role named LambdaUpdateRole with a policy allowing lambda:UpdateFunctionCode on the TradeProcessor function ARN. Configure the role's trust policy to allow sts:AssumeRole actions from the root of the Developer Tools account ("Principal": {"AWS": "arn:aws:iam::111122223333:root"}).

  • In the Production account, create an IAM role named LambdaUpdateRole with an IAM policy that allows the lambda:* action on all resources ("Resource": "*"). Configure the role's trust policy to allow sts:AssumeRole actions from the IAM role associated with the EC2 instance in the Developer Tools account.

AWS Certified Solutions Architect Professional SAP-C02
Design for New Solutions
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot