Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Create a flow log that publishes to Amazon Data Firehose

Focus mode
Create a flow log that publishes to Amazon Data Firehose - Amazon Virtual Private Cloud

You can create flow logs for your VPCs, subnets, or network interfaces.

Prerequisites
To create a flow log that publishes to Amazon Data Firehose
  1. Do one of the following:

  2. Choose Actions, Create flow log.

  3. For Filter, specify the type of traffic to log.

    • Accept – Log only accepted traffic

    • Reject – Log only rejected traffic

    • All – Log accepted and rejected traffic

  4. For Maximum aggregation interval, choose the maximum period of time during which a flow is captured and aggregated into one flow log record.

  5. For Destination, choose either of the following options:

    • Send to Amazon Data Firehose in the same account – The delivery stream and the resource to monitor are in the same account.

    • Send to Amazon Data Firehose in a different account – The delivery stream and the resource to monitor are in different accounts.

  6. For Amazon Data Firehose stream name, choose the delivery stream that you created.

  7. [Cross account delivery only] For Service access, choose an existing IAM service role for cross account delivery that has permissions to publish logs or choose Set up permissions to open the IAM console and create a service role.

  8. For Log record format, specify the format for the flow log record.

    • To use the default flow log record format, choose AWS default format.

    • To create a custom format, choose Custom format. For Log format, choose the fields to include in the flow log record.

  9. For Additional metadata, select if you want to include metadata from Amazon ECS in the log format.

  10. (Optional) Choose Add tag to apply tags to the flow log.

  11. Choose Create flow log.

To create a flow log that publishes to Amazon Data Firehose using the command line

Use one of the following commands:

The following AWS CLI example creates a flow log that captures all traffic for the specified VPC and delivers the flow logs to the specified Amazon Data Firehose delivery stream in the same account.

aws ec2 create-flow-logs --traffic-type ALL \ --resource-type VPC \ --resource-ids vpc-00112233344556677 \ --log-destination-type kinesis-data-firehose \ --log-destination arn:aws:firehose:us-east-1:123456789012:deliverystream/flowlogs_stream

The following AWS CLI example creates a flow log that captures all traffic for the specified VPC and delivers the flow logs to the specified Amazon Data Firehose delivery stream in a different account.

aws ec2 create-flow-logs --traffic-type ALL \ --resource-type VPC \ --resource-ids vpc-00112233344556677 \ --log-destination-type kinesis-data-firehose \ --log-destination arn:aws:firehose:us-east-1:123456789012:deliverystream/flowlogs_stream \ --deliver-logs-permission-arn arn:aws:iam::source-account:role/mySourceRole \ --deliver-cross-account-role arn:aws:iam::destination-account:role/AWSLogDeliveryFirehoseCrossAccountRole

As a result of creating the flow log, you can get the flow log data from the destination that you configured for the delivery stream.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.