1

I'm using AWS' Application Load Balancer and writing access logs to S3.

Wanting to access/query this access logs, I stumbled across https://aws.amazon.com/premiumsupport/knowledge-center/analyze-logs-athena/ and this SO post View AWS ALB access logs in one place

All seems pretty simple - Athena, create table which ingests the log files and run queries.

However I don't see any records and I suspect the reason is that Athena expects text files and the ALB generated all logfiles with .gz extension, so apparently gzip'ed. I haven't found a config at the ALB level which says "write gzipped logs".

Any ideas if queries via Athena are still possible or if I can modify the ALB config to write plain text?

Thomas
  • 1,119
  • 9
  • 24
  • Athena handles gzipped files just fine, there is probably something else that is the cause. Please provide more context, like the table DDL, and perhaps a listing of the files. – Theo Jun 07 '19 at 12:28
  • Can you confirm the s3 location that you have used with along your DDL and also if any partitions present.If it is a partitioned table then you need to run msck repair table to add these details to table metadata. – Prabhakar Reddy Jun 09 '19 at 04:37
  • Thanks for clarifying @Theo. Will try again later this week. – Thomas Jun 10 '19 at 01:34
  • @Theo - Thanks. My mistake - specifying the right bucket location incl prefix correctly resolves it. – Thomas Jun 18 '19 at 08:54

0 Answers0