A terraform module that creates resources to be able to query Load Balancer Access Logs via Athena according to this guide: https://docs.aws.amazon.com/athena/latest/ug/application-load-balancer-logs.html.
- Creates an Athena Database
- Creates an Athena Named Query that creates the table with the documented schema
module "athena-lb-logs" {
source = "github.com/solsglasses/terraform-aws-athena-lb-logs.git""
name = "mylbaccesslogs"
s3_bucket_name = "${module.s3_bucket.s3_bucket_id}"
}
- Go to the Athena console and click on Saved Queries https://console.aws.amazon.com/athena/saved-queries/home
- Click the new saved query that is named
<custom_name>-create-table
and Run it. You only have to do it once. - That's all, try a query
select * from lb_logs limit 100;