Sha256: fae4fc92630a62675c7f955cb55bf20ace3f4a8a42ca67e3347ae4c64c87ad24

Contents?: true

Size: 775 Bytes

Versions: 3

Compression:

Stored size: 775 Bytes

Contents

require_relative "abstract_factory"

class AwsAssumeRole::Credentials::Factories::InstanceProfile < AwsAssumeRole::Credentials::Factories::AbstractFactory
    type :instance_role_provider
    priority 40

    def initialize(options = {})
        options[:retries] ||= options[:instance_profile_credentials_retries] || 0
        options[:http_open_timeout] ||= options[:instance_profile_credentials_timeout] || 1
        options[:http_read_timeout] ||= options[:instance_profile_credentials_timeout] || 1
        @credentials = if ENV["AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"]
                           Aws::ECSCredentials.new(options)
                       else
                           Aws::InstanceProfileCredentials.new(options)
                       end
    end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
aws_assume_role-0.2.2 lib/aws_assume_role/credentials/factories/instance_profile.rb
aws_assume_role-0.2.0 lib/aws_assume_role/credentials/factories/instance_profile.rb
aws_assume_role-0.1.2 lib/aws_assume_role/credentials/factories/instance_profile.rb