Skip to content

Query to Athena ALB access log with Partition projection

License

Notifications You must be signed in to change notification settings

struqtur/terraform-aws-athena-lb-access-logs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-aws-athena-lb-access-logs

A terraform module to create ALB Glue Catalog for Athena.

Features

  1. Glue Catalog support Athena Partition Projection. So you don't have to manage partition keys.
  2. Partition benefits reduce your data scanning cost and improve scanning speed.

Usage example

module "lb_logs" {
  source = "github.com/DingGGu/terraform-aws-athena-lb-access-logs.git"
  athena_database_s3_bucket_name = "aws-athena-query-results-${data.aws_caller_identity.current.account_id}-${data.aws_region.current.name}"
  s3_bucket_name = "<LB_ACCESS_LOG_BUCKET_NAME>"
}

Execute query on Athena.

SELECT * FROM "lb_access_log"."alb_logs" WHERE date_day = '2021/04/06' limit 10;

Reference

About

Query to Athena ALB access log with Partition projection

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HCL 100.0%