A SysOps administrator is configuring an AWS Systems Manager (SSM) Automation runbook to patch Amazon EC2 instances. The runbook must launch a temporary EC2 instance, associate a pre-configured IAM role named `PatchingInstanceRole` with the instance, run patching scripts, and then terminate the instance. The administrator runs the SSM Automation using an automation service role named `AutomationServiceRole`. The trust relationship of `AutomationServiceRole` is correctly configured to trust the `ssm.amazonaws.com` service principal. However, when the runbook attempts to launch the temporary EC2 instance with the `PatchingInstanceRole`, the execution fails with an 'Access Denied' error. Which of the following modifications will resolve this issue?
- Attach an IAM policy to the `AutomationServiceRole` that grants `iam:PassRole` permissions for the `PatchingInstanceRole` resource.Cevap
- BModify the trust relationship of the `PatchingInstanceRole` to allow the `AutomationServiceRole` to perform the `sts:AssumeRole` action.
- CAdd the `iam:PassRole` permission to the identity-based policy of the `PatchingInstanceRole` to allow it to pass itself to Amazon EC2.
- DModify the trust policy of the `AutomationServiceRole` to trust `ec2.amazonaws.com` in addition to `ssm.amazonaws.com`.