amazon web services – Is it necessary to implement a credentials cache when using fromTemporaryCredentials to instantiate an AWS SDK v3 client?
import { DynamoDBClient } from '@aws-sdk/client-dynamodb'
import { fromTemporaryCredentials } from '@aws-sdk/credential-providers'
import { DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb'
const ddbClient = new DynamoDBClient({
credentials: fromTemporaryCredentials({
params: {
RoleArn: ROLE_ARN,
RoleSessionName: ROLE_SESSION_NAME,
},
})
})
const ddbDocClient = DynamoDBDocumentClient.from(
ddbClient,
{},
)
Does the client receive the credential provider function and handle it based on the token’s duration or does it always recreate the token? Compromising the rate limit?
Read more here: Source link
