feat(bedrock-sdk): allow for custom provider chain resolvers #474
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.
to allow also being executed in a non-node environment.
I'm trying to modify the bedrock sdk code so that it's executable in a non-node environment (e.g. vercel's edge runtime), as a first step I swapped the
fromNodeProviderChain
with a dynamic import and as a second step the client creation now allows for defining a custom provider chain resolver, which should enable the following usage:whenever a
providerChainResolver
is not defined, thefromNodeProviderChain
from@aws-sdk/credential-providers
should be used.this should help fixing issue: #380 + #314 (comment)
I'm looking for a way to automatically test this new implementation, any ideas? I saw that for testing the bedrock sdk there is a script called "test" which executes:
bin/check-test-server && yarn jest
butbin/check-test-server
does not exist in the public repository, are there other ways to test this?