Soru

Zorluk: KolayVPC Flow Logs and Network Monitoring

An application running on an Amazon EC2 instance in a private subnet is unable to connect to an external database. To determine if outbound network connection attempts are being blocked, a SysOps Administrator decides to enable VPC Flow Logs for the subnet and publish the logs to a new Amazon CloudWatch Logs group.

Which of the following actions must the administrator perform to implement this configuration? (Select TWO.)

  1. Create an IAM role with a trust policy that allows the vpc-flow-logs.amazonaws.com service principal to assume the role.Cevap
  2. Set the traffic filter setting on the flow log to REJECT.Cevap
  3. C
    Associate an IAM policy with the CloudWatch Logs group that grants iam:PassRole permissions to the SysOps Administrator.
  4. D
    Configure a log retention policy of zero days on the destination CloudWatch Logs group to enable real-time log delivery.
  5. E
    Create an Amazon EventBridge rule that detects subnet traffic activity and routes it to the CloudWatch Logs group.

Cevap

Create an IAM role with a trust policy that allows the VPC Flow Logs service principal to assume the role, and set the traffic filter on the flow log to REJECT.
The correct actions are to create an IAM role that trusts the VPC Flow Logs service principal to assume the role, and to set the flow log filter to REJECT. To publish flow logs to Amazon CloudWatch Logs, the VPC Flow Logs service requires permissions to create log streams and publish log events to the target log group, which is achieved by assuming a configured IAM role. Furthermore, because the administrator is specifically troubleshooting blocked outbound connection attempts, setting the filter to REJECT isolates the relevant traffic records.

Adım Adım Çözüm

1
Select the appropriate traffic filter for the troubleshooting scenario.
Filter set to REJECT.
Since the administrator is investigating blocked outbound packets, only rejected traffic records need to be captured to find the issue.
2
Establish the necessary IAM permissions to deliver logs to CloudWatch Logs.
An IAM role created with a trust policy that lists vpc-flow-logs.amazonaws.com in the Principal block.
VPC Flow Logs requires permission to write to CloudWatch Logs on behalf of the account owner, which is authorized by the service assuming this role.

Anahtar Kavram

VPC Flow Logs destination delivery to CloudWatch Logs requires a service trust relationship (AssumeRole) to write logs, and filtering can be customized to capture only accepted, rejected, or all traffic.
Bu soruyu puanla