A SysOps administrator has configured Amazon VPC Flow Logs for a production VPC to publish flow logs to an Amazon CloudWatch Logs log group. Although the VPC is actively routing network traffic, no log streams are being created in the destination log group after several hours. The flow logs resource status in the VPC dashboard shows that the configuration is active.
Which of the following is the most likely cause of this issue?
- The IAM role associated with the VPC Flow Logs configuration lacks a trust policy that allows the vpc-flow-logs.amazonaws.com service principal to assume the role.Cevap
- BThe administrator's IAM policy lacks the iam:PassRole permission, which prevents the VPC Flow Logs configuration from successfully delivering the logs.
- CThe destination CloudWatch Logs log group has its log retention policy configured to "Never Expire," which prevents the initialization of new log streams.
- DThe EC2 instances inside the VPC are only configured for Standard Monitoring, which does not produce the detailed metric logs required by the VPC Flow Logs service.
Cevap
The IAM role associated with the VPC Flow Logs configuration lacks a trust policy that allows the vpc-flow-logs.amazonaws.com service principal to assume the role.
The correct answer is that the IAM role associated with the VPC Flow Logs configuration lacks a trust policy that allows the vpc-flow-logs.amazonaws.com service principal to assume the role. For VPC Flow Logs to deliver logs to CloudWatch Logs, the VPC service must assume the specified IAM role. Without a trust relationship that explicitly permits vpc-flow-logs.amazonaws.com to execute the sts:AssumeRole action, the service cannot retrieve temporary security credentials to write log data, causing the delivery to fail silently.
Adım Adım Çözüm
Anahtar Kavram
VPC Flow Logs runtime service permissions and IAM role trust relationships