#these indicate the metadata service is unavailable or has no profile setup
credentials
rescueExcon::Errors::Error=>e
Fog::Logger.warning("Unable to fetch credentials: #{e.message}")
super
end
else
super
end
end
end
moduleConnectionMethods
defrefresh_credentials_if_expired
refresh_credentialsifcredentials_expired?
end
private
defcredentials_expired?
@use_iam_profile&&
(!@aws_credentials_expire_at||
(@aws_credentials_expire_at&&Fog::Time.now>@aws_credentials_expire_at-15))#new credentials become available from around 5 minutes before expiration time