Credential provider that provides credentials from the EC2 metadata service.
Methods | ||
---|---|---|
public
|
__construct(array $config = [])
|
# |
public
|
__invoke($previousCredentials = null): PromiseInterface
|
# |
Constants | ||
---|---|---|
public
|
CRED_PATH = 'meta-data/iam/security-credentials/'
|
# |
public
|
TOKEN_PATH = 'api/token'
|
# |
public
|
ENV_DISABLE = 'AWS_EC2_METADATA_DISABLED'
|
# |
public
|
ENV_TIMEOUT = 'AWS_METADATA_SERVICE_TIMEOUT'
|
# |
public
|
ENV_RETRIES = 'AWS_METADATA_SERVICE_NUM_ATTEMPTS'
|
# |
public
|
CFG_EC2_METADATA_V1_DISABLED = 'ec2_metadata_v1_disabled'
|
# |
public
|
CFG_EC2_METADATA_SERVICE_ENDPOINT = 'ec2_metadata_service_endpoint'
|
# |
public
|
CFG_EC2_METADATA_SERVICE_ENDPOINT_MODE = 'ec2_metadata_service_endpoint_mode'
|
# |
public
|
DEFAULT_TIMEOUT = 1.0
|
# |
public
|
DEFAULT_RETRIES = 3
|
# |
public
|
DEFAULT_TOKEN_TTL_SECONDS = 21600
|
# |
public
|
DEFAULT_AWS_EC2_METADATA_V1_DISABLED = false
|
# |
public
|
ENDPOINT_MODE_IPv4 = 'IPv4'
|
# |
public
|
ENDPOINT_MODE_IPv6 = 'IPv6'
|
# |
public
|
DEFAULT_METADATA_SERVICE_IPv4_ENDPOINT = 'http://169.254.169.254'
|
# |
public
|
DEFAULT_METADATA_SERVICE_IPv6_ENDPOINT = 'http://[fd00:ec2::254]'
|
# |