A SysOps Administrator is configuring a VPC Flow Log to capture network traffic from a subnet and deliver it to an Amazon CloudWatch Logs log group. The administrator has already created the target log group and an IAM role with the necessary permissions for the VPC Flow Logs service to publish logs. However, during the creation process, the administrator receives an 'Access Denied' error. In addition, the administrator wants to ensure that the logs do not persist indefinitely to manage storage costs.
Which of the following actions should the administrator take to resolve the error and manage log retention? (Select TWO.)
- Add the iam:PassRole permission to the IAM policy of the user creating the flow log, referencing the flow log IAM role.Cevap
- Configure a retention period on the CloudWatch Logs log group in the CloudWatch console.Cevap
- CAdd the iam:PassRole permission directly to the trust policy of the flow log IAM role.
- DSpecify a log retention period in the VPC Flow Log configuration settings during creation.
- EEnable detailed monitoring on the EC2 instances in the subnet to automatically archive flow logs after 14 days.
Cevap
Add the iam:PassRole permission to the IAM policy of the user creating the flow log, referencing the flow log IAM role, and configure a retention period on the CloudWatch Logs log group in the CloudWatch console.
To resolve the Access Denied error, the user creating the flow log must be granted the `iam:PassRole` permission in their IAM policy for the role that the VPC Flow Logs service will assume. To control log storage costs, a retention period must be configured on the CloudWatch Logs log group since the default setting is to keep logs indefinitely.
Adım Adım Çözüm
Anahtar Kavram
Configuring VPC Flow Logs requires proper IAM permissions (such as iam:PassRole) to allow the flow logs service to assume the logging role, while cost management for CloudWatch Logs requires setting log group retention periods.