Creates one or more flow logs to capture information about IP traffic for a specific network interface,
subnet, or VPC.
Flow log data for a monitored network interface is recorded as flow log records, which are log events
consisting of fields that describe the traffic flow. For more information, see
Flow log records
in the Amazon Virtual Private Cloud User Guide.
When publishing to CloudWatch Logs, flow log records are published to a log group, and each network
interface has a unique log stream in the log group. When publishing to Amazon S3, flow log records for all
of the monitored network interfaces are published to a single log file object that is stored in the specified
bucket.
For more information, see VPC Flow Logs in the Amazon Virtual Private Cloud User Guide.
example
Use a bare-bones client and the command you need to make an API call.
Creates one or more flow logs to capture information about IP traffic for a specific network interface, subnet, or VPC.
Flow log data for a monitored network interface is recorded as flow log records, which are log events consisting of fields that describe the traffic flow. For more information, see Flow log records in the Amazon Virtual Private Cloud User Guide.
When publishing to CloudWatch Logs, flow log records are published to a log group, and each network interface has a unique log stream in the log group. When publishing to Amazon S3, flow log records for all of the monitored network interfaces are published to a single log file object that is stored in the specified bucket.
For more information, see VPC Flow Logs in the Amazon Virtual Private Cloud User Guide.
Use a bare-bones client and the command you need to make an API call.
import { EC2Client, CreateFlowLogsCommand } from "@aws-sdk/client-ec2"; // ES Modules import // const { EC2Client, CreateFlowLogsCommand } = require("@aws-sdk/client-ec2"); // CommonJS import const client = new EC2Client(config); const command = new CreateFlowLogsCommand(input); const response = await client.send(command);
CreateFlowLogsCommandInput for command's
input
shape.CreateFlowLogsCommandOutput for command's
response
shape.config for EC2Client's
config
shape.