Skip to content

stackErr-NameNotResolved/vpc-flow-log-analysis

 
 

Repository files navigation

VPC Flow Log Analysis

The code contained in this repository can analyze AWS VPC flow logs and visualize them in a graph, just like this one: example flow log graph

I have written a blog post on pfisterer.dev that details how it works, why it's useful and how you can use and adjust it for your own needs: Analyzing and Visualizing AWS VPC Flow Logs.

Installation

Use npm install to install the dependencies.

Usage

First, you need to create a .env file in the root directory with the following variables:

AWS_ACCESS_KEY=your-access-key
AWS_SECRET_ACCESS_KEY=your-secret-access-key
AWS_S3_BUCKET_NAME=vpc-flow-log-bucket-name

The Graph Generator

First, you need to create an S3 bucket and enable flow logs for your VPC. This is described in more detail in the blog post.

After setup, you can run the graph generator, which downloads flow logs from S3 and generates a graph.json file that can later be visualized by using

npm run generate-graph

The Client

After running the graph generator, you can start the client using

npm run client

This will locally serve a web page that renders the VPC flow log graph.

About

Analyze and visualize VPC flow logs from AWS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 81.7%
  • JavaScript 12.9%
  • HTML 4.2%
  • CSS 1.2%