<!-- Do not manually edit this file. Use the `changelogger` tool. -->
January 24th, 2023
==================
**Breaking Changes:**
- ⚠ (server, [smithy-rs#2161](https://github.com/awslabs/smithy-rs/issues/2161)) Remove deprecated service builder, this includes:
- Remove `aws_smithy_http_server::routing::Router` and `aws_smithy_http_server::request::RequestParts`.
- Move the `aws_smithy_http_server::routers::Router` trait and `aws_smithy_http_server::routing::RoutingService` into `aws_smithy_http_server::routing`.
- Remove the following from the generated SDK:
- `operation_registry.rs`
- `operation_handler.rs`
- `server_operation_handler_trait.rs`
If migration to the new service builder API has not already been completed a brief summary of required changes can be seen in [previous release notes](https://github.com/awslabs/smithy-rs/releases/tag/release-2022-12-12) and in API documentation of the root crate.
**New this release:**
- 🐛 (server, [smithy-rs#2213](https://github.com/awslabs/smithy-rs/issues/2213)) `@sparse` list shapes and map shapes with constraint traits and with constrained members are now supported
- (all, [smithy-rs#2223](https://github.com/awslabs/smithy-rs/issues/2223)) `aws_smithy_types::date_time::DateTime`, `aws_smithy_types::Blob` now implement the `Eq` and `Hash` traits
- (server, [smithy-rs#2223](https://github.com/awslabs/smithy-rs/issues/2223)) Code-generated types for server SDKs now implement the `Eq` and `Hash` traits when possible
Improve SDK credentials caching through type safety. `LazyCachingCredentialsProvider` has been renamed to `LazyCredentialsCache` and is no longer treated as a credentials provider. Furthermore, you do not create a `LazyCredentialsCache` directly, and instead you interact with `CredentialsCache`. This introduces the following breaking changes.
If you previously used `LazyCachingCredentialsProvider`, you can replace it with `CredentialsCache`.
<details>
<summary>Example</summary>
Before:
```rust
use aws_config::meta::credentials::lazy_caching::LazyCachingCredentialsProvider;
use aws_types::provider::ProvideCredentials;
fn make_provider() -> impl ProvideCredentials {
// --snip--
}
let credentials_provider =
LazyCachingCredentialsProvider::builder()
.load(make_provider())
.build();
let sdk_config = aws_config::from_env()
.credentials_provider(credentials_provider)
.load()
.await;
let client = aws_sdk_s3::Client::new(&sdk_config);
```
After:
```rust
use aws_credential_types::cache::CredentialsCache;
use aws_types::provider::ProvideCredentials;
fn make_provider() -> impl ProvideCredentials {
// --snip--
}
// Wrapping a result of `make_provider` in `LazyCredentialsCache` is done automatically.
let sdk_config = aws_config::from_env()
.credentials_cache(CredentialsCache::lazy()) // This line can be omitted because it is on by default.
.credentials_provider(make_provider())
.load()
.await;
let client = aws_sdk_s3::Client::new(&sdk_config);
```
If you previously configured a `LazyCachingCredentialsProvider`, you can use the builder for `LazyCredentialsCache` instead.
Before:
```rust
use aws_config::meta::credentials::lazy_caching::LazyCachingCredentialsProvider;
let client = aws_sdk_s3::Client::new(&sdk_config);
```
The examples above only demonstrate how to use `credentials_cache` and `credentials_provider` methods on `aws_config::ConfigLoader` but the same code update can be applied when you interact with `aws_types::sdk_config::Builder` or the builder for a service-specific config, e.g. `aws_sdk_s3::config::Builder`.
</details>
If you previously configured a `DefaultCredentialsChain` by calling `load_timeout`, `buffer_time`, or `default_credential_expiration` on its builder, you need to call the same set of methods on the builder for `LazyCredentialsCache` instead.
<details>
<summary>Example</summary>
Before:
```rust
use aws_config::default_provider::credentials::DefaultCredentialsChain;
use std::time::Duration;
let credentials_provider = DefaultCredentialsChain::builder()
let client = aws_sdk_s3::Client::new(&sdk_config);
```
</details>
"""
references=["smithy-rs#2122","smithy-rs#2227"]
meta={"breaking"=true,"tada"=false,"bug"=false}
author="ysaito1001"
[[aws-sdk-rust]]
message="""
The introduction of `CredentialsCache` comes with an accompanying type `SharedCredentialsCache`, which we will store in the property bag instead of a `SharedCredentialsProvider`. As a result, `aws_http::auth:set_provider` has been updated to `aws_http::auth::set_credentials_cache`.
Before:
```rust
use aws_credential_types::Credentials;
use aws_credential_types::provider::SharedCredentialsProvider;
use aws_http::auth::set_provider;
use aws_smithy_http::body::SdkBody;
use aws_smithy_http::operation;
let mut req = operation::Request::new(http::Request::new(SdkBody::from("some body")));
let credentials = Credentials::new("example", "example", None, None, "my_provider_name");
set_provider(
&mut req.properties_mut(),
SharedCredentialsProvider::new(credentials),
);
```
After:
```rust
use aws_credential_types::Credentials;
use aws_credential_types::cache::{CredentialsCache, SharedCredentialsCache};
use aws_credential_types::provider::SharedCredentialsProvider;
use aws_http::auth::set_credentials_cache;
use aws_smithy_http::body::SdkBody;
use aws_smithy_http::operation;
let mut req = operation::Request::new(http::Request::new(SdkBody::from("some body")));
let credentials = Credentials::new("example", "example", None, None, "my_provider_name");
let credentials_cache = CredentialsCache::lazy_builder()
message="Fix endpoint for s3.write_get_object_response(). This bug was introduced in 0.53."
references=["smithy-rs#2204"]
meta={"breaking"=false,"tada"=false,"bug"=true}
author="rcoh"
[[aws-sdk-rust]]
message="Add `with_test_defaults()` and `set_test_defaults()` to `<service>::Config`. These methods fill in defaults for configuration that is mandatory to successfully send a request."
references=["smithy-rs#2204"]
meta={"breaking"=false,"tada"=false,"bug"=false}
author="rcoh"
[[smithy-rs]]
message="""
Remove deprecated service builder, this includes:
- Remove `aws_smithy_http_server::routing::Router` and `aws_smithy_http_server::request::RequestParts`.
- Move the `aws_smithy_http_server::routers::Router` trait and `aws_smithy_http_server::routing::RoutingService` into `aws_smithy_http_server::routing`.
- Remove the following from the generated SDK:
- `operation_registry.rs`
- `operation_handler.rs`
- `server_operation_handler_trait.rs`
If migration to the new service builder API has not already been completed a brief summary of required changes can be seen in [previous release notes](https://github.com/awslabs/smithy-rs/releases/tag/release-2022-12-12) and in API documentation of the root crate.