Fix: disable endpoint discovery when a custom endpoint is set #475
+32
−87
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: #452
In v1 of aws-sdk-go, endpoint discovery is disabled if
Endpoint
is set (see the v1 docs and search forEnableEndpointDiscovery
to see the note about this).This was changed in v2 of aws-sdk-go to
auto
, which enables it by default for timestream since it's required as noted here.Timestream uses the DescribeEndpoints API call to execute this endpoint discovery. It does by calling an endpoint with the following base URL
https://query.timestream.us-east-2.amazonaws.com/
. If a user is running this from a VPC without allowing outbound connections to it, then the call will fail.This PR handles this by disabling endpoint discovery only when an endpoint is explicitly set. This brings back the same behaviour that we had in v1 that allowed users to use a VPC configured timestream without needing to allow outbound traffic to
https://query.timestream.us-east-2.amazonaws.com/
over the public internet.yarn.lock
change happened when i ranyarn && yarn build
pkg/main.go
and to the files in.vscode
were to make it possible to debug the backend changes. the nested.vscode/.vscode
directory contained outdated configuration so i removed it.