class

Amazonite::Core::InstanceMetadataCredentialsProvider

Inherits Amazonite::Core::CredentialsProvider < Reference < Object

EC2 instance profile credentials via IMDSv2 - https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html

Constants

IMDS_HOST = "169.254.169.254"
Log = ::Log.for(self)

Constructors

new(env : Fetcher, connect_timeout : Time::Span = 1.second, read_timeout : Time::Span = 1.second)
Source

Instance methods

credentials

broad rescue is deliberate: off an EC2 host there is no config signal distinguishing "not applicable" from "broken," and this must never hang or raise into a caller building a Config on a non-EC2 machine

Source