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

fix(endpoint): normalize endpoint to string when passing from client config to endpointParams #4098

Merged
merged 3 commits into from
Oct 26, 2022

Conversation

kuhe
Copy link
Contributor

@kuhe kuhe commented Oct 26, 2022

Issue

#4076
#4095

Description

convert endpoint to string when passing from client config (where it may have been converted to a v1 endpoint by resolveEndpointConfig) to the endpointParams resolver input object.

  • client.config.endpoint can be a string, V1, or V2 endpoint object
  • resolveEndpointConfig normalizes all of these to a Provider<Endpoint>
  • when the endpointParams are generated from the config mapping instructions, the provider is resolved but the object is not converted to a string, which is expected by the endpoints spec and ruleset.

Testing

  • added unit tests
  • manual testing with dynamodb client

@kuhe kuhe requested a review from a team as a code owner October 26, 2022 16:41
@kuhe
Copy link
Contributor Author

kuhe commented Oct 26, 2022

tested various commands with

const client: DynamoDBClient = new DynamoDBClient({
  region: "us-east-1",
  logger: console,
  endpoint: "https://dynamodb.us-east-1.amazonaws.com",
});

@kuhe kuhe merged commit 5da4499 into aws:main Oct 26, 2022
@kuhe kuhe deleted the fix/endpoint-url branch October 26, 2022 18:03
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants