Infrastructure Security

A deployment role can create Lambda functions, but deployment fails when it assigns an approved execution role. The execution role trusts Lambda and has the required application permissions. What should the administrator add?

Show the answer

Correct answerB. Permission for the deployment role to pass the approved execution role

AWhy not this: Function creation is performed by the deployment identity, not the function's execution role.

BWhy this is right: iam:PassRole authorizes the deployment identity to assign the approved execution role to Lambda.

CWhy not this: The execution role must trust Lambda, not the identity that deploys the function.

DWhy not this: sts:AssumeRole permits obtaining role credentials; it does not authorize assigning the role to Lambda.

The deployment role needs iam:PassRole to assign the approved execution role to Lambda; scope it to that role and, where appropriate, the Lambda service. Assuming the execution role is different from passing it to a service.