aws_credential_providers 0.0.2 aws_credential_providers: ^0.0.2 copied to clipboard
Credential provider utilities for resolving AWS credentials from different sources. Used with aws_xxx_api packages.
Use individual providers:
final example1 = DynamoDB(region: 'eu-west-1', credentialsProvider: fromEnvironment);
final example2 = DynamoDB(region: 'eu-west-1', credentialsProvider: fromIni);
Chain providers:
final ddb = DynamoDB(
region: 'eu-west-1',
credentialsProvider: ({Client? client}) async =>
await fromEnvironment() ?? await fromIni(client: client),
);
Cache credentials between service calls:
final ddb = DynamoDB(
region: 'eu-west-1',
credentialsProvider: CachedCredentialProvider(fromIni).cacheAndRefreshWhenNeeded,
);