r/aws•
simbyy

Amazon Athena Custom/Dynamic Front End?

discussion

I know building a front end for Athena is fairly common, but I’m looking for some resources on a previously executed frontend for Athena with user generated query inputs.

I want to use some kind of Intellisense to help the user out too, so if you have any library recommendations pls let me know.

Thanks!

Posted Sep 22, 2020, 12:35 PM UTC

46
tronpablo•

Amazon Athena is managed Apache Presto. Does presto have existing solution that works for you?

2
simbyyOP•

That’s a great idea that I’m going to start exploring now, thank you!

1
twratl•

So just released this feature to production last week. Went with the ACE editor for SQL query input. Used bootstrap-table for the results of the query (including export but if you could be exporting millions of rows look at just using S3 presigned URLs to download the CSV results of the query). The backend is ALB -> Lambda that executes the queries and returns a presigned S3 URL to download the query results and inject them into the bootstrap table.

Since queries can take a while to run I suggest having one API call to start the query and return the query ID. Then another API call to check status of the query given the ID. Once the query is in a final state (completed, error, etc) return the S3 presigned URL from the status API. Otherwise return a “still processing message”. Have the status API be called every X seconds to check for completion.

2
simbyyOP•

Thanks, that sounds great! Is there a particular reason that “Athena-express” wouldn’t have worked for you?

1
twratl•

Never stumbled across it. But our entire lambda backend (this Athena thing Is one small part of the overall app) is in python so we would probably have passed on using node for this. Also a lambda can only return up to 1MB in response to an ALB invocation so a large query result may not fit in the response (hence using S3 results).

Honestly the backend was super easy to write. The front end took a bit more work to be customized to what we wanted it to look like (it does more than just query, there is a table creation wizard, sample queries, and basic/advanced editors).

The intent behind the feature is to allow people in our org to query their logs that are being shipped to our central logging account. With this feature, our users don’t require access to the logging account since Lambda can assume a role to run the queries. And we can easily scope permissions since the application knows which accounts users have access to.

1
akshaysharma072020•

Amazon Antena is used to solve complex problems in a very short time. Amazon Antena is launched in 2016. And it is a tool for data analytics. Amazon Antena helps to make it easy to analyze data on Amazon S3, making use of standard SQL.

Antena Suitable for Data Analytics

  1. Ease of Implementation
  2. Pay Per Query
  3. Speed
  4. Security
  5. No Server
  6. Integrated
  7. Available

Performance of Antena

  • Data Partitioning
  • Compress the Files
  • Optimize File sizes
  • Bucketing Data
  • Optimization of ORDER

I must say Amazon Antena is one of the most promising data analytics tools. For more details visit this link https://www.janbasktraining.com/blog/amazon-athena/

Hope This Helps!

1