Class InstanceProfileProvider
Credential provider that provides credentials from the EC2 metadata service.
Methods Summary
-
__construct ( array $config = [] )
The constructor accepts the following options:
-
__invoke ( $previousCredentials = null )
Loads instance profile credentials.
Methods Details
__construct ( array $config = [] )
The constructor accepts the following options:
- timeout: Connection timeout, in seconds.
- profile: Optional EC2 profile name, if known.
- retries: Optional number of retries to be attempted.
Parameters
array | $config = [] | Configuration options. |
GuzzleHttp\Promise\PromiseInterface
__invoke (
$previousCredentials = null
)
Constants summary
string |
SERVER_URI
|
#
'http://169.254.169.254/latest/'
|
string |
CRED_PATH
|
#
'meta-data/iam/security-credentials/'
|
string |
TOKEN_PATH
|
#
'api/token'
|
string |
ENV_DISABLE
|
#
'AWS_EC2_METADATA_DISABLED'
|
string |
ENV_TIMEOUT
|
#
'AWS_METADATA_SERVICE_TIMEOUT'
|
string |
ENV_RETRIES
|
#
'AWS_METADATA_SERVICE_NUM_ATTEMPTS'
|