You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This release adds support for three commonly requested features:
More powerful credential chain
Support for constructing multiple clients from the same configuration
Support for Transcribe streaming and S3 Select
In addition, this overhauls client configuration which lead to a number of breaking changes. Detailed changes are inline.
Current Credential Provider Support:
Environment variables
Web Identity Token Credentials
Profile file support (partial)
Credentials
SSO
ECS Credential source
IMDS credential source
Assume role from source profile
Static credentials source profile
WebTokenIdentity provider
Region
IMDS
ECS
Upgrade Guide
If you use <sdk>::Client::from_env
from_env loaded region & credentials from environment variables only. Default sources have been removed from the generated
SDK clients and moved to the aws-config package. Note that the aws-config package default chain adds support for
profile file and web identity token profiles.
// `shared_config` can be used to construct multiple different service clients!let shared_config = aws_config::load_from_env().await;// before: <service>::Client::from_env();let client = <service>::Client::new(&shared_config)
If you used <client>::Config::builder()
Config::build() has been modified to not fallback to a default provider. Instead, use aws-config to load and modify
the default chain. Note that when you switch to aws-config, support for profile files and web identity tokens will be added.
fnbefore(){let region = aws_types::region::ChainProvider::first_try(<1provider>).or_default_provider();let config = <service>::Config::builder().region(region).build();let client = <service>::Client::from_conf(&config);}asyncfnafter(){use aws_config::meta::region::RegionProviderChain;let region_provider = RegionProviderChain::first_try(<1provider>).or_default_provider();// `shared_config` can be used to construct multiple different service clients!let shared_config = aws_config::from_env().region(region_provider).load().await;let client = <service>::Client::new(&shared_config)}
If you used aws-auth-providers
All credential providers that were in aws-auth-providers have been moved to aws-config. Unless you have a specific use case
for a specific credential provider, you should use the default provider chain:
let shared_config = aws_config::load_from_env().await;let client = <service>::Client::new(&shared_config);
If you maintain your own credential provider
AsyncProvideCredentials has been renamed to ProvideCredentials. The trait has been moved from aws-auth to aws-types.
The original ProvideCredentials trait has been removed. The return type has been changed to by a custom future.
For synchronous use cases:
use aws_types::credentials::{ProvideCredentials, future};#[derive(Debug)]structCustomCreds;implProvideCredentialsforCustomCreds{fnprovide_credentials<'a>(&'a self) -> future::ProvideCredentials<'a>whereSelf:'a,{// if your credentials are synchronous, use `::ready`// if your credentials are loaded asynchronously, use `::new`
future::ProvideCredentials::ready(todo!())// your credentials go here}}
For asynchronous use cases:
use aws_types::credentials::{ProvideCredentials, future,Result};#[derive(Debug)]structCustomAsyncCreds;implCustomAsyncCreds{asyncfnload_credentials(&self) -> Result{Ok(Credentials::from_keys("my creds...","secret",None))}}implProvideCredentialsforCustomCreds{fnprovide_credentials<'a>(&'a self) -> future::ProvideCredentials<'a>whereSelf:'a,{
future::ProvideCredentials::new(self.load_credentials())}}
AsyncProvideCredentials has been renamed to ProvideCredentials. The original non-async provide credentials has been
removed. See the migration guide above.
let shared_config = aws_config::load_from_env().await;let config = <service>::config::Builder::from(&shared_config).<other builder modifications>.build();
Request and Response in smithy_http::operation now use SharedPropertyBag instead of Arc<Mutex<PropertyBag>>. Use the acquire and acquire_mut methods to get a reference to the underlying PropertyBag to access properties. (Add full Event Stream marshalling support and working S3 example #667)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This release adds support for three commonly requested features:
In addition, this overhauls client configuration which lead to a number of breaking changes. Detailed changes are inline.
Current Credential Provider Support:
Upgrade Guide
If you use
<sdk>::Client::from_env
from_env
loaded region & credentials from environment variables only. Default sources have been removed from the generatedSDK clients and moved to the
aws-config
package. Note that theaws-config
package default chain adds support forprofile file and web identity token profiles.
aws-config
:If you used
<client>::Config::builder()
Config::build()
has been modified to not fallback to a default provider. Instead, useaws-config
to load and modifythe default chain. Note that when you switch to
aws-config
, support for profile files and web identity tokens will be added.Add a dependency on
aws-config
:Update your client creation code:
If you used
aws-auth-providers
All credential providers that were in
aws-auth-providers
have been moved toaws-config
. Unless you have a specific use casefor a specific credential provider, you should use the default provider chain:
If you maintain your own credential provider
AsyncProvideCredentials
has been renamed toProvideCredentials
. The trait has been moved fromaws-auth
toaws-types
.The original
ProvideCredentials
trait has been removed. The return type has been changed to by a custom future.For synchronous use cases:
For asynchronous use cases:
Changes
Breaking Changes
Credential providers from
aws-auth-providers
have been moved toaws-config
(AddCredentials
toaws-config
#678)AsyncProvideCredentials
has been renamed toProvideCredentials
. The original non-async provide credentials has beenremoved. See the migration guide above.
<sevicename>::from_env()
has been removed (Minimal Support for Shared Config Loading #675). A drop-in replacement is available:aws-config
:ProvideRegion
has been moved toaws_config::meta::region::ProvideRegion
. (Minimal Support for Shared Config Loading #675)aws_types::region::ChainProvider
has been moved toaws_config::meta::region::RegionProviderChain
(Minimal Support for Shared Config Loading #675).ProvideRegion
is now asynchronous. Code that calledprovider.region()
must be changed toprovider.region().await
.<awsservice>::Config::builder()
will not load a default region. To preserve previous behavior:aws-config
:Request
andResponse
insmithy_http::operation
now useSharedPropertyBag
instead ofArc<Mutex<PropertyBag>>
. Use theacquire
andacquire_mut
methods to get a reference to the underlyingPropertyBag
to access properties. (Add full Event Stream marshalling support and working S3 example #667)New this week
StartStreamTranscription
and S3SelectObjectContent
operations (Add full Event Stream marshalling support and working S3 example #667)Size
(Customize S3Size
to use correct integer size #679, aws-sdk-rust#209)Internal Changes
This discussion was created from the release v0.22 (September 2nd, 2021).
Beta Was this translation helpful? Give feedback.
All reactions