Using Console
Using CLI
<subnet-id>
with the ID of the subnet for which you want to enable Flow Logs, <log-group-name>
with the name of the CloudWatch Logs group where the logs will be stored, and <IAM-role-arn>
with the ARN of the IAM role that will be used to deliver the logs.
--max-aggregation-interval
, --log-destination-type
, --log-destination
, etc., based on your requirements.
Using Python
aws configure
command.
DeliverLogsPermissionArn
: Replace with the ARN of an IAM role that has permission to deliver logs to CloudWatch Logs.LogDestination
: Replace with the ARN of the CloudWatch Logs log group where you want to store the Flow Logs.ResourceIds
: Replace with the subnet ID where you want to enable Flow Logs.