Setting service-specific configuration in the profile or an env var #3537
Velfi
announced in
Change Log
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Users may set service-specific configuration in the environment, either as profile configuration or as an environment variable.
NOTE: Only a restricted set of configuration is currently supported.
If your use case requires support for an currently-unsupported config value, please file an issue.
Setting service-specific configuration with an environment variable
Environment variable names are constructed like so:
As an example, you can set an endpoint URL that will only be used when making requests with the AWS Health APIs and Notifications service client like this:
Setting service-specific configuration with AWS profile config
Profile config variables for specific services must be defined in a special services section, like so:
The config above would produce an S3 client that sends requests to
http://localhost:8080
and an EC2 client that sends requests tohttp://localhost:9090
. All other SDK clients would use thehttp://localhost:7070
URL.Service-specific profile config may only be defined in a services section. For example, if the profile above was instead defined like this:
Then the
http://invalid:8080
endpoint URL would be silently ignored! This is an intentional part of the design which simplifies our internal implementation.Configuration precedence
Configuration precedence is almost identical to how it was before this change. In order of descending precedence:
In other words, client configuration overrules all other configuration and specific configuration overrides non-specific configuration.
How to find a service's service ID
Every SDK crate we publish includes the service id in its name. Here are a few examples:
aws-sdk-serverlessapplicationrepository
You can see the list of all SDK crates we publish here.
Beta Was this translation helpful? Give feedback.
All reactions