The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Paws::Credential::InstanceProfileV2

SYNOPSIS

  use Paws::Credential::InstanceProfileV2;

  my $paws = Paws->new(config => {
    credentials => Paws::Credential::InstanceProfile->new(
      metadata_url => 'http://localhost:8000/security-credentials',
      timeout => 5,
    )
  });

DESCRIPTION

The InstanceProfileV2 credential provider is used to call retrieve AWS credentials from instances running on AWS

When running on an instance in AWS, if said instance has a Role attached to it (also named InstanceProfile), Paws can retrieve short-term credentials (and refresh them when needed) from the AWS provided "metadata service" using IMDSv2 approach.

metadata_url: Str

The section in the ini file where credentials will be looked up:

metadata_url: Str

URL for client to fetch token from

timetout: Int

Number of seconds to wait before timinig out a connection to the metadata service. It defaults to 1 second, as the metadata service is almost local, and very fast responding. Note that if set too high, and the metadata service is not present (not running on an AWS instance), the connection has to time out

ua

A user agent that has a get method. Defaults to HTTP::Tiny