A SysOps Administrator is configuring VPC Flow Logs to monitor network traffic for security compliance. The flow logs must be published to a new Amazon CloudWatch Logs log group. Any high-frequency network rejections should trigger an automated system teardown via an AWS Systems Manager (SSM) Automation runbook. The administrator attempts to configure the workflow but encounters two issues: they receive an access denied error when attempting to create the flow log, and the SSM Automation runbook is not being triggered during simulated network rejection events. Which of the following actions should the SysOps Administrator take to successfully configure the flow log delivery and the automated remediation path? (Select TWO).
- Attach an IAM policy to the SysOps Administrator's identity that grants the iam:PassRole permission for the IAM role associated with the flow log.Answer
- Configure a CloudWatch metric filter to extract REJECT patterns, associate it with a CloudWatch alarm, and create an Amazon EventBridge rule that triggers the Systems Manager Automation runbook when the alarm changes to the ALARM state.Answer
- CModify the trust policy of the flow logs IAM role to allow the SysOps Administrator's IAM user to perform the sts:AssumeRole action.
- DConfigure the CloudWatch Logs metric filter to directly trigger the Systems Manager Automation runbook as its target.
- ESet the log retention policy directly inside the VPC Flow Log configuration settings to automatically delete logs older than 14 days.
Answer
Attach an IAM policy to the SysOps Administrator's identity that grants the iam:PassRole permission for the IAM role associated with the flow log, and configure a CloudWatch metric filter to extract REJECT patterns, associate it with a CloudWatch alarm, and create an Amazon EventBridge rule that triggers the Systems Manager Automation runbook when the alarm changes to the ALARM state.
To create a VPC Flow Log targeting CloudWatch Logs, the IAM identity performing the configuration must be granted the 'iam:PassRole' permission on the role that VPC Flow Logs will assume to deliver the logs. To establish the remediation workflow, raw log data must first be transformed into metrics via a CloudWatch Logs metric filter, which is then mapped to a CloudWatch alarm. An EventBridge rule is then configured to listen for the alarm state changes and trigger the Systems Manager Automation runbook.
Step-by-Step Solution
Key Concept
VPC Flow Logs publishing to CloudWatch Logs requires appropriate iam:PassRole permissions for the configuring administrator, and automated remediation requires routing log-derived metrics through CloudWatch Alarms and EventBridge.