An organization is experiencing high data transfer costs through a NAT gateway. A SysOps Administrator attempts to create a VPC Flow Log at the subnet level to capture traffic details and deliver them to an Amazon CloudWatch Logs log group. Although the administrator has administrative permissions for Amazon EC2 and CloudWatch Logs, and has created a dedicated service role with the appropriate trust policy for delivery.logs.amazonaws.com, the creation of the flow log fails with an 'Access Denied' error. Which of the following actions should the administrator take to resolve this issue?
- AModify the trust policy of the dedicated service role to allow the administrator's IAM identity to assume the role via the sts:AssumeRole API operation.
- Add an IAM policy to the administrator's identity that grants the iam:PassRole permission targeting the ARN of the dedicated service role.Cevap
- CEnsure that the destination CloudWatch Logs log group does not have a retention policy configured to prevent delivery failure.
- DConfigure a CloudWatch alarm for NAT gateway active connections and link it to an EventBridge rule that executes the flow log creation.
Cevap
Add an IAM policy to the administrator's identity that grants the iam:PassRole permission targeting the ARN of the dedicated service role.
The correct action is to add an IAM policy to the administrator's identity that grants the iam:PassRole permission targeting the ARN of the dedicated service role. This is required because when an AWS resource needs a role to perform actions on your behalf (such as VPC Flow Logs writing to CloudWatch Logs), the user configuring the resource must have permission to pass that role to the service.
Adım Adım Çözüm
Anahtar Kavram
IAM PassRole permissions for VPC Flow Logs delivery to CloudWatch Logs
Tahmini Süre:1m 30s