Closed mbonig closed 4 years ago
Ok, well I can tell you how I fixed this, but I don't think it's right:
export function createClient(conf?: ClientConfig): DynamoDBClient {
const _conf: Doc = deriveConfig(conf);
// added this:
_conf.cache.refresh();
const dyno: DynamoDBClient = {} as DynamoDBClient;
for (const op of OPS) {
dyno[camelCase(op)] = baseOp.bind(null, _conf, op);
}
return dyno;
}
I say this isn't right because A) it doesn't await the refresh, so could be a ticking timebomb B) I'm not convinced this is the right place to do the initial refresh (or maybe the refresh should happen immediately).
the v0.3.0
release fixes those config and auth errors
Issue is resolved with v0.3.0
Simple test:
Results in this error:
Note the above code uses a slight modification of this module due to the other issues I've mentioned previously.