Skip to content

Instantly share code, notes, and snippets.

@joekiller
Created December 20, 2017 14:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joekiller/94f372e51a050d0320e9edf74337082a to your computer and use it in GitHub Desktop.
Save joekiller/94f372e51a050d0320e9edf74337082a to your computer and use it in GitHub Desktop.
Query alb_logs via time in AWS athena
-- Setup an AWS Athena Application Load Balancer table via
-- http://docs.aws.amazon.com/athena/latest/ug/application-load-balancer-logs.html
-- Use the following to query between timestamps.
SELECT * FROM "sampledb"."alb_logs"
where date_parse(time, '%Y-%m-%dT%H:%i:%s.%fZ')
between TIMESTAMP'2017-12-20 03:00:00' and TIMESTAMP'2017-12-20 05:00:00'
limit 10;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment