A SysOps Administrator is setting up VPC Flow Logs to capture traffic from a critical production subnet and deliver the log events to an Amazon CloudWatch Logs log group. When trying to create the VPC Flow Log using an existing IAM role, the AWS Management Console displays an Access Denied error, despite the IAM role having a trust policy that allows the vpc-flow-logs.amazonaws.com service to assume it. Additionally, the administrator must ensure that these security logs do not incur indefinite storage costs.
Which of the following actions should the administrator take to resolve the creation error and manage the storage costs? (Select TWO.)
- Attach an IAM policy to the administrator's user or group that grants the iam:PassRole permission for the VPC Flow Logs IAM role.Cevap
- Configure the retention setting on the destination CloudWatch Logs log group to automatically expire logs after a defined duration.Cevap
- CAdd the iam:PassRole action to the trust policy of the IAM role so that CloudWatch Logs can publish logs to the log group.
- DSet a custom log retention period in the VPC Flow Log configuration settings during creation.
- EUpdate the subnet's outbound Network ACL rules to allow traffic to the CloudWatch Logs endpoint on ephemeral ports.
Cevap
Attach an IAM policy to the administrator's user or group that grants the iam:PassRole permission for the VPC Flow Logs IAM role, and configure the retention setting on the destination CloudWatch Logs log group to automatically expire logs after a defined duration.
The correct options are to grant the iam:PassRole permission to the administrator's user policy, and to configure a retention period directly on the destination CloudWatch Logs log group. The iam:PassRole permission is required for the user/operator to associate an IAM role with the flow log configuration. Configuring retention on the destination CloudWatch Logs log group ensures that log events are automatically deleted after a specified period, optimizing cost.
Adım Adım Çözüm
Anahtar Kavram
Configuring permissions and lifecycle options for VPC Flow Logs requires both identity-based permissions (iam:PassRole) to delegate the service role and log group retention policies in CloudWatch to optimize storage costs, as delivery itself occurs out-of-band.