You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that the awsV4Signature() function is loaded as an axios request interceptor in @lifeomic/alpha, which (I think) means that the function is invoked on each request. Since a new instance of defaultProvider() is instantiated at https://github.com/LifeOmic/alpha/blob/master/src/interceptors/aws-v4-signature.ts#L68, each lambda call is re-instantiating those credentials - meaning, re-invoking the ECS container metadata endpoint, if loading from ECS (or EC2).
It would be better if @lifeomic/alpha instantiated defaultProvider() just one time and re-used the same credential provider in the interceptor.
It seems that the
awsV4Signature()
function is loaded as an axios request interceptor in@lifeomic/alpha
, which (I think) means that the function is invoked on each request. Since a new instance ofdefaultProvider()
is instantiated at https://github.com/LifeOmic/alpha/blob/master/src/interceptors/aws-v4-signature.ts#L68, each lambda call is re-instantiating those credentials - meaning, re-invoking the ECS container metadata endpoint, if loading from ECS (or EC2).It would be better if
@lifeomic/alpha
instantiateddefaultProvider()
just one time and re-used the same credential provider in the interceptor.e.g.
See https://github.com/JupiterOne/sdk/pull/930/files#r1270091324
Also, I'd recommend setting default retries in the
defaultProvider()
, like so:The text was updated successfully, but these errors were encountered: