Skip to content

AwsCredentialsProvider

AWS credentials as a static object or an async factory.

type AwsCredentialsProvider = 
  | AwsCredentials
| () => Promise<AwsCredentials>;

Defined in: src/utils/aws/sigv4.ts:60

AWS credentials as a static object or an async factory.

Remarks

Pass a factory to fetch fresh temporary credentials on every use — the browser-safe pattern, mirroring the SDK’s async apiKey factories.

Example

const credentials: AwsCredentialsProvider = async () => {
  const res = await fetch('/api/aws-temp-credentials');
  return res.json(); // { accessKeyId, secretAccessKey, sessionToken }
};

© 2026 CompositeVoice. All rights reserved.

Font size
Contrast
Motion
Transparency