athena-client is a simple Node.js and TypeScript client for AWS Athena, version 2.5.1. It wraps the AWS SDK to simplify query execution, supporting callbacks, Promises, and streams. Key features include configurable polling intervals, retry logic, concurrent execution limits, encryption options for S3 query results, and workgroup support. It is actively maintained with a stable API, but users must migrate from v1.x due to breaking changes. The package ships TypeScript definitions and is commonly used in Lambda functions.
npm install athena-clientVerified import paths — ran on the pinned version, not inferred.
Shows how to create a client with configuration, set concurrency limit, and execute a query using Promises.
Replace concurrentExecMax in clientConfig with setConcurrentExecMax(max) call before creating client.
Migrate from 1.x to 2.x by updating to the new API (e.g., client.execute().toPromise() instead of client.executePromise()).
Use setConcurrentExecMax() function.
Ensure the S3 bucket exists and has appropriate permissions for Athena.
Adjust pollingInterval in clientConfig to suit query execution time.
Use named imports: import { createClient } from 'athena-client';Run 'npm install athena-client' and verify package name in import.
Increase queryTimeout or ensure query completes within set time.
Set bucketUri to something like 's3://my-bucket/path/'