async function getEndpoint(config) {
  if (typeof config.endpoint === 'function') {
    return await config.endpoint()
  }

  const region = await config.region()
  return new URL(`https://dynamodb.${region}.amazonaws.com`)
}
AWS sdk v 3.194?.0 released a breaking change.
See: https://github.com/aws/aws-sdk-js-v3/issues/4122
What this means is config.endpoint is not always a function
unless you provide an endpoint override to your library constructor
This function will derive the endpoint in that scenario by grabbing the region
and building the URL
@param config