A SysOps administrator is attempting to create an AWS Step Functions state machine using the AWS CLI. The state machine needs to use an existing IAM execution role named StepFunctionsExecutionRole to perform its tasks. When running the creation command, the administrator receives an Access Denied error, despite having full administrator access to AWS Step Functions. To resolve this issue, which permission must be attached to the administrator's IAM user policy?
- AAn IAM policy statement that allows the sts:AssumeRole action on the StepFunctionsExecutionRole ARN.
- BAn IAM policy statement that allows the iam:PassRole action on the states.amazonaws.com service principal.
- An IAM policy statement that allows the iam:PassRole action on the StepFunctionsExecutionRole ARN.Answer
- DAn IAM policy statement that allows the sts:AssumeRole action on the states.amazonaws.com service principal.
Answer
The administrator's IAM user policy must include a statement that allows the iam:PassRole action on the StepFunctionsExecutionRole ARN.
To configure an AWS service to act on your behalf using an IAM role, your IAM identity must have permission to pass that role to the service. This is achieved by granting the iam:PassRole permission on the target role's Amazon Resource Name (ARN) in your user or group policy. Since the administrator is creating a state machine that runs under the StepFunctionsExecutionRole, the administrator must be allowed to pass this specific role to the Step Functions service.
Step-by-Step Solution
Key Concept
IAM Role Delegation and the PassRole Permission