@aws/aurora-dsql-postgresjs-connector 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Aurora DSQL Connector for Postgres.js
|
|
2
2
|
|
|
3
|
+
[](https://github.com/awslabs/aurora-dsql-nodejs-connector/tree/main/packages/postgres-js)
|
|
4
|
+
[](https://github.com/awslabs/aurora-dsql-nodejs-connector/blob/main/LICENSE)
|
|
5
|
+
[](https://www.npmjs.com/package/@aws/aurora-dsql-postgresjs-connector)
|
|
6
|
+
[](https://discord.com/invite/nEF6ksFWru)
|
|
7
|
+
|
|
3
8
|
The Aurora DSQL Connector for Postgres.js is a Node.js connector built on [Postgres.js](https://github.com/porsager/postgres)
|
|
4
9
|
that integrates IAM Authentication for connecting JavaScript applications to Amazon Aurora DSQL clusters.
|
|
5
10
|
|
|
@@ -7,7 +12,7 @@ The Aurora DSQL Connector for Postgres.js is designed as an authentication plugi
|
|
|
7
12
|
Postgres.js client to enable applications to authenticate with Amazon Aurora DSQL using IAM credentials. The connector
|
|
8
13
|
does not connect directly to the database, but provides seamless IAM authentication on top of the underlying Postgres.js driver.
|
|
9
14
|
|
|
10
|
-
##
|
|
15
|
+
## About the Connector
|
|
11
16
|
|
|
12
17
|
Amazon Aurora DSQL is a distributed SQL database service that provides high availability and scalability for
|
|
13
18
|
PostgreSQL-compatible applications. Aurora DSQL requires IAM-based authentication with time-limited tokens that
|
|
@@ -19,21 +24,33 @@ client that handles IAM token generation, allowing users to connect to Aurora DS
|
|
|
19
24
|
The Aurora DSQL Connector for Postgres.js works with most versions of Postgres.js. Users provide their own version by installing
|
|
20
25
|
Postgres.js directly.
|
|
21
26
|
|
|
27
|
+
### What is Aurora DSQL Authentication?
|
|
28
|
+
|
|
29
|
+
In Aurora DSQL, authentication involves:
|
|
30
|
+
|
|
31
|
+
- **IAM Authentication:** All connections use IAM-based authentication with time-limited tokens
|
|
32
|
+
- **Token Generation:** Authentication tokens are generated using AWS credentials and have configurable lifetimes
|
|
33
|
+
|
|
34
|
+
The Aurora DSQL Connector for Postgres.js is designed to understand these requirements and automatically generate IAM authentication tokens when establishing connections.
|
|
35
|
+
|
|
22
36
|
### Features
|
|
23
37
|
|
|
24
38
|
- **Automatic IAM Authentication** - Handles DSQL token generation and refresh
|
|
25
39
|
- **Built on Postgres.js** - Leverages the fast PostgreSQL client for Node.js
|
|
40
|
+
- **Seamless Integration** - Works with existing Postgres.js connection patterns
|
|
26
41
|
- **Region Auto-Discovery** - Extracts AWS region from DSQL cluster hostname
|
|
27
42
|
- **Full TypeScript Support** - Provides full type safety
|
|
28
|
-
- **
|
|
43
|
+
- **AWS Credentials Support** - Supports various AWS credential providers (default, profile-based, custom)
|
|
44
|
+
- **Connection Pooling Compatibility** - Works seamlessly with Postgres.js' built-in connection pooling
|
|
29
45
|
|
|
30
46
|
## Quick start guide
|
|
31
47
|
|
|
32
48
|
### Requirements
|
|
33
49
|
|
|
34
50
|
- Node.js 20+
|
|
51
|
+
- [Access to an Aurora DSQL cluster](https://docs.aws.amazon.com/aurora-dsql/latest/userguide/getting-started.html)
|
|
52
|
+
- Set up appropriate IAM permissions to allow your application to connect to Aurora DSQL.
|
|
35
53
|
- AWS credentials configured (via AWS CLI, environment variables, or IAM roles)
|
|
36
|
-
- Access to an Aurora DSQL cluster
|
|
37
54
|
|
|
38
55
|
### Installation
|
|
39
56
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { auroraDSQLPostgres } from './client';
|
|
2
|
-
export type { AuroraDSQLConfig } from './client';
|
|
1
|
+
export { auroraDSQLPostgres } from './client.js';
|
|
2
|
+
export type { AuroraDSQLConfig } from './client.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,kBAAkB,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,kBAAkB,EAAC,MAAM,aAAa,CAAC;AAC/C,YAAY,EAAC,gBAAgB,EAAC,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAC,kBAAkB,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAC,kBAAkB,EAAC,MAAM,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws/aurora-dsql-postgresjs-connector",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "An AWS Aurora DSQL connector with IAM authentication for Postgres.js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@aws-sdk/credential-providers": "^3.901.0",
|
|
35
|
-
"@aws-sdk/dsql-signer": "^3.
|
|
35
|
+
"@aws-sdk/dsql-signer": "^3.940.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"postgres": "^3.4.7"
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@eslint/js": "^9.37.0",
|
|
42
42
|
"@types/jest": "^29.5.14",
|
|
43
|
-
"@types/node": "^20.19.
|
|
44
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
45
|
-
"@typescript-eslint/parser": "^8.
|
|
46
|
-
"eslint": "^9.
|
|
43
|
+
"@types/node": "^20.19.25",
|
|
44
|
+
"@typescript-eslint/eslint-plugin": "^8.48.0",
|
|
45
|
+
"@typescript-eslint/parser": "^8.48.0",
|
|
46
|
+
"eslint": "^9.39.1",
|
|
47
47
|
"eslint-plugin-header": "^3.1.1",
|
|
48
48
|
"jest": "^29.7.0",
|
|
49
49
|
"postgres": "^3.4.7",
|