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.


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


Default: 'false'

When this is set to true we will write the full HTTP request and response as an debug log entry. Make sure you pass a logger to the Client.

Note: This will have an negative impact on performance.


Default: 'default'

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


The AWS access key id used for authentication.


The AWS access key secret used for authentication.


The AWS session token passed alongside temporary credentials.

See AWS documentation and CLI reference for more information.


Default: '~/.aws/credentials'

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


Default: '~/.aws/config'

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


Default: ''


The Amazon Resource Name (ARN) of the role that the client should be "assuming" after authentication.


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


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

An identifier for the assumed role session


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


Default: 'false'

Enable the endpoint discovery when the operation support it See Endpoint discovery for more information.

S3 specific Configuration reference


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.


Default: 'false'

Set to true to send requests in multiple chunks. This prevents reading the file twice to calculate the signature, but is not always allowed by Non-AWS S3 endpoints.