File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -114,10 +114,9 @@ impl AwsService {
114114 . or_default_provider ( )
115115 . or_else ( Region :: new ( "us-east-1" ) ) ,
116116 ) ;
117- match endpoint_url {
118- Some ( url) => config_provider = config_provider. endpoint_url ( url) ,
119- None => { }
120- }
117+ if let Some ( url) = endpoint_url {
118+ config_provider = config_provider. endpoint_url ( url)
119+ } ;
121120 config_provider. load ( ) . await
122121 } ) ;
123122
Original file line number Diff line number Diff line change @@ -79,6 +79,17 @@ pub enum ServerConfig {
7979 #[ cfg( feature = "server-aws" ) ]
8080 Aws {
8181 /// Region in which the bucket is located.
82+ /// If `None`, the default region is used.
83+ /// The `default` region is based on the AWS SDK
84+ /// - <https://docs.aws.amazon.com/sdk-for-rust/latest/dg/region.html>
85+ ///
86+ /// following, in order:
87+ /// 1. `AWS_REGION` environment variable,
88+ /// 2. `AWS_CONFIG_FILE` environment variable and the `region` in that file
89+ /// 3. `AWS_PROFILE` variable and the region for that file in the config file
90+ /// 4. The instance profile if running in an AWS compute environment
91+ ///
92+ /// Failing all of those, we will default to `us-east-1`.
8293 region : Option < String > ,
8394 /// Bucket in which to store the task data.
8495 ///
You can’t perform that action at this time.
0 commit comments