Monitoring Network Traffic Using Amazon VPC Traffic Mirroring

Monitoring Network Traffic Using Amazon VPC Traffic Mirroring
Monitoring Network Traffic Using Amazon VPC Traffic Mirroring

CLOUD LABS

Monitoring Network Traffic Using Amazon VPC Traffic Mirroring

In this Cloud Lab, you’ll explore the AWS Traffic Mirroring service. Also, you’ll learn to initiate traffic mirroring for an EC2 instance based on VPC Flow Logs.

11 Tasks

intermediate

1hr 30m

Certificate of Completion

Desktop OnlyDevice is not compatible.
No Setup Required
Amazon Web Services

Learning Objectives

An understanding of AWS Traffic Mirroring service and VPC Flow Logs
Familiarity with monitoring traffic and identifying malicious activity using Suricata
Hands-on experience automating traffic mirroring using Lambda functions
Working knowledge of the CloudWatch alarm using metric filters on VPC Flow Logs

Technologies
Lambda logoLambda
CloudWatch logoCloudWatch
VPC logoVPC
EC2 logoEC2
Cloud Lab Overview

AWS offers a traffic mirroring service to capture and inspect traffic within a VPC. It allows us to create a mirroring target, a filter, and a session to replicate traffic from a source to a target instance. This traffic is utilized for monitoring and security analysis.

In this Cloud Lab, you’ll explore the VPC Traffic Mirroring service. You’ll start by creating a VPC and capture traffic moving in and out of the VPC using VPC Flow Logs. Next, you’ll launch a source EC2 instance in the VPC with a simple Flask API. Additionally, you’ll launch a target EC2 instance with Suricata to monitor the mirrored traffic. Moving on, you’ll create a metric filter for accepted traffic to our EC2 instance and an alarm to detect unusually large traffic. This alarm will invoke a Lambda function containing code to automate the creation of traffic mirroring target, filter, and session. Finally, you’ll perform SQL injection attacks on the EC2 instance and trigger the CloudWatch alarm to invoke the Lambda function and launch the mirroring service. Finally, you’ll capture and monitor the mirrored traffic in the target instance and generate alerts for potential SQL injection attacks.

After completing this Cloud Lab, you can utilize the AWS Traffic Mirroring service to mirror the traffic of your EC2 instances and enhance their security and monitoring.

The following illustration shows the infrastructure you’ll build in this Cloud Lab:

Architecture diagram
Architecture diagram

Cloud Lab Tasks
1.Introduction
Getting Started
2.Virtual Private Cloud
Create a Virtual Private Cloud
Create Flow Logs
Launch the Source EC2 Instance
Launch the Target EC2 Instance
3.Traffic Mirroring
Create a Metric Filter
Create a Lambda Function
Create a CloudWatch Alarm
Observe the Traffic Using the Traffic Mirroring Session
4.Conclusion
Clean Up
Wrap Up
Labs Rules Apply
Stay within resource usage requirements.
Do not engage in cryptocurrency mining.
Do not engage in or encourage activity that is illegal.

Relevant Courses

Use the following content to review prerequisites or explore specific concepts in detail.

Trusted by 1.4 million developers working at companies including

Don’t take our word for it. See what our developers have to say.

Your method is simple, straight to the point and I can practice with it everywhere, even from my phone, that's something I have never had in other learning platforms.

Felipe Matheus
TestimonialsImg

I highly recommend Educative. The courses are well organized and easy to understand.

Adina Ong
TestimonialsImg

I prefer Educative courses because they have a nice mix of text & images. I find that with full video courses, it can often be too easy to go into passive learning mode.

Clifford Fajardo
TestimonialsImg

I prefer Educative courses because they have a nice mix of text & images. I find that with full video courses, it can often be too easy to go into passive learning mode.

Clifford Fajardo
TestimonialsImg
Don’t take our word for it. See what our developers have to say.

Your method is simple, straight to the point and I can practice with it everywhere, even from my phone, that's something I have never had in other learning platforms.

Felipe Matheus
TestimonialsImg

I highly recommend Educative. The courses are well organized and easy to understand.

Adina Ong
TestimonialsImg

I prefer Educative courses because they have a nice mix of text & images. I find that with full video courses, it can often be too easy to go into passive learning mode.

Clifford Fajardo
TestimonialsImg

Get access to Educative Cloud Labs

Course Footer Image
Course Footer Image