DefaultAwsCredentialsManager.getCredentialProvider()
Home > @backstage/integration-aws-node
> DefaultAwsCredentialsManager
> getCredentialProvider
Returns an AwsCredentialProvider for a given AWS account.
Signature:
getCredentialProvider(opts?: AwsCredentialProviderOptions): Promise<AwsCredentialProvider>;
Parameters
Parameter |
Type |
Description |
---|---|---|
opts |
(Optional) the AWS account ID or AWS resource ARN |
Promise<AwsCredentialProvider>
A promise of AwsCredentialProvider.
Example
const { provider } = await getCredentialProvider({
accountId: '0123456789012',
})
const { provider } = await getCredentialProvider({
arn: 'arn:aws:ecs:us-west-2:123456789012:service/my-http-service'
})