A SysOps administrator is setting up an Amazon Data Firehose delivery stream to send application logs to an Amazon S3 bucket. The administrator creates an IAM role named FirehoseDeliveryRole to grant Firehose write access to the S3 bucket. However, when attempting to create the delivery stream using the AWS CLI, the administrator receives an Access Denied error.
Which of the following actions are required to resolve this issue and successfully create the delivery stream? (Select TWO.)
- Add a policy to the administrator's IAM user that allows the iam:PassRole action on the FirehoseDeliveryRole resource.Cevap
- Modify the trust policy of FirehoseDeliveryRole to allow the service principal firehose.amazonaws.com to perform the sts:AssumeRole action.Cevap
- CAdd a policy to the administrator's IAM user that allows the sts:AssumeRole action on the FirehoseDeliveryRole resource.
- DAdd a policy to the administrator's IAM user that allows the iam:PassRole action on the S3 bucket resource.
- EModify the trust policy of FirehoseDeliveryRole to allow the administrator's IAM user to perform the sts:AssumeRole action.
Cevap
The correct options are: adding a policy to the administrator's IAM user that allows the iam:PassRole action on the FirehoseDeliveryRole resource, and modifying the trust policy of FirehoseDeliveryRole to allow the service principal firehose.amazonaws.com to perform the sts:AssumeRole action.
The correct configuration requires two parts. First, the administrator must have permission to associate the IAM role with the AWS service. This is controlled by granting the administrator's IAM user the iam:PassRole permission on the specific IAM role (FirehoseDeliveryRole). Second, the IAM role itself must trust the service that is going to assume it. This is done by modifying the trust policy of the role to allow the service principal firehose.amazonaws.com to perform the sts:AssumeRole action. Together, these two steps allow the administrator to pass the role and the Firehose service to assume it.
Adım Adım Çözüm
Anahtar Kavram
Delegating permissions to AWS services requires the user to have iam:PassRole permissions on the role, and the role's trust policy must allow the service principal to perform sts:AssumeRole.