AWS VPC Flow Logs
Updated Nov 22, 2026 · today
VPC Flow Logs can be delivered to CloudWatch Logs, and from there to Epok through the shared setup on AWS: logs and metrics.
On this page: What you getTurn on logsMetricsUseful searchesTroubleshooting
What you get
- Logs: each flow-log line, from the group you choose (for example
/vpc/flowlogs). The line is stored as text in_msg; the fields inside it (source and destination address, port, action, bytes) are not parsed yet. - Metrics: none. Flow logs publish no CloudWatch metric namespace, so nothing arrives through the metric stream.
Each event also gets _time, a level detected from words in the line, service (the last part of the group name), log_group, log_stream, cloud.provider, cloud.account_id and cloud.region.
Turn on logs
- In the VPC console, open Flow logs, choose Create flow log, and set the destination to Send to CloudWatch Logs.
- Pick the log group (or let AWS create it) and the IAM role. The role needs
logs:CreateLogGroup,logs:CreateLogStreamandlogs:PutLogEvents. - Add the group to
EPOK_LOG_GROUPSand run the setup on AWS: logs and metrics.
Metrics
None. VPC Flow Logs do not produce CloudWatch metrics, so there is no metric namespace for this page. For traffic-level metrics, use AWS/EC2 (in the default list) or AWS/NATGateway (stream every namespace with EPOK_METRIC_NAMESPACES=all).
Useful searches
log_group:"/vpc/flowlogs" _msg:"REJECT" # rejected traffic
log_group:"/vpc/flowlogs" _msg:"10.0.1.5" # one source or destination address
log_group:"/vpc/flowlogs" _time:1h | stats by (_msg) count() # top flow-log shapesBecause the line is one text value, searches use _msg: for the contents. Filtering by source address, port or action as separate fields is not supported yet.
Troubleshooting
- No group appears. The flow log was created with an S3 destination instead of CloudWatch Logs. S3 delivery is not supported yet; recreate the flow log with the CloudWatch Logs destination.
- The IAM role is refused. The role must allow
logs:PutLogEventson the group. Use the role the console offers, or add the threelogs:permissions. - Fields are not searchable.Expected: flow-log lines are stored as text, so search with
_msg:. Parsed fields come later.
Next
- AWS: logs and metrics: the one CloudFormation stack this page feeds into.
- AWS WAF: the other log that arrives through CloudWatch Logs.