Allow caller to pass in AWS client configuration#34
Allow caller to pass in AWS client configuration#34smbkr wants to merge 1 commit intoaleios-cloud:mainfrom
Conversation
|
Another option is to add an Usage would be something like: and in the implementation, something like: import { region, endpoint } from '../../helpers/general'
const docClient = new AWSClient.DynamoDB.DocumentClient({
region, // this is in the current implementation but is not actually required as the region is set globally in `helpers/general.ts`
endpoint,
});One problem with the current approach is that it only applies to the Thoughts? |
This PR adds an optional second parameter to the
EventBridge.buildandStepFunctions.buildmethods, which allows the caller to specify AWS service client configuration. This permits a user to override the default endpoint, timeout, specify a logger, etc.The behaviour when no client config is specified is the same as the current behaviour.
Closes #31
Usage example:
The use case for myself is to allow overriding the endpoint as shown above so tests can run against localstack. This will also open up the possibility of writing tests for the library itself using localstack if desired.