Configuration

There are some configuration you can pass to an API client. Use an instance of the Configuration class or a plain array.

use AsyncAws\Sqs\SqsClient; use AsyncAws\Core\Configuration; $config = Configuration::create([ 'region' => 'eu-central-1', ]); $sqs = new SqsClient($config); // Or with an array $sqs = new SqsClient([ 'region' => 'eu-central-1', ]);

Configuration reference

Below is a list of all supported configuration keys, their default value and what they are used for.

region

Default: 'us-east-1'

The AWS region the client should be targeting.

Note: Region can also be defined by providing a @region parameter in operation's input

profile

Default: 'default'

The name of the AWS Profile configured when using credential and configuration files for authentication.

accessKeyId

The AWS access key id used for authentication.

accessKeySecret

The AWS access key secret used for authentication.

sessionToken

The AWS session token passed alongside temporary credentials.

See AWS documentation and CLI reference for more information.

sharedCredentialsFile

Default: '~/.aws/credentials'

The credentials file to look in when using credential and configuration files for authentication.

sharedConfigFile

Default: '~/.aws/config'

The config file to look in when using credential and configuration files for authentication.

endpoint

Default: 'https://%service%.%region%.amazonaws.com'

roleArn

The Amazon Resource Name (ARN) of the role that the caller is assuming when using the WebIdentity Provider

webIdentityTokenFile

Path to the file that contains the OAuth 2.0 access token when using the WebIdentity Provider

roleSessionName

Default: 'async-aws-' followed by random chars

An identifier for the assumed role session

containerCredentialsRelativeUri

The relative path that is used to fetch credentials inside and ECS instance. See IAM Roles for Tasks for more information.

S3 specific Configuration reference

pathStyleEndpoint

Default: 'false'

Set to true to send requests to an S3 path style endpoint by default. See Virtual Hosting of Buckets about path style vs virtual host style.