Configuration to enable Traffic Mirroring from a network interface (ENI) of an Amazon EC2 instance, which can then be used for monitoring and security analysis. Traffic Mirroring supports filters and packet truncation so that only traffic of interest is monitored.

To enable Traffic Mirroring, the following template configures the following: 

  • Traffic Mirror Filter: Configure filter rules to specify which packets are selected to be copied.
  • Traffic Mirror Target: Configure the destination where mirrored packets are sent to. Targets can be network interfaces of EC2 instances or a Network Load Balancer (NLB).
  • Traffic Mirror Session: Establishes the relationship between the mirror filter and target specified, and specifies the source network interface (ENI) to mirror traffic from. 

TrafficMirrorSession
AWS::EC2::TrafficMirrorSession


TrafficMirrorTarget
AWS::EC2::TrafficMirrorTarget


TrafficMirrorFilter
AWS::EC2::TrafficMirrorFilter


CloudFormation Template

Share Template