Amazon Athena

Overview

Amazon Athena is an interactive query service that lets you analyze data directly in Amazon S3 using standard SQL.

In Zenskar, you can use Athena as a data source to query, process, and sync usage or event data stored in your Amazon S3 buckets. The Athena connector enables Zenskar to fetch metering data efficiently, making it available for billing, reporting, and analytics within the Zenskar platform.

The Amazon Athena data-source connector allows you to:

  • Connect securely to your Athena environment through AWS credentials.
  • Query and import data directly from Amazon S3 using predefined databases and tables.
  • Automate periodic data syncs for accurate and up-to-date billing computations.
  • Maintain full control over data visibility and access through AWS IAM and Lake Formation permissions.

Prerequisites

To use this connector, you will need the following:

  • An AWS account
  • An S3 bucket where the data will be written
  • An Amazon Lake Formation database where tables will be created (one per stream)
  • AWS credentials: Access Key Id and Secret Access Key

Set up an Amazon Athena data-source connector via Zenskar dashboard

  1. Log into your Zenskar dashboard.
  2. In the left side bar, click Usage > Data Sources.
  3. In the top-right corner, click + ADD DATA SOURCE.
  4. On the Add New Data Source page, configure the ClickHouse connector.
  5. Click on the SAVE SOURCE button.

Connector configuration

General configuration

FieldDescriptionRequired
Source NameEnter a unique name for this data source.Yes
Source TypeSelect Amazon Athena from the dropdown menu.Yes

Connector configuration

FieldDescriptionRequired
Database NameThe database in which the tables will be created. See the Amazon Lake Formation guide for instructions on creating a new database.Yes
BucketThe Amazon S3 bucket where data will be written. See the Amazon S3 guide for instructions on creating a new bucket.Yes
AWS Access Key IDThe access key for the IAM user. Follow the AWS IAM guide to create a new user. Select Programmatic access to generate an Access Key IDSecret Access Key pair.Yes
AWS Secret Access KeyThe secret key corresponding to the Access Key ID.Yes
AWS RegionThe AWS region in which your resources are deployed.Yes

Addendum

Permissions

The IAM user or role must have access to the following AWS services:

  • Amazon Lake Formation
  • Amazon Glue
  • Amazon S3

You can use the AWS policy generator to help you generate an appropriate policy.

Ensure that the role or user you will use has appropriate permissions on the database in Amazon Lake Formation. You will find more information about Lake Formation permissions in the Amazon Lake Formation Developer Guide.