You can send AWS VPC Flow Logs to Microsoft Sentinel in two ways:
-
Use the native Amazon Web Services S3 connector. It reads gzip-compressed flow log files from Amazon S3, using an SQS queue to learn about new files, and writes them to the
AWSVPCFlowtable. -
Parse and filter the records first, then send them to the same table through the Azure Monitor Logs Ingestion API and a data collection rule (DCR).
This article compares the two paths, shows where filtering before Microsoft Sentinel fits, and ends with KQL queries that run on both.
Key takeaways
-
Both paths write to
AWSVPCFlow. Microsoft’s ASIM parser for AWS VPC reads that table directly, so normalized queries work with either one. -
The native connector accepts text files only: gzip-compressed, with a header row, space-delimited.
-
Microsoft rates NetFlow-style data as high volume with medium value for real-time detection. Decide which records need the analytics tier before you start ingesting.
-
Filter before Microsoft Sentinel when you need one pipeline for several destinations, a custom table for fields that
AWSVPCFlowhas no columns for, or control over what leaves your AWS account.
What VPC Flow Logs record and where AWS delivers them
VPC Flow Logs capture information about IP traffic going to and from the network interfaces in a VPC. Each record is a line of space-separated fields that summarizes one flow, a 5-tuple on one network interface, within an aggregation interval. A record holds addresses, ports, protocol, packet and byte counts, and an ACCEPT or REJECT action.
The default format includes the version 2 fields.
A custom format lets you add fields from later versions, such as vpc-id, tcp-flags, flow-direction, and traffic-path.
Fields from versions 2 through 5 map to AWSVPCFlow columns, so the examples here use a custom format with all of them.
A record looks like this:
5 123456789012 eni-0a1b2c3d4e5f67890 10.0.1.25 203.0.113.10 49152 443 6 12 4320 1791547200 1791547260 ACCEPT OK vpc-0abc1234def567890 subnet-0123456789abcdef0 i-0123456789abcdef0 3 IPv4 10.0.1.25 203.0.113.10 us-east-1 use1-az2 - - - - egress 8
An instance at 10.0.1.25 sent 12 packets (4,320 bytes) to 203.0.113.10 on TCP port 443 within one minute.
The flow went out through an internet gateway (egress, traffic-path 8).
The TCP flags value 3 combines SYN and FIN, so the instance opened and closed the connection within the interval.
A hyphen marks fields that don’t apply to a record.
AWS publishes flow logs to Amazon CloudWatch Logs, Amazon S3, or Amazon Data Firehose. Both methods in this post read from S3, where AWS writes gzip-compressed files every 5 minutes, in plain text by default or in Apache Parquet.
Flow records reach S3 minutes after the traffic happens. The maximum aggregation interval is 10 minutes by default or 1 minute if you set it. Network interfaces on Nitro-based instances use 1 minute or less regardless of the setting. AWS then typically delivers to S3 in about 10 minutes, on a best-effort basis. Every detection you build on flow logs inherits that delay.
Flow logs also skip some traffic by design, including queries to the Amazon DNS server, instance metadata requests to 169.254.169.254, Amazon Time Sync traffic, and DHCP. For DNS visibility, add Route 53 Resolver query logs, which Microsoft Sentinel ingests through its own AWS connector.
Which method should you use to get VPC Flow Logs to Microsoft Sentinel?
| Native Amazon Web Services S3 connector | NXLog Agent with the Logs Ingestion API | |
|---|---|---|
AWS resources |
S3 bucket, SQS queue, OIDC identity provider, IAM role |
S3 bucket, SQS queue, EC2 instance with an IAM role |
Azure resources |
Amazon Web Services solution from the Content hub |
Entra application, DCE, DCR |
Flow log file format |
Gzip-compressed text with a header row, space-delimited |
Gzip-compressed text, parsed in the field order you configure |
Destination table |
|
|
Where filtering happens |
Workspace transformation, after data reaches Azure |
NXLog Agent, before data leaves your AWS account, plus an optional DCR transformation |
Fields from versions 8 to 11 |
No matching |
Route them to a custom table |
Other destinations |
Microsoft Sentinel only |
Any NXLog Agent output |
What you operate |
Connector settings |
Host, agent, script, and credentials |
Best fit |
AWS-only flow logs without pre-processing |
Filtering, tiering, or one pipeline across sources |
Choose the native connector if Microsoft Sentinel is the only destination for your flow logs and you don’t need to change records before ingestion. Microsoft runs the collection, and you can still filter inside Azure with a workspace transformation.
Choose NXLog Agent if you need to drop records before ingestion, send different subsets to different tiers or tools, or run one agent fleet for flow logs and your other telemetry. You run the collector yourself.
Still on the HTTP Data Collector API? Microsoft ended support for it on 14 September 2026. Ingestion still works for clients that use TLS 1.2 or later, but build new pipelines on the Logs Ingestion API. In NXLog Agent, use the Microsoft Azure Logs Ingestion output module instead of the Microsoft Azure Sentinel output module, which uses the HTTP Data Collector API with a workspace ID and shared key.
Option 1: Use the native Amazon Web Services S3 connector
Microsoft’s setup guide comes down to three steps. The automatic setup script needs PowerShell and the AWS CLI, with the CLI configured for your account before you run it.
-
Install the Amazon Web Services solution from the Content hub in Microsoft Sentinel.
-
Open the Amazon Web Services S3 connector page and run the setup script. It creates an OIDC web identity provider and an IAM role with minimal permissions, plus the S3 bucket and SQS queue if you need them. The script can take up to 30 minutes.
-
Enter the role ARN and SQS URL in the connector, then select
AWSVPCFlowas the destination table.
Check two requirements before you start. Flow log files must be gzip-compressed CSV with a header row and a space delimiter, so Parquet output won’t work. And each SQS queue serves one log type and one S3 path: log types can share a bucket, but not a path.
The connector supports a workspace transformation DCR on AWSVPCFlow, so you can filter after the data reaches Azure.
For example, source | where LogStatus != "NODATA" drops records from intervals without traffic.
If you’ve enabled Microsoft Sentinel on the workspace, Azure Monitor doesn’t charge for transformations into Analytics tables, however much data they filter out.
After 31 March 2027, Microsoft Sentinel is available only in the Microsoft Defender portal. If you still work in the Azure portal, Microsoft’s transition guide covers the move.
Option 2: Filter with NXLog Agent, then use the Logs Ingestion API
This path adds a processing step between S3 and Microsoft Sentinel.
NXLog Agent runs in your AWS account, reads each new flow log file, parses the records, drops the ones you don’t need, and sends the rest to AWSVPCFlow through the Logs Ingestion API.
VPC Flow Logs --> S3 bucket --(s3:ObjectCreated)--> SQS queue
|
v
NXLog Agent on EC2 (IAM role): im_python reader,
xm_csv parsing, filtering, om_azuremonitor
|
v
Logs Ingestion API (DCE + DCR) --> AWSVPCFlow
What you set up in AWS and Azure
On the AWS side, add an S3 event notification for s3:ObjectCreated:* on your flow log prefix, with an SQS queue as the destination.
Set the queue’s visibility timeout longer than an agent needs to process a batch of files.
Attach a dead-letter queue so a damaged file stops retrying.
Run NXLog Agent on a Linux EC2 instance with an IAM role, which we recommend over static access keys.
On the Azure side, you need three things:
-
A Microsoft Entra application with a certificate or a client secret. The Microsoft Azure Logs Ingestion output module supports both.
-
A data collection endpoint (DCE). Microsoft requires a DCE only for private link or for DCRs created without their own ingestion endpoint, but the Microsoft Azure Logs Ingestion output module reference documents the DCE URI for the
URLdirective. -
A DCR in the same region as your workspace, with the Monitoring Metrics Publisher role assigned to the application. Our Microsoft Azure Logs Ingestion output module documentation notes that the role assignment can take up to 30 minutes to take effect.
The DCR declares an input stream that matches the JSON NXLog Agent sends, converts AWS’s Unix timestamps, and writes to the built-in table through the Microsoft-AWSVPCFlow output stream.
In the stream, declare Version, SrcPort, DstPort, Protocol, and TcpFlags as int, and Packets, Bytes, StartTime, and EndTime as long.
The transformation then narrows Packets to the table’s int type.
You deploy the DCR with the Data Collection Rules REST API.
Its transformation looks like this:
source
| extend Start = make_datetime(1970, 1, 1) + StartTime * 1s, End = make_datetime(1970, 1, 1) + EndTime * 1s
| extend TimeGenerated = iif(isnull(Start), now(), Start), Packets = toint(Packets)
| project-away StartTime, EndTime
Three design details matter:
- TrafficType, not Type
-
The flow log’s
typefield (IPv4, IPv6, or EFA) needs another name becauseTypeis a reserved column name that holds the table name.AWSVPCFlowstores the value inTrafficType. - Timestamp conversion
-
DCR transformations support a subset of KQL, and
unixtime_seconds_todatetime()isn’t part of it. The transform uses datetime arithmetic instead, which the subset includes. - TimeGenerated
-
The transform sets it to the flow start time, which is how the table reference describes data from the connector.
How NXLog Agent reads, parses, and filters the files
NXLog Agent’s Python input module calls a read_data() function that you write.
Here, it reads S3 notifications from the queue, streams each gzip file, and posts one event per line, with the line in the $raw_event field.
It deletes an SQS message only after it posts every line from the file the message names.
If anything fails, the message returns to the queue after the visibility timeout, and an agent processes the file again.
Delivery is at least once, so a retry can repeat some records.
NXLog Agent’s native Amazon S3 input module polls a bucket on a schedule instead, so this path uses SQS notifications to pick up each file as it lands and to share the work across agents.
Our AWS integration guide uses the Python input module to pull CloudWatch Logs.
Create the flow log with this custom format, which covers every field from versions 2 to 5 in the order the parser expects:
${version} ${account-id} ${interface-id} ${srcaddr} ${dstaddr} ${srcport} ${dstport} ${protocol} ${packets} ${bytes} ${start} ${end} ${action} ${log-status} ${vpc-id} ${subnet-id} ${instance-id} ${tcp-flags} ${type} ${pkt-srcaddr} ${pkt-dstaddr} ${region} ${az-id} ${sublocation-type} ${sublocation-id} ${pkt-src-aws-service} ${pkt-dst-aws-service} ${flow-direction} ${traffic-path}
The NXLog Agent configuration parses that format, filters it, and sends the result to the DCR:
<Extension vpcflow>
Module xm_csv
Fields Version, AccountId, InterfaceId, SrcAddr, DstAddr, \
SrcPort, DstPort, Protocol, Packets, Bytes, StartTime, \
EndTime, Action, LogStatus, VpcId, SubnetId, InstanceId, \
TcpFlags, TrafficType, PktSrcAddr, PktDstAddr, Region, \
AzId, SublocationType, SublocationId, PktSrcAwsService, \
PktDstAwsService, FlowDirection, TrafficPath
FieldTypes integer, string, string, string, string, \
integer, integer, integer, integer, integer, integer, \
integer, string, string, string, string, string, \
integer, string, string, string, string, \
string, string, string, string, \
string, string, string
Delimiter ' '
UndefValue -
</Extension>
<Extension flow_fields>
Module xm_rewrite
Keep Version, AccountId, InterfaceId, SrcAddr, DstAddr, \
SrcPort, DstPort, Protocol, Packets, Bytes, StartTime, \
EndTime, Action, LogStatus, VpcId, SubnetId, InstanceId, \
TcpFlags, TrafficType, PktSrcAddr, PktDstAddr, Region, \
AzId, SublocationType, SublocationId, PktSrcAwsService, \
PktDstAwsService, FlowDirection, TrafficPath
</Extension>
<Extension json>
Module xm_json
</Extension>
<Input vpc_flow_logs>
Module im_python
PythonCode /opt/nxlog/etc/vpc_flow_s3.py
<Exec>
if $raw_event =~ /^version / drop(); (1)
vpcflow->parse_csv();
if $LogStatus == 'NODATA' drop(); (2)
flow_fields->process();
to_json();
</Exec>
</Input>
<Output sentinel>
Module om_azuremonitor
URL %DCE_URL%
DcrImmutableId %DCR_ID%
StreamName Custom-VPCFlowRaw
TenantId %TENANT_ID%
ClientId %CLIENT_ID%
CertThumbprint %CERT_THUMBPRINT%
CertKeyFile %CERT_KEY_FILE%
Compression gzip
OutputRequestSize 900000 (3)
PersistLogqueue TRUE (4)
SyncLogqueue TRUE
</Output>
<Route vpcflow_to_sentinel>
Path vpc_flow_logs => sentinel
</Route>
| 1 | Each flow log file starts with a header row. |
| 2 | NODATA means no traffic on the interface during the interval. |
| 3 | Stay under the 1 MB per-call limit of the Logs Ingestion API. |
| 4 | Keep queued records on disk until delivery succeeds. |
The Python reader that the Python input module loads, vpc_flow_s3.py, is the one part you write yourself, as described above.
What this configuration does:
-
The
vpcflowinstance of the CSV extension module parses each line into fields named afterAWSVPCFlowcolumns, in the order of the flow log’s format string. If you change one, change the other.FieldTypesmakes the ports, counters, and timestamps numbers, which the DCR stream expects.Delimiterset to' 'makes a space the separator (the quotes are required), andUndefValueset to-leaves fields that don’t apply unset, so they arrive in Microsoft Sentinel as empty values instead of a literal hyphen. -
The
Execblock drops each file’s header row and NODATA records. It keeps SKIPDATA records, which mark intervals where AWS skipped some records, so you can see gaps in your flow data. -
The
flow_fieldsinstance of the Rewrite extension module keeps only the parsed fields, andto_json()writes them as the JSON the DCR stream expects. As the Microsoft Azure Logs Ingestion output module documentation notes, the server silently discards records that don’t match the structure the DCR expects. -
OutputRequestSizekeeps each request under the 1 MB per-call limit of the Logs Ingestion API. The module’s default is 64 MB. -
PersistLogqueueandSyncLogqueuekeep records the agent has accepted on disk until the Microsoft Azure Logs Ingestion output module delivers them, so deleting the SQS message doesn’t risk losing them in a crash. Our data-loss guide covers the trade-offs.
Scale out with NXLog Pipeline Manager
As flow log volume grows, you’ll likely run more than one collector.
In NXLog Pipeline Manager, you create the configuration once and assign it to every collector agent.
You can also adapt one of the configuration templates.
NXLog Agent has built-in failover, and the Microsoft Azure Logs Ingestion output module accepts several URL directives and fails over between them.
Because the agents share one SQS queue, you add capacity by starting another collector.
Decide what belongs in the analytics tier
Microsoft’s log retention guidance lists NetFlow and firewall logs as examples of secondary security data: high volume, limited value per record, and suited to the data lake tier. Its direct ingestion guidance rates NetFlow as medium value for real-time detection, high value for hunting, and a suitable fit for lake-only ingestion. VPC flow records carry the same kind of 5-tuple metadata, so the same reasoning applies.
Data in the data lake tier doesn’t support real-time analytics rules or the standard hunting experience.
You query it with KQL jobs and notebooks instead, so moving a table there trades real-time detection for cost.
You set the tier per table, and AWSVPCFlow supports lake-only ingestion.
You can apply that guidance in two ways:
- Split at the source
-
Send rejected flows and egress to public addresses to
AWSVPCFlowin the analytics tier, and every record to a lake-only table. Create that custom table first, such asAWSVPCFlowAll_CLwith the same columns, because a DCR writes only to existing tables. Then add a second stream and data flow to the DCR, and switch the table to the data lake tier in table management. - Lake first, summarize later
-
Keep
AWSVPCFlowlake-only and run KQL jobs that write summaries to the analytics tier, an approach the same Microsoft retention guidance describes.
If your S3 bucket already keeps the full record for Athena, you might skip the second Microsoft Sentinel table.
With NXLog Agent, the split is two Microsoft Azure Logs Ingestion output module instances on one route.
The lake output sends every record to the second stream.
The analytics output’s Exec block keeps only rejected flows and egress to IPv4 addresses outside RFC 1918, and sends SKIPDATA records to the lake table only:
if $LogStatus == 'SKIPDATA' drop();
if not (($Action == 'REJECT') or
($FlowDirection == 'egress' and
$DstAddr !~ /^(10\.|192\.168\.|172\.(1[6-9]|2[0-9]|3[01])\.)/))
{
drop();
}
IPv6 destinations never match this pattern, so the analytics output treats all IPv6 egress as public.
How Azure bills and throttles this setup:
-
In a workspace with Microsoft Sentinel enabled, DCR transformations into Analytics tables carry no processing charge. For Auxiliary Logs tables, Azure Monitor charges processing on all incoming data and ingestion on what it stores.
-
Each DCR has documented thresholds of 2 GB per minute and 12,000 requests per minute. Microsoft says the service might absorb gradual growth beyond them, though throttling can still occur. Filtering at the source keeps a busy pipeline further from those thresholds.
-
For current prices, see Microsoft Sentinel pricing.
Verify ingestion and start detecting with KQL
Confirm that records arrive and look the way you expect:
AWSVPCFlow
| where TimeGenerated > ago(1h)
| summarize Records = count(), Newest = max(TimeGenerated) by Action, LogStatus
Filter on TrafficType when you need IPv4 or IPv6 traffic.
Type holds the table name, so a filter such as Type == "IPv4" returns no rows.
Find sources that hit many ports or hosts in a short window and got rejected:
AWSVPCFlow
| where TimeGenerated > ago(1h)
| where Action == "REJECT" and LogStatus == "OK"
| summarize DistinctPorts = dcount(DstPort), DistinctHosts = dcount(DstAddr), Flows = count()
by SrcAddr, bin(TimeGenerated, 5m)
| where DistinctPorts > 25 or DistinctHosts > 25
| order by DistinctPorts desc
The same approach finds large transfers to public IPv4 addresses: filter on FlowDirection == "egress", exclude private destinations with ipv4_is_private(), and sum Bytes per source and destination.
To run the scan logic across every normalized network source, use the ASIM unifying parser, _Im_NetworkSession.
Microsoft’s AWS VPC parser maps REJECT to Deny and returns only rows whose LogStatus is OK.
Treat every threshold here as a starting point. Baseline your own traffic before you turn a query into an analytics rule.
Troubleshooting checklist
- No rows and no errors
-
Field names in the JSON must match the DCR stream exactly, including case.
- HTTP 403 responses
-
The application needs Monitoring Metrics Publisher on the DCR, and new role assignments can take up to 30 minutes.
- Connection failures
-
The Logs Ingestion API requires TLS 1.2 or later as of 1 March 2026.
- Throttling responses
-
You’ve reached a per-DCR limit. Wait for the time in the response’s Retry-After header, then retry.
- Odd timestamps after a backfill
-
Azure Monitor replaces a
TimeGeneratedvalue that’s more than two days old, or more than a day in the future, with the time it received the record. TheStartandEndcolumns keep the original flow times. - No data from the native connector
-
First data can take 20 to 30 minutes to appear. Confirm the files are gzip-compressed text with a header row, that the S3 notification filters on the .gz suffix, and that each SQS queue serves one log type and path. Microsoft’s troubleshooting guide covers the rest.
Get started
Both paths write to AWSVPCFlow, so the KQL in this post runs on either.
With NXLog Agent, you decide what Microsoft Sentinel receives before ingestion, and the same agents can collect the rest of your telemetry.
Start with the Free plan or learn more about NXLog Agent.
FAQ
- Which Microsoft Sentinel table stores AWS VPC Flow Logs?
-
AWSVPCFlow. The native Amazon Web Services S3 connector writes to it, and the table also accepts Logs Ingestion API data through theMicrosoft-AWSVPCFlowoutput stream. The flow log’stypefield lands in theTrafficTypecolumn. - Can Microsoft Sentinel ingest VPC Flow Logs in Parquet format?
-
Not through the native connector, which requires gzip-compressed CSV with a header row and a space delimiter. If you also want Parquet for Athena, create a second flow log subscription: AWS allows up to 250 per resource per account.
- Can I send VPC Flow Logs to the Microsoft Sentinel data lake only?
-
Yes.
AWSVPCFlowsupports lake-only ingestion, but data in the data lake tier doesn’t support real-time analytics rules. - How long until VPC Flow Logs show up in Microsoft Sentinel?
-
Expect minutes. Each record waits out its aggregation interval of 1 or 10 minutes, then AWS typically delivers to S3 in about 10 minutes on a best-effort basis. Queue polling and ingestion add more time.
- What about Google Cloud VPC Flow Logs?
-
Microsoft Sentinel stores them in the
GCPVPCFlowtable and announced a Google Cloud Platform VPC Flow connector, built on the Codeless Connector Framework, in preview in June 2025.GCPVPCFlowalso accepts Logs Ingestion API data, so NXLog Agent can read flow logs you export to Pub/Sub with the Google Cloud Pub/Sub input module and send them the same way.