A SysOps Administrator is configuring a new VPC Flow Log to send traffic data to an Amazon CloudWatch Logs group. To manage costs, the administrator wants to ensure that the flow logs are retained for exactly 90 days.
Which action must the administrator take to configure this retention period?
- Configure the retention setting directly on the target CloudWatch Logs group to 90 days.Answer
- BDefine a 90-day retention period in the properties of the VPC Flow Log configuration during its creation.
- CCreate an Amazon EventBridge rule that triggers an AWS Lambda function to delete logs older than 90 days from the log group.
- DConfigure the IAM role used by the VPC Flow Log with an inline policy containing an iam:PassRole statement that expires after 90 days.
Answer
Configure the retention setting directly on the target CloudWatch Logs group to 90 days.
The correct answer is to configure the retention setting directly on the target CloudWatch Logs group. VPC Flow Logs do not store data or maintain retention settings on their own resource. They deliver logs to CloudWatch Logs or Amazon S3, and the retention or lifecycle rules must be configured on those destination resources.
Step-by-Step Solution
Key Concept
VPC Flow Logs deliver traffic logs to Amazon CloudWatch Logs or Amazon S3. The retention period and lifecycle of the logs must be configured directly on the target destination (e.g., CloudWatch Log Group retention settings or S3 Lifecycle policies), as the VPC Flow Logs resource itself does not support retention configuration.