AWS.FileSystemCredentials — AWS SDK for JavaScript (original) (raw)

We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Overview

Note:

This feature is not supported in the browser environment of the SDK.

Represents credentials from a JSON file on disk. If the credentials expire, the SDK can refresh() the credentials from the file.

The format of the file should be similar to the options passed toAWS.Config:

{accessKeyId: 'akid', secretAccessKey: 'secret', sessionToken: 'optional'}

Constructor Summarycollapse

Property Summarycollapse

Properties inherited from AWS.Credentials

expired, expireTime, accessKeyId, secretAccessKey, sessionToken, expiryWindow

Method Summarycollapse

Methods inherited from AWS.Credentials

needsRefresh, get, getPromise, refreshPromise

Constructor Details

new AWS.FileSystemCredentials(filename) ⇒ void

Property Details

filename ⇒ String

Returns the path to the JSON file on disk containing the credentials.

Method Details

refresh(callback) ⇒ void

Loads the credentials from the filename on disk.