Skip to content

rooty0/CloudTrail-Athena-pretty-logs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS CloudTrail Athena pretty logs

It's pretty cool to have Athena querying your CloudTrail Logs. The only issue is sometimes it's hard to track results since the output is somewhat raw. This small tool formats the output making it more human readable. Screen Shot 2021-03-26 at 4 53 39 PM

Usage

1. Clone this repository (in the command line)

git clone https://github.com/rooty0/CloudTrail-Athena-pretty-logs.git
cd CloudTrail-Athena-pretty-logs.git
mkdir realdata

2. Execute your Athena query, click Download results button

3. Download your CSV result file to the realdata/ folder

4. Run it (see Quick or Manual method)

Quick

This is tested on MacOS. Just run from console:

./run.sh

The script starts Python server and opens your web browser

If this is not working for you just follow steps below

Manual

You can run this using the following python command:

python -m SimpleHTTPServer

...or with Python 3:

python -m http.server

navigate to http://localhost:8000/cloudtrail.html

5. The page you open will be blank. You need to type the file name to "Data read from file" box to load your results

Dependencies

  • Bootstrap 4 - Responsive HTML, CSS and Javascript framework
  • jQuery - a fast, small, and feature-rich JavaScript library
  • jQuery CSV - Parse CSV (Comma Separated Values) to Javascript arrays or dictionaries.
  • DataTables - add advanced interaction controls to any HTML table.
  • JavaScript Cookie - A simple, lightweight JavaScript API for handling browser cookies
  • Moment.js - Parse, validate, manipulate, and display dates in javascript.

Other Contributors