An organization's security policy requires that all logs from Amazon Kinesis Data Firehose in Account A () be delivered to an Amazon S3 bucket in Account B (). A SysOps administrator creates an IAM role named `FirehoseDeliveryRole` in Account A. The role's trust policy permits the Kinesis Data Firehose service principal, and its permissions policy allows writing to the target bucket. When the administrator runs the AWS CLI command to create the delivery stream and specify `FirehoseDeliveryRole`, the command returns an 'AccessDeniedException'. What is the reason for this failure?
- AThe Amazon S3 bucket policy in Account B does not explicitly grant the administrator's IAM user the s3:PutObject permission.
- BThe administrator's IAM user or role has not been granted sts:AssumeRole permissions on the FirehoseDeliveryRole resource.
- The administrator's IAM user or role lacks permission to perform the iam:PassRole action on FirehoseDeliveryRole.Answer
- DThe trust policy of FirehoseDeliveryRole does not include the administrator's IAM user as a trusted principal.
Answer
The administrator's IAM user or role lacks permission to perform the iam:PassRole action on FirehoseDeliveryRole.
To associate an IAM role with an AWS service (such as Kinesis Data Firehose), the IAM identity performing the configuration must have the iam:PassRole permission for the target role resource. Without this permission, the AWS CLI command to create the delivery stream will fail with an AccessDeniedException because the user is not authorized to delegate that role to the service, even if the user has full permissions for the service itself.
Step-by-Step Solution
Key Concept
Delegating IAM roles to AWS services using the PassRole permission
Estimated Time:2m 0s