Registry / aws / athena-client

athena-client

JSON →
library1.0.34jsnpmunverified

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-client
INSTALL
IMPORT
SIG · ATHENA-CLIENT
A
athena-client
awsjavascriptv1.0.34
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

athenaClient
import { createClient, setConcurrentExecMax } from 'athena-client';
import athenaClient from 'athena-client';
This package does not export a default; use named imports.
createClient
import { createClient } from 'athena-client';
const { createClient } = require('athena-client');
ESM is supported; avoid require() for consistency.
concurrentExecMax
import { setConcurrentExecMax } from 'athena-client';
Use this function instead of the deprecated concurrentExecMax config property.

Shows how to create a client with configuration, set concurrency limit, and execute a query using Promises.

import { createClient, setConcurrentExecMax } from 'athena-client'; setConcurrentExecMax(3); const client = createClient( { bucketUri: process.env.BUCKET_URI ?? 's3://my-athena-results', database: 'mydb', pollingInterval: 500, workGroup: 'primary', }, { region: process.env.AWS_REGION ?? 'us-east-1', accessKeyId: process.env.AWS_ACCESS_KEY_ID ?? '', secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY ?? '', } ); async function run() { try { const data = await client.execute('SELECT 1').toPromise(); console.log(data); } catch (err) { console.error(err); } } run();
Debug
Known issues
breakingconcurrentExecMax property in clientConfig is deprecated; use setConcurrentExecMax() instead.
fix
Replace concurrentExecMax in clientConfig with setConcurrentExecMax(max) call before creating client.
affects: >=2.0.0
breakingVersion 2.x has breaking changes from 1.x; callback and Promise APIs differ.
fix
Migrate from 1.x to 2.x by updating to the new API (e.g., client.execute().toPromise() instead of client.executePromise()).
affects: >=2.0.0
deprecatedconcurrentExecMax clientConfig property is deprecated.
fix
Use setConcurrentExecMax() function.
affects: >=2.0.0
gotchabucketUri must be a valid S3 URI (e.g., s3://bucket/path/) and the bucket must allow Athena writes.
fix
Ensure the S3 bucket exists and has appropriate permissions for Athena.
affects: >=1.0.0
gotchaPolling interval defaults to 1000ms; for faster queries, set a lower value.
fix
Adjust pollingInterval in clientConfig to suit query execution time.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: athena_client_1.default is not a function
Incorrect default import syntax when the package exports named exports only.
fix
Use named imports: import { createClient } from 'athena-client';
Cannot find module 'athena-client'
Package not installed or import path misspelled.
fix
Run 'npm install athena-client' and verify package name in import.
TimeoutError: Query execution timed out
queryTimeout set too low or query takes longer than timeout value.
fix
Increase queryTimeout or ensure query completes within set time.
Error: The bucket URI must be a valid S3 URI starting with 's3://'
bucketUri missing or malformed.
fix
Set bucketUri to something like 's3://my-bucket/path/'
Upgrade
Version history
1.0.34latest on npm
Audit
Dependencies
aws-sdkrequiredRequired dependency for AWS Athena and S3 service interactions.
Agent activity
58 hits · last 30 days
node
50
OpenAI (training)
1
Resources
athena-client — npm install athena-client · libregistry