VPC Flow Logs

Definition

VPC Flow Logs is a feature in Amazon Web Services (AWS) that captures information about the IP traffic going to and from network interfaces in a Virtual Private Cloud (VPC). These logs help in monitoring network traffic, diagnosing connectivity issues, and ensuring compliance with security policies. Flow logs can be published to Amazon CloudWatch Logs or Amazon S3 for storage and analysis.

Secure Settings Example

{
  "Type": "AWS::EC2::FlowLog",
  "Properties": {
    "ResourceId": "vpc-12345678",
    "ResourceType": "VPC",
    "TrafficType": "ALL",
    "LogDestinationType": "cloud-watch-logs",
    "LogGroupName": "/aws/vpc/flowlogs",
    "DeliverLogsPermissionArn": "arn:aws:iam::123456789012:role/FlowLogsRole"
  }
}

Insecure Settings Example

{
  "Type": "AWS::EC2::FlowLog",
  "Properties": {
    "ResourceId": "vpc-12345678",
    "ResourceType": "VPC",
    "TrafficType": "REJECT",
    "LogDestinationType": "cloud-watch-logs",
    "LogGroupName": "/aws/vpc/flowlogs"
  }
}