Movatterモバイル変換


[0]ホーム

URL:


AWS SDKs and tools settings reference - AWS SDKs and Tools
DocumentationReference Guide
Creating service clientsPrecedence of settingsUnderstanding the settings pages of this guideConfig file settings listCredentials file settings listEnvironment variables listJVM system properties list

AWS SDKs and tools settings reference

SDKs provide language-specific APIs for AWS services. They take care of some of the heavy lifting necessary in successfully making API calls, including authentication, retry behavior, and more. To do this, the SDKs have flexible strategies to obtain credentials to use for your requests, to maintain settings to use with each service, and to obtain values to use for global settings.

You can find detailed information about configuration settings in the following sections:

Creating service clients

To programmatically access AWS services, SDKs use a client class/object for each AWS service. For example, if your application needs to access Amazon EC2, your application creates an Amazon EC2 client object to interface with that service. You then use the service client to make requests to that AWS service. In most SDKs, a service client object is immutable, so you must create a new client for each service to which you make requests and for making requests to the same service using a different configuration.

Precedence of settings

Global settings configure features, credential providers, and other functionality that are supported by most SDKs and have a broad impact across AWS services. All SDKs have a series of places (or sources) that they check in order to find a value for global settings. The following is the setting lookup precedence:

  1. Any explicit setting set in the code or on a service client itself takes precedence over anything else.

    • Some settings can be set on a per-operation basis, and can be changed as needed for each operation that you invoke. For the AWS CLI or AWS Tools for PowerShell, these take the form of per-operation parameters that you enter on the command line. For an SDK, explicit assignments can take the form of a parameter that you set when you instantiate an AWS service client or configuration object, or sometimes when you call an individual API.

  2. Java/Kotlin only: The JVM system property for the setting is checked. If it's set, that value is used to configure the client.

  3. The environment variable is checked. If it's set, that value is used to configure the client.

  4. The SDK checks the sharedcredentials file for the setting. If it's set, the client uses it.

  5. The sharedconfig file for the setting. If the setting is present, the SDK uses it.

    • TheAWS_PROFILE environment variable or theaws.profile JVM system property can be used to specify which profile that the SDK loads.

  6. Any default value provided by the SDK source code itself is used last.

The order determines which methods take precedence and override others. For example, if you set up a profile in the sharedconfig file, it's only found and used after the SDK or tool checks the other places first. This means that if you put a setting in thecredentials file, it is used instead of one found in theconfig file. If you configure an environment variable with a setting and value, it would override that setting in both thecredentials andconfig files. And finally, a setting on the individual operation (AWS CLI command-line parameter or API parameter) or in code would override all other values for that one command.

Understanding the settings pages of this guide

The pages within theSettings reference section of this guide detail the available settings that can be set through various mechanisms. The tables that follow list the config and credential file settings, environment variables, and (for Java and Kotlin SDKs) the JVM settings that can be used outside of your code to configure the feature. Each linked topic in each list takes you to the corresponding settings page.

Each credential provider or feature has a page where the settings that are used to configure that functionality are listed. For each setting, you can often set the value either by adding the setting to a configuration file, or by setting an environment variable, or (for Java and Kotlin only) by setting a JVM system property. Each setting lists all supported methods of setting the value in a block above the details of the description. Although theprecedence varies, the resulting functionality is the same regardless of how you set it.

The description will include the default value, if any, that takes effect if you do nothing. It also defines what a valid value is for that setting.

For example, let's look at a setting from theRequest compression feature page.

Thedisable_request_compression example setting's information documents the following:

At the bottom of each feature page there is aSupport by AWS SDKs and tools table.

This table shows whether your SDK supports the settings that are listed on the page. TheSupported column indicates the support level with the following values:

Config file settings list

The settings listed in the following table can be assigned in the shared AWSconfig file. They are global and affect all AWS services. SDKs and tools may also support unique settings and environment variables. To see the settings and environment variables supported by only an individual SDK or tool, see that specific SDK or tool guide.

Setting nameDetails
account_id_endpoint_modeAccount-based endpoints
api_versionsGeneral configuration settings
aws_access_key_idAWS access keys
aws_account_idAccount-based endpoints
aws_secret_access_keyAWS access keys
aws_session_tokenAWS access keys
ca_bundleGeneral configuration settings
credential_processProcess credential provider
credential_sourceAssume role credential provider
defaults_modeSmart configuration defaults
disable_host_prefix_injectionHost prefix injection
disable_request_compressionRequest compression
duration_secondsAssume role credential provider
ec2_metadata_service_endpointIMDS credential provider
ec2_metadata_service_endpoint_modeIMDS credential provider
ec2_metadata_v1_disabledIMDS credential provider
endpoint_discovery_enabledEndpoint discovery
endpoint_urlService-specific endpoints
external_idAssume role credential provider
ignore_configured_endpoint_urlsService-specific endpoints
max_attemptsRetry behavior
metadata_service_num_attemptsAmazon EC2 instance metadata
metadata_service_timeoutAmazon EC2 instance metadata
mfa_serialAssume role credential provider
outputGeneral configuration settings
parameter_validationGeneral configuration settings
regionAWS Region
request_checksum_calculationData Integrity Protections for Amazon S3
request_min_compression_size_bytesRequest compression
response_checksum_validationData Integrity Protections for Amazon S3
retry_modeRetry behavior
role_arnAssume role credential provider
role_session_nameAssume role credential provider
s3_disable_multiregion_access_pointsAmazon S3 Multi-Region Access Points
s3_use_arn_regionAmazon S3 access points
sdk_ua_app_idApplication ID
source_profileAssume role credential provider
sso_account_idIAM Identity Center credential provider
sso_regionIAM Identity Center credential provider
sso_registration_scopesIAM Identity Center credential provider
sso_role_nameIAM Identity Center credential provider
sso_start_urlIAM Identity Center credential provider
sts_regional_endpointsAWS STS Regional endpoints
use_dualstack_endpointDual-stack and FIPS endpoints
use_fips_endpointDual-stack and FIPS endpoints
web_identity_token_fileAssume role credential provider

Credentials file settings list

The settings listed in the following table can be assigned in the shared AWScredentials file. They are global and affect all AWS services. SDKs and tools may also support unique settings and environment variables. To see the settings and environment variables supported by only an individual SDK or tool, see that specific SDK or tool guide.

Setting nameDetails
aws_access_key_idAWS access keys
aws_secret_access_keyAWS access keys
aws_session_tokenAWS access keys

Environment variables list

Environment variables supported by most SDKs are listed in the following table. They are global and affect all AWS services. SDKs and tools may also support unique settings and environment variables. To see the settings and environment variables supported by only an individual SDK or tool, see that specific SDK or tool guide.

Setting nameDetails
AWS_ACCESS_KEY_IDAWS access keys
AWS_ACCOUNT_IDAccount-based endpoints
AWS_ACCOUNT_ID_ENDPOINT_MODEAccount-based endpoints
AWS_CA_BUNDLEGeneral configuration settings
AWS_CONFIG_FILEFinding and changing the location of the shared config and credentials files of AWS SDKs and tools
AWS_CONTAINER_AUTHORIZATION_TOKENContainer credential provider
AWS_CONTAINER_AUTHORIZATION_TOKEN_FILEContainer credential provider
AWS_CONTAINER_CREDENTIALS_FULL_URIContainer credential provider
AWS_CONTAINER_CREDENTIALS_RELATIVE_URIContainer credential provider
AWS_DEFAULTS_MODESmart configuration defaults
AWS_DISABLE_HOST_PREFIX_INJECTIONHost prefix injection
AWS_DISABLE_REQUEST_COMPRESSIONRequest compression
AWS_EC2_METADATA_DISABLEDIMDS credential provider
AWS_EC2_METADATA_SERVICE_ENDPOINTIMDS credential provider
AWS_EC2_METADATA_SERVICE_ENDPOINT_MODEIMDS credential provider
AWS_EC2_METADATA_V1_DISABLEDIMDS credential provider
AWS_ENABLE_ENDPOINT_DISCOVERYEndpoint discovery
AWS_ENDPOINT_URLService-specific endpoints
AWS_ENDPOINT_URL_<SERVICE>Service-specific endpoints
AWS_IGNORE_CONFIGURED_ENDPOINT_URLSService-specific endpoints
AWS_MAX_ATTEMPTSRetry behavior
AWS_METADATA_SERVICE_NUM_ATTEMPTSAmazon EC2 instance metadata
AWS_METADATA_SERVICE_TIMEOUTAmazon EC2 instance metadata
AWS_PROFILEUsing shared config and credentials files to globally configure AWS SDKs and tools
AWS_REGIONAWS Region
AWS_REQUEST_CHECKSUM_CALCULATIONData Integrity Protections for Amazon S3
AWS_REQUEST_MIN_COMPRESSION_SIZE_BYTESRequest compression
AWS_RESPONSE_CHECKSUM_VALIDATIONData Integrity Protections for Amazon S3
AWS_RETRY_MODERetry behavior
AWS_ROLE_ARNAssume role credential provider
AWS_ROLE_SESSION_NAMEAssume role credential provider
AWS_S3_DISABLE_MULTIREGION_ACCESS_POINTSAmazon S3 Multi-Region Access Points
AWS_S3_USE_ARN_REGIONAmazon S3 access points
AWS_SDK_UA_APP_IDApplication ID
AWS_SECRET_ACCESS_KEYAWS access keys
AWS_SESSION_TOKENAWS access keys
AWS_SHARED_CREDENTIALS_FILEFinding and changing the location of the shared config and credentials files of AWS SDKs and tools
AWS_STS_REGIONAL_ENDPOINTSAWS STS Regional endpoints
AWS_USE_DUALSTACK_ENDPOINTDual-stack and FIPS endpoints
AWS_USE_FIPS_ENDPOINTDual-stack and FIPS endpoints
AWS_WEB_IDENTITY_TOKEN_FILEAssume role credential provider

JVM system properties list

You can use the following JVM system properties for the AWS SDK for Java and the AWS SDK for Kotlin (targeting the JVM). SeeHow to set JVM system properties for instructions on how to set JVM system properties.

Setting nameDetails
aws.accessKeyIdAWS access keys
aws.accountIdAccount-based endpoints
aws.accountIdEndpointModeAccount-based endpoints
aws.configFileFinding and changing the location of the shared config and credentials files of AWS SDKs and tools
aws.defaultsModeSmart configuration defaults
aws.disableEc2MetadataV1IMDS credential provider
aws.disableHostPrefixInjectionHost prefix injection
aws.disableRequestCompressionRequest compression
aws.ec2MetadataServiceEndpointIMDS credential provider
aws.ec2MetadataServiceEndpointModeIMDS credential provider
aws.endpointDiscoveryEnabledEndpoint discovery
aws.endpointUrlService-specific endpoints
aws.endpointUrl<ServiceName>Service-specific endpoints
aws.ignoreConfiguredEndpointUrlsService-specific endpoints
aws.maxAttemptsRetry behavior
aws.profileUsing shared config and credentials files to globally configure AWS SDKs and tools
aws.regionAWS Region
aws.requestChecksumCalculationData Integrity Protections for Amazon S3
aws.requestMinCompressionSizeBytesRequest compression
aws.responseChecksumValidationData Integrity Protections for Amazon S3
aws.retryModeRetry behavior
aws.roleArnAssume role credential provider
aws.roleSessionNameAssume role credential provider
aws.s3DisableMultiRegionAccessPointsAmazon S3 Multi-Region Access Points
aws.s3UseArnRegionAmazon S3 access points
aws.secretAccessKeyAWS access keys
aws.sessionTokenAWS access keys
aws.sharedCredentialsFileFinding and changing the location of the shared config and credentials files of AWS SDKs and tools
aws.useDualstackEndpointDual-stack and FIPS endpoints
aws.useFipsEndpointDual-stack and FIPS endpoints
aws.userAgentAppIdApplication ID
aws.webIdentityTokenFileAssume role credential provider
Trusted identity propagation
Standardized credential providers

[8]
ページ先頭

©2009-2025 Movatter.jp