Failed to specify endpoint for TimestreamQueryClient #2304
-
Hi, I have a code like this to connect to Timestream using a TimestreamQueryClient and run a simple query "select 1". It could work fine if I do not specify endpoint, that is without line "Unable to perform "Query" without endpoint discovery. Make sure your environment variable "AWS_ENABLE_ENDPOINT_DISCOVERY", your config file's variable "endpoint_discovery_enabled" and ClientConfiguration's "enableEndpointDiscovery" are explicitly set to true or not set at all."
Regards, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Today I comment the endpointOverride line.
Then after I succeeded to connect to Timestream, I used a DescribeEndpointsRequest to get valid endpoints. The code is like this. The result epVec contains only 1 element, which is
|
Beta Was this translation helpful? Give feedback.
-
Hi @RoyZhang2022 , Could you please try to upgrade to one of the latest 1.10.X versions? Best regards, |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
Hi @RoyZhang2022 ,
I can confirm the issue exists in the 1.9.X version of the SDK:
in TimestreamQueryClient.cpp#L108-L111 there is a condition to not enable endpoint discovery if endpoint was overridden. I'm sorry for this issue and inconvenience caused.
Could you please try to upgrade to one of the latest 1.10.X versions?
We have implemented a new endpoints interface, as well as made changes how endpoint discovery integrates, it is now no longer disabled in case of endpoints override.
Best regards,
Sergey