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

Region configuration does not work without endpoint override in TimestreamDataSource #34

Open
antonliauchuk-tealium opened this issue Jan 26, 2023 · 0 comments

Comments

@antonliauchuk-tealium
Copy link

antonliauchuk-tealium commented Jan 26, 2023

software.amazon.timestream.jdbc.TimestreamDataSource#getProperties implementation uses region value only if endpoint is not null:
`if (this.endpoint != null) {
if (this.endpoint.isEmpty()) {
final String error = Error.lookup(Error.INVALID_ENDPOINT);
LOGGER.severe(error);
throw new SQLException(error);
}

  if (this.region == null) {
    final String error = Error.lookup(Error.MISSING_SERVICE_REGION);
    LOGGER.severe(error);
    throw new SQLException(error);
  }

  properties.put(TimestreamConnectionProperty.ENDPOINT.getConnectionProperty(), this.endpoint);
  properties.put(TimestreamConnectionProperty.REGION.getConnectionProperty(), this.region);
}`

It's impossible to use endpointDiscovery with region override with current implementation. AmazonTimestreamQueryClient supports region override without endpoint value.

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

1 participant