Class: AWS.RemoteCredentials
- Inherits:
-
AWS.Credentials
- Object
- AWS.Credentials
- AWS.RemoteCredentials
- Defined in:
- lib/credentials/remote_credentials.js
Overview
This feature is not supported in the browser environment of the SDK.
Represents credentials received from specified URI.
This class will request refreshable credentials from the relative URI specified by the AWS_CONTAINER_CREDENTIALS_RELATIVE_URI or the AWS_CONTAINER_CREDENTIALS_FULL_URI environment variable. If valid credentials are returned in the response, these will be used with zero configuration.
This credentials class will by default timeout after 1 second of inactivity and retry 3 times. If your requests to the relative URI are timing out, you can increase the value by configuring them directly:
AWS.config.credentials = new AWS.RemoteCredentials({
httpOptions: { timeout: 5000 }, // 5 second timeout
maxRetries: 10, // retry 10 times
retryDelayOptions: { base: 200 } // see AWS.Config for information
});
Constructor Summary
-
new AWS.RemoteCredentials(options) ⇒ void
constructor
Property Summary
Properties inherited from AWS.Credentials
expired, expireTime, accessKeyId, secretAccessKey, sessionToken, expiryWindow
Method Summary
-
refresh(callback) ⇒ void
Loads the credentials from the relative URI specified by container.