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', ]);
Below is a list of all supported configuration keys, their default value and what they are used for.
The AWS region the client should be targeting.
Note: Region can also be defined by providing a
@regionparameter in operation's input
When this is set to
true we will write the full HTTP request and response as
debug log entry. Make sure you pass a logger to the
Note: This will have an negative impact on performance.
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.
The credentials file to look in when using credential and configuration files for authentication.
The config file to look in when using credential and configuration files for authentication.
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.
S3 specific Configuration reference¶
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.
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.