General configuration settings - Amazon SDKs and Tools
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

General configuration settings

SDKs support some general settings that configure overall SDK behaviors.

Configure this functionality by using the following:

api_versions - shared Amazon config file setting

Some Amazon services maintain multiple API versions to support backward compatibility. By default, SDK and Amazon CLI operations use the latest available API version. To require a specific API version to use for your requests, include the api_versions setting in your profile.

Default value: None. (Latest API version is used by the SDK.)

Valid values: This is a nested setting that's followed by one or more indented lines that each identify one Amazon service and the API version to use. See the documentation for the Amazon service to understand which API versions are available.

The example sets a specific API version for two Amazon services in the config file. These API versions are used only for commands that run under the profile that contains these settings. Commands for any other service use the latest version of that service's API.

api_versions = ec2 = 2015-03-01 cloudfront = 2015-09-017
ca_bundle - shared Amazon config file setting
AWS_CA_BUNDLE - environment variable

Specifies the path to a custom certificate bundle (a file with a .pem extension) to use when establishing SSL/TLS connections.

Default value: none

Valid values: Specify either the full path or a base file name. If there is a base file name, the system attempts to find the program within folders specified by the PATH environment variable.

Example of setting this value in the config file:

[default] ca_bundle = dev/apps/ca-certs/cabundle-2019mar05.pem

Linux/macOS example of setting environment variables via command line:

export AWS_CA_BUNDLE=/dev/apps/ca-certs/cabundle-2019mar05.pem

Windows example of setting environment variables via command line:

setx AWS_CA_BUNDLE C:\dev\apps\ca-certs\cabundle-2019mar05.pem
output - shared Amazon config file setting

Specifies how results are formatted in the Amazon CLI and other Amazon SDKs and tools.

Default value: json

Valid values:

  • json – The output is formatted as a JSON string.

  • yaml – The output is formatted as a YAML string.

  • yaml-stream – The output is streamed and formatted as a YAML string. Streaming allows for faster handling of large data types.

  • text – The output is formatted as multiple lines of tab-separated string values. This can be useful to pass the output to a text processor, like grep, sed, or awk.

  • table – The output is formatted as a table using the characters +|- to form the cell borders. It typically presents the information in a "human-friendly" format that is much easier to read than the others, but not as programmatically useful.

parameter_validation - shared Amazon config file setting

Specifies whether the SDK or tool attempts to validate command line parameters before sending them to the Amazon service endpoint.

Default value: true

Valid values:

  • true – The default. The SDK or tool performs client-side validation of command line parameters. This helps the SDK or tool confirm that parameters are valid, and catches some errors. The SDK or tool can reject requests that aren't valid before sending requests to the Amazon service endpoint.

  • false – The SDK or tool doesn't validate command line parameters before sending them to the Amazon service endpoint. The Amazon service endpoint is responsible for validating all requests and rejecting requests that aren't valid.

Compatibility with Amazon SDKs

The following SDKs support the features and settings described in this topic. Any partial exceptions are noted. Any JVM system property settings are supported by the Amazon SDK for Java and the Amazon SDK for Kotlin only.

SDK Supported Notes or more information
Amazon CLI v2 Partial api_versions not supported.
SDK for C++ Yes
SDK for Go V2 (1.x) Partial api_versions and parameter_validation not supported.
SDK for Go 1.x (V1) Partial api_versions and parameter_validation not supported. To use shared config file settings, you must turn on loading from the config file; see Sessions.
SDK for Java 2.x No
SDK for Java 1.x No
SDK for JavaScript 3.x Yes
SDK for JavaScript 2.x Yes
SDK for Kotlin No
SDK for .NET 3.x No
SDK for PHP 3.x Yes
SDK for Python (Boto3) Yes
SDK for Ruby 3.x Yes
SDK for Rust No
Tools for PowerShell No