AWS - VPC Flow Logs
In this post, We will see what is a VPC flow log and how to capture the same for an EC2 instance.
VPC Flow Logs is a feature that enables you to capture information about the IP traffic going to and from network interfaces in your VPC.
Flow log data can be published to the following locations: Amazon CloudWatch Logs, Amazon S3, or Amazon Kinesis Data Firehose. After you create a flow log, you can retrieve and view the flow log records in the log group, bucket, or delivery stream that you configured.
I have an EC2 instance running HTTP delivering static content on port 80.
Next, I am going to create a cloud watch log group which will be the destination for VPC flow logs.
Next, we need to
create an IAM role to allow the VPC flow log service to create log stream and we attach
that IAM role to the flow log service while capturing VPC flow logs.
We are done with creating an IAM role with the required policy. Let’s proceed with VPC flow log capture. Select the EC2 network interface -> Create Flow Log.
Good one
ReplyDelete