Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERR_INVALID_URL when using IAM authentication token to connect to aurora postgres db #188

Open
mjperrone opened this issue Aug 26, 2024 · 0 comments

Comments

@mjperrone
Copy link

mjperrone commented Aug 26, 2024

When I try to use kysely-codegen to connect to my postgres RDS instance in AWS Aurora and I set the DATABASE_URL to the connection string generated via this documented method, kysely-codegen --dialect postgres gives me the following error:

• Loaded environment variables from .env file.
• Using dialect 'postgres'.
node:internal/url:797
    this.#updateContext(bindingUrl.parse(input, base));

TypeError: Invalid URL
    at new URL (node:internal/url:797:36)
    at parse (/Users/mperrone/code/project/repo/node_modules/pg-connection-string/index.js:29:14)
    at new ConnectionParameters (/Users/mperrone/code/project/repo/node_modules/pg/lib/connection-parameters.js:56:42)
    at new Client (/Users/mperrone/code/project/repo/node_modules/pg/lib/client.js:18:33)
    at BoundPool.newClient (/Users/mperrone/code/project/repo/node_modules/pg-pool/index.js:218:20)
    at BoundPool.connect (/Users/mperrone/code/project/repo/node_modules/pg-pool/index.js:212:10)
    at PostgresDriver.acquireConnection (/Users/mperrone/code/project/repo/node_modules/kysely/dist/cjs/dialect/postgres/postgres-driver.js:21:41)
    at RuntimeDriver.acquireConnection (/Users/mperrone/code/project/repo/node_modules/kysely/dist/cjs/driver/runtime-driver.js:31:47)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async DefaultConnectionProvider.provideConnection (/Users/mperrone/code/project/repo/node_modules/kysely/dist/cjs/driver/default-connection-provider.js:10:28) {
  code: 'ERR_INVALID_URL',
  input: '<redacted>',
  base: 'postgres://base'
}

Is this type of connection string supported?

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants
@mjperrone and others