A SysOps Administrator is setting up VPC Flow Logs to capture traffic from a public subnet and publish it to an Amazon CloudWatch Logs log group. The administrator creates a dedicated IAM service role for the flow logs, but when attempting to enable the flow log, they receive an "Access Denied" error. Additionally, the administrator wants to minimize long-term storage costs by ensuring that the collected flow log data is automatically deleted after 30 days. Which combination of actions must the administrator take to successfully activate the flow logs and meet the retention requirement? (Select TWO.)
- Grant the administrator's IAM identity the iam:PassRole permission for the VPC Flow Logs service role.Cevap
- Configure the retention settings of the CloudWatch Logs log group to expire events after 30 days.Cevap
- CGrant the administrator's IAM identity the sts:AssumeRole permission for the VPC Flow Logs service role.
- DCreate an Amazon S3 Lifecycle policy on the CloudWatch Logs log group to transition objects to Glacier after 30 days.
- EUpdate the public subnet's Network ACL rules to allow outbound HTTPS (port 443) traffic to the CloudWatch Logs endpoint.
Cevap
To resolve the issue and meet the requirements, the administrator must grant their IAM identity the iam:PassRole permission for the VPC Flow Logs service role and configure the retention settings of the CloudWatch Logs log group to expire events after 30 days.
The correct options are the ones stating to grant the administrator's IAM identity the iam:PassRole permission for the VPC Flow Logs service role, and to configure the retention settings of the CloudWatch Logs log group to expire events after 30 days. The iam:PassRole permission is required whenever an administrator associates an IAM service role with a resource or service configuration. Setting the log group retention policy to 30 days ensures that CloudWatch automatically deletes older log events to prevent indefinite storage fees.
Adım Adım Çözüm
Anahtar Kavram
VPC Flow Logs require an IAM role to publish to CloudWatch Logs. Creating this flow log configuration requires the creator to have the iam:PassRole permission. Furthermore, log retention settings must be configured at the CloudWatch Logs log group level to manage data storage costs, as logs do not traverse customer NACLs during out-of-band delivery.