Releases: awslabs/aws-sdk-rust
v0.0.20-alpha (October 7th, 2021)
v0.0.20-alpha (October, 7, 2021)
Breaking changes
β οΈ MSRV increased from 1.52.1 to 1.53.0 per our 3-behind MSRV policy.SmithyConnector
andDynConnector
now returnConnectorError
instead ofBox<dyn Error>
. If you have written a custom connector, it will need to be updated to return the new error type. (#744)- The
DispatchError
variant ofSdkError
now containsConnectorError
instead ofBox<dyn Error>
(#744).
New This Week
- π Add presigned request support and examples for S3 GetObject and PutObject (smithy-rs#731, aws-sdk-rust#139)
- π Add presigned request support and example for Polly SynthesizeSpeech (smithy-rs#735, aws-sdk-rust#139)
- Add connect & HTTP read timeouts to IMDS, defaulting to 1 second
- IO and timeout errors from Hyper can now be retried (#744)
- π Fix error when receiving
Cont
event from S3 SelectObjectContent (smithy-rs#736) - π Fix bug in event stream receiver that could cause the last events in the response stream to be lost when using S3 SelectObjectContent (smithy-rs#736)
- Updated EC2 code examples to include readme; refactored operations from main into separate functions.
- Updated Transcribe code example to take an audio file as a command-line option and added readme.
- Refactored API Gateway code example by moving operation out of main and into a separate function; added readme.
- Updated Auto Scaling code example to move operation from main to separate function; added readme.
- Updated AWS Config code examples to include a readme; added command-line options; added DeleteConfigurationRecorder, DeleteDeliveryChannel, ListConfigurationRecorders, ListDeliveryChannels, ListResources, ShowResourceHistory, and EnableConfig code examples.
- π Add support for 6 new AWS services:
- Wisdom
- VoiceId
- Account
- KafkaConnect
- OpenSearch
- CloudControl
Contributors
Thank you!! β€οΈ
v0.0.19-alpha (September 24th, 2021)
New This Week
- π IMDS support in the default credential provider chain (aws-sdk-rust#97)
- π Add
sts::AssumeRoleProvider
toaws-config
. This enables customers to invoke STS directly, instead of using it via~/.aws/config
. (smithy-rs#703, aws-sdk-rust#3) - Add IMDS client to
aws-config
(smithy-rs#701) - Add IMDS credential provider to
aws-config
(smithy-rs#709) - Add IMDS region provider to
aws-config
(smithy-rs#715, aws-sdk-rust#97) - Add query param signing to the
aws-sigv4
crate (smithy-rs#707) - π Update event stream
Receiver
s to beSend
(smithy-rs#702, aws-sdk-rust#224) - π Fix panic when signing non-ASCII header values (smithy-rs#708, aws-sdk-rust#226)
Contributions
Thank you for your contributions! β€οΈ
September 14th, 2021: Bug fixes
v0.0.18-alpha (September 14th, 2021)
New This Week
- π Add support for OpenSearch service & bring in other model updates (smithy-rs#698)
- Cleanup docs in aws-config (smithy-rs#693)
- π Fixes issue where Content-Length header could be duplicated leading to signing failure (#220, smithy-rs#697)
v0.0.17-alpha (September 2nd, 2021)
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
- Credentials
- 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.
- Add a dependency on
aws-config
:[dependencies] aws-config = { git = "https://github.com/awslabs/aws-sdk-rust", tag = "v0.0.17-alpha" }
- Update your client creation code:
// `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.
-
Add a dependency on
aws-config
:[dependencies] aws-config = { git = "https://github.com/awslabs/aws-sdk-rust", tag = "v0.0.17-alpha" }
-
Update your client creation code:
fn before() { let region = aws_types::region::ChainProvider::first_try(<1 provider>).or_default_provider(); let config = <service>::Config::builder().region(region).build(); let client = <service>::Client::from_conf(&config); } async fn after() { use aws_config::meta::region::RegionProviderChain; let region_provider = RegionProviderChain::first_try(<1 provider>).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)]
struct CustomCreds;
impl ProvideCredentials for CustomCreds {
fn provide_credentials<'a>(&'a self) -> future::ProvideCredentials<'a>
where
Self: '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)]
struct CustomAsyncCreds;
impl CustomAsyncCreds {
async fn load_credentials(&self) -> Result {
Ok(Credentials::from_keys("my creds...", "secret", None))
}
}
impl ProvideCredentials for CustomCreds {
fn provide_credentials<'a>(&'a self) -> future::ProvideCredentials<'a>
where
Self: 'a,
{
future::ProvideCredentials::new(self.load_credentials())
}
}
Changes
Breaking Changes
-
Credential providers from
aws-auth-providers
have been moved toaws-config
(smithy-rs#678) -
AsyncProvideCredentials
has been renamed toProvideCredentials
. The original non-async provide credentials has been
removed. See the migration guide above. -
<sevicename>::from_env()
has been removed (#675). A drop-in replacement is available:- Add a dependency on
aws-config
:[dependencies] aws-config = { git = "https://github.com/awslabs/aws-sdk-rust", tag = "v0.0.17-alpha" }
- Update your client creation code:
let client = <service>>::Client::new(&aws_config::load_from_env().await)
- Add a dependency on
-
ProvideRegion
has been moved toaws_config::meta::region::ProvideRegion
. (smithy-rs#675) -
aws_types::region::ChainProvider
has been moved toaws_config::meta::region::RegionProviderChain
(smithy-rs#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:- Add a dependency on
aws-config
:[dependencies] aws-config = { git = "https://github.com/awslabs/aws-sdk-rust", tag = "v0.0.17-alpha" }
-
let shared_config = aws_config::load_from_env().await; let config = <service>::config::Builder::from(&shared_config).<other builder modifications>.build();
- Add a dependency on
New this week
- π Add profile file provider for region (smithy-rs#594, smithy-rs#682)
- π Add support for shared configuration between multiple services (smithy-rs#673)
- π Add support for Transcribe
StartStreamTranscription
and S3SelectObjectContent
operations (smithy-rs#667) - π Add support for new MemoryDB service (smithy-rs#677)
- Improve documentation on collection-aware builders (smithy-rs#664)
- Update AWS SDK models (smithy-rs#677)
- π Fix sigv4 signing when request ALPN negotiates to HTTP/2. (smithy-rs#674)
- π Fix integer size on S3
Size
(smithy-rs#679, #209) - π Fix MediaLive response parsing issue (smithy-rs#683, #212)
August 19th, 2021
New This Week
- π Add Chime Identity, Chime Messaging, and Snow Device Management support (smithy-rs#657)
- π Add profile file credential provider implementation. This implementation currently does not support credential sources for assume role providers other than environment variables. (smithy-rs#640)
- π Add support for WebIdentityToken providers via profile & environment variables. (smithy-rs#654)
- π Fix name collision that occurred when a model had both a union and a structure named
Result
(smithy-rs#643) - π Fix STS Assume Role with WebIdentity & Assume role with SAML to support clients with no credentials provided (smithy-rs#652)
- Update AWS SDK models (smithy-rs#657)
- Add initial implementation of a default provider chain. (smithy-rs#650)
August 11th, 2021
This release primarily contains internal changes to runtime components & updates to AWS models.
Breaking changes
-
(smithy-rs#635) The
config()
,config_mut()
,request()
, andrequest_mut()
methods onoperation::Request
have been renamed toproperties()
,properties_mut()
,http()
, andhttp_mut()
respectively. -
(smithy-rs#635) The
Response
type on Tower middleware has been changed fromhttp::Response<SdkBody>
tooperation::Response
. The HTTP response is still available from theoperation::Response
using itshttp()
andhttp_mut()
methods. -
(smithy-rs#635) The
ParseHttpResponse
trait'sparse_unloaded()
method now takes anoperation::Response
rather than anhttp::Response<SdkBody>
. -
(smithy-rs#626)
ParseHttpResponse
no longer has a generic argument for the body type, but instead, always usesSdkBody
. This may cause compilation failures for you if you are using Smithy generated types to parse JSON or XML without using a client to request data from a service. The fix should be as simple as removing<SdkBody>
in the example below:Before:
let output = <Query as ParseHttpResponse<SdkBody>>::parse_loaded(&parser, &response).unwrap();
After:
let output = <Query as ParseHttpResponse>::parse_loaded(&parser, &response).unwrap();
New This Week
- The closure passed to
async_provide_credentials_fn
can now borrow values (smithy-rs#637) - Bring in the latest AWS models (smithy-rs#630)
August 3rd 2021: Add IoT Data Plane and an Async Caching Credentials Provider
IoT Data Plane is now available! If you discover it isn't functioning as expected, please let us know!
This week also sees the addition of a robust async caching credentials provider. Take a look at the STS example to see how to use it.
To upgrade to the new release, update tag
to v0.0.14-alpha
:
[dependencies]
# eg. S3:
aws-sdk-s3 = { git = "https://github.com/awslabs/aws-sdk-rust", tag = "v0.0.14-alpha" }
New This Week
- π Add IoT Data Plane (smithy-rs#624)
- π Add LazyCachingCredentialsProvider to aws-auth for use with expiring credentials, such as STS AssumeRole. Update STS example to use this new provider (smithy-rs#578, smithy-rs#595)
- π Correctly encode HTTP Checksums using base64 instead of hex. Fixes #164. (smithy-rs#615)
- Overhaul serialization/deserialization of numeric/boolean types. This resolves issues around serialization of NaN/Infinity and should also reduce the number of allocations required during serialization. (smithy-rs#618)
- Update SQS example to clarify usage of FIFO vs. standard queues (#162, @trevorrobertsjr)
Contributions
Thank you for your contributions! β€οΈ
July 28th 2021: (Almost) All Services!
π This week's release includes most of the remaining AWS services (269 in total!).
Breaking changes
test-util
has been made an optional dependency and has moved from
aws-hyper to smithy-http. If you were relying onaws_hyper::TestConnection
, addsmithy-client
as a dependency
and enable the optionaltest-util
feature. This prunes some unnecessary dependencies onroxmltree
andserde_json
for most users. (smithy-rs#608)
New This Week
- π Release all but four remaining AWS services! Glacier, IoT Data Plane, Timestream DB and Transcribe Streaming will be available in a future release. If you discover that a service isn't functioning as expected please let us know! (smithy-rs#607)
- π Bugfix: Fix parsing bug where parsing XML incorrectly stripped whitespace (smithy-rs#590, #153)
- We now run some tests on Windows (smithy-rs#594)
- π Bugfix: Constrain RFC-3339 timestamp formatting to microsecond precision (smithy-rs#596, #152)
July 19th 2021: Add Autoscaling + Bug fixes
This week we've added Autoscaling and fixed an S3 bug.
To update to the new release, change your tag to v0.0.12-alpha.
New this Week
- π Add support for Autoscaling (#576, #582)
AsyncProvideCredentials
now introduces an additional lifetime parameter, simplifying bridging it with#[async_trait]
interfaces- Fix S3 bug when content type was set explicitly (aws-sdk-rust#131, #566, @eagletmt)
Contributions
Thank you for your contributions! β€οΈ
July 6th, 2021: AWS Config, EBS, Cognito & Snowball
This week, we've added AWS Config, EBS, Cognito, and Snowball. Projects that are implementing the ProvideCredentials
trait will need to update their imports and should consider using the new async_provide_credentials_fn
for async credential use-cases.
To update to the new release, change your tag to v0.0.11-alpha
.
New this Week
β οΈ Breaking Change:ProvideCredentials
andCredentialError
were both moved intoaws_auth::provider
when they were previously inaws_auth
(#572)- π Add support for AWS Config (#570)
- π Add support for EBS (#567)
- π Add support for Cognito (#573)
- π Add support for Snowball (#579, @landonxjames)
- Make it possible to asynchronously provide credentials with
async_provide_credentials_fn
(#572, #577) - Improve RDS, QLDB, Polly, and KMS examples (#561, #560, #558, #556, #550)
- Update AWS SDK models (#575)
- π Bugfix: Fill in message from error response even when it doesn't match the modeled case format (#565)
Contributions
Thank you for your contributions! β€οΈ
- landonxjames (#579)