diff --git a/CHANGELOG.md b/CHANGELOG.md index 6935ed7f75..0d11d68f85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,24 @@ +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 + + January 12th, 2023 ================== **New this release:** diff --git a/CHANGELOG.next.toml b/CHANGELOG.next.toml index 51c7f2f1c7..fc4c4c2578 100644 --- a/CHANGELOG.next.toml +++ b/CHANGELOG.next.toml @@ -9,250 +9,4 @@ # message = "Fix typos in module documentation for generated crates" # references = ["smithy-rs#920"] # meta = { "breaking" = false, "tada" = false, "bug" = false, "target" = "client | server | all"} -# author = "rcoh" - -[[smithy-rs]] -message = "`@sparse` list shapes and map shapes with constraint traits and with constrained members are now supported" -references = ["smithy-rs#2213"] -meta = { "breaking" = false, "tada" = false, "bug" = true, "target" = "server"} -author = "david-perez" - -[[aws-sdk-rust]] -message = """ -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`. -
-Example - -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; -use aws_types::provider::ProvideCredentials; -use std::time::Duration; - -fn make_provider() -> impl ProvideCredentials { - // --snip-- -} - -let credentials_provider = - LazyCachingCredentialsProvider::builder() - .load(make_provider()) - .load_timeout(Duration::from_secs(60)) // Configures timeout. - .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; -use std::time::Duration; - -fn make_provider() -> impl ProvideCredentials { - // --snip-- -} - -let sdk_config = aws_config::from_env() - .credentials_cache( - CredentialsCache::lazy_builder() - .load_timeout(Duration::from_secs(60)) // Configures timeout. - .into_credentials_cache(), - ) - .credentials_provider(make_provider()) - .load() - .await; - -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`. - -
- - -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. -
-Example - -Before: -```rust -use aws_config::default_provider::credentials::DefaultCredentialsChain; -use std::time::Duration; - -let credentials_provider = DefaultCredentialsChain::builder() - .buffer_time(Duration::from_secs(30)) - .default_credential_expiration(Duration::from_secs(20 * 60)) - .build() - .await; - -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_config::default_provider::credentials::default_provider; -use aws_credential_types::cache::CredentialsCache; -use std::time::Duration; - -// Previously used methods no longer exist on the builder for `DefaultCredentialsChain`. -let credentials_provider = default_provider().await; - -let sdk_config = aws_config::from_env() - .credentials_cache( - CredentialsCache::lazy_builder() - .buffer_time(Duration::from_secs(30)) - .default_credential_expiration(Duration::from_secs(20 * 60)) - .into_credentials_cache(), - ) - .credentials_provider(credentials_provider) - .load() - .await; - -let client = aws_sdk_s3::Client::new(&sdk_config); -``` - -
-""" -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() - .into_credentials_cache() - .create_cache(SharedCredentialsProvider::new(credentials)); -set_credentials_cache( - &mut req.properties_mut(), - SharedCredentialsCache::new(credentials_cache), -); -``` -""" -references = ["smithy-rs#2122", "smithy-rs#2227"] -meta = { "breaking" = true, "tada" = false, "bug" = false } -author = "ysaito1001" - -[[smithy-rs]] -message = "`aws_smithy_types::date_time::DateTime`, `aws_smithy_types::Blob` now implement the `Eq` and `Hash` traits" -references = ["smithy-rs#2223"] -meta = { "breaking" = false, "tada" = false, "bug" = false, "target" = "all"} -author = "david-perez" - -[[smithy-rs]] -message = "Code-generated types for server SDKs now implement the `Eq` and `Hash` traits when possible" -references = ["smithy-rs#2223"] -meta = { "breaking" = false, "tada" = false, "bug" = false, "target" = "server"} -author = "david-perez" - -[[aws-sdk-rust]] -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 `::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. -""" -references = ["smithy-rs#2161"] -meta = { "breaking" = true, "tada" = false, "bug" = false, "target" = "server"} -author = "hlbarber" +# author = "rcoh" \ No newline at end of file diff --git a/aws/SDK_CHANGELOG.next.json b/aws/SDK_CHANGELOG.next.json index 0f11b5358e..532c49d410 100644 --- a/aws/SDK_CHANGELOG.next.json +++ b/aws/SDK_CHANGELOG.next.json @@ -5,196 +5,6 @@ { "smithy-rs": [], "aws-sdk-rust": [ - { - "message": "Refactor endpoint resolution internals to use `aws_smithy_types::Endpoint` internally. The public internal\nfunctions `aws_endpoint::set_endpoint_resolver` and `aws_endpoint::get_endpoint_resolver were removed.", - "meta": { - "bug": false, - "breaking": true, - "tada": false - }, - "author": "rcoh", - "references": [ - "smithy-rs#1641" - ], - "since-commit": "6e96137ca79b592960881b140ab17717b1ebb780", - "age": 5 - }, - { - "message": "Service configs are now generated with new accessors for:\n- `Config::retry_config()` - Returns a reference to the inner retry configuration.\n- `Config::timeout_config()` - Returns a reference to the inner timeout configuration.\n- `Config::sleep_impl()` - Returns a clone of the inner async sleep implementation.\n\nPreviously, these were only accessible through `SdkConfig`.\n", - "meta": { - "bug": false, - "breaking": false, - "tada": true - }, - "author": "Velfi", - "references": [ - "smithy-rs#1598" - ], - "since-commit": "6e96137ca79b592960881b140ab17717b1ebb780", - "age": 5 - }, - { - "message": "Lossy converters into integer types for `aws_smithy_types::Number` have been\nremoved. Lossy converters into floating point types for\n`aws_smithy_types::Number` have been suffixed with `_lossy`. If you were\ndirectly using the integer lossy converters, we recommend you use the safe\nconverters.\n_Before:_\n```rust\nfn f1(n: aws_smithy_types::Number) {\n let foo: f32 = n.to_f32(); // Lossy conversion!\n let bar: u32 = n.to_u32(); // Lossy conversion!\n}\n```\n_After:_\n```rust\nfn f1(n: aws_smithy_types::Number) {\n use std::convert::TryInto; // Unnecessary import if you're using Rust 2021 edition.\n let foo: f32 = n.try_into().expect(\"lossy conversion detected\"); // Or handle the error instead of panicking.\n // You can still do lossy conversions, but only into floating point types.\n let foo: f32 = n.to_f32_lossy();\n // To lossily convert into integer types, use an `as` cast directly.\n let bar: u32 = n as u32; // Lossy conversion!\n}\n```\n", - "meta": { - "bug": true, - "breaking": true, - "tada": false - }, - "author": "david-perez", - "references": [ - "smithy-rs#1274" - ], - "since-commit": "6e96137ca79b592960881b140ab17717b1ebb780", - "age": 5 - }, - { - "message": "Bump [MSRV](https://github.com/awslabs/aws-sdk-rust#supported-rust-versions-msrv) from 1.58.1 to 1.61.0 per our policy.", - "meta": { - "bug": false, - "breaking": true, - "tada": false - }, - "author": "Velfi", - "references": [ - "smithy-rs#1699" - ], - "since-commit": "6e96137ca79b592960881b140ab17717b1ebb780", - "age": 5 - }, - { - "message": "The AWS S3 `GetObjectAttributes` operation will no longer fail with an XML error.", - "meta": { - "bug": true, - "breaking": false, - "tada": true - }, - "author": "Velfi", - "references": [ - "aws-sdk-rust#609" - ], - "since-commit": "6e96137ca79b592960881b140ab17717b1ebb780", - "age": 5 - }, - { - "message": "`aws_config::RetryConfig` no longer implements `Default`, and its `new` function has been replaced with `standard`.", - "meta": { - "bug": false, - "breaking": true, - "tada": false - }, - "author": "jdisanti", - "references": [ - "smithy-rs#1603", - "aws-sdk-rust#586" - ], - "since-commit": "3952a10c44ec1f2eed4a8d5e401d36e07e8a2c73", - "age": 5 - }, - { - "message": "Direct configuration of `aws_config::SdkConfig` now defaults to retries being disabled.\nIf you're using `aws_config::load_from_env()` or `aws_config::from_env()` to configure\nthe SDK, then you are NOT affected by this change. If you use `SdkConfig::builder()` to\nconfigure the SDK, then you ARE affected by this change and should set the retry config\non that builder.\n", - "meta": { - "bug": false, - "breaking": true, - "tada": false - }, - "author": "jdisanti", - "references": [ - "smithy-rs#1603", - "aws-sdk-rust#586" - ], - "since-commit": "3952a10c44ec1f2eed4a8d5e401d36e07e8a2c73", - "age": 5 - }, - { - "message": "Client creation now panics if retries or timeouts are enabled without an async sleep\nimplementation set on the SDK config.\nIf you're using the Tokio runtime and have the `rt-tokio` feature enabled (which is enabled by default),\nthen you shouldn't notice this change at all.\nOtherwise, if using something other than Tokio as the async runtime, the `AsyncSleep` trait must be implemented,\nand that implementation given to the config builder via the `sleep_impl` method. Alternatively, retry can be\nexplicitly turned off by setting the retry config to `RetryConfig::disabled()`, which will result in successful\nclient creation without an async sleep implementation.\n", - "meta": { - "bug": false, - "breaking": true, - "tada": false - }, - "author": "jdisanti", - "references": [ - "smithy-rs#1603", - "aws-sdk-rust#586" - ], - "since-commit": "3952a10c44ec1f2eed4a8d5e401d36e07e8a2c73", - "age": 5 - }, - { - "message": "Implemented customizable operations per [RFC-0017](https://awslabs.github.io/smithy-rs/design/rfcs/rfc0017_customizable_client_operations.html).\n\nBefore this change, modifying operations before sending them required using lower-level APIs:\n\n```rust\nlet input = SomeOperationInput::builder().some_value(5).build()?;\n\nlet operation = {\n let op = input.make_operation(&service_config).await?;\n let (request, response) = op.into_request_response();\n\n let request = request.augment(|req, _props| {\n req.headers_mut().insert(\n HeaderName::from_static(\"x-some-header\"),\n HeaderValue::from_static(\"some-value\")\n );\n Result::<_, Infallible>::Ok(req)\n })?;\n\n Operation::from_parts(request, response)\n};\n\nlet response = smithy_client.call(operation).await?;\n```\n\nNow, users may easily modify operations before sending with the `customize` method:\n\n```rust\nlet response = client.some_operation()\n .some_value(5)\n .customize()\n .await?\n .mutate_request(|mut req| {\n req.headers_mut().insert(\n HeaderName::from_static(\"x-some-header\"),\n HeaderValue::from_static(\"some-value\")\n );\n })\n .send()\n .await?;\n```\n", - "meta": { - "bug": false, - "breaking": false, - "tada": true - }, - "author": "Velfi", - "references": [ - "smithy-rs#1647", - "smithy-rs#1112" - ], - "since-commit": "3952a10c44ec1f2eed4a8d5e401d36e07e8a2c73", - "age": 5 - }, - { - "message": "The AWS STS SDK now automatically retries `IDPCommunicationError` when calling `AssumeRoleWithWebIdentity`", - "meta": { - "bug": true, - "breaking": false, - "tada": false - }, - "author": "jdisanti", - "references": [ - "smithy-rs#966", - "smithy-rs#1718" - ], - "since-commit": "3952a10c44ec1f2eed4a8d5e401d36e07e8a2c73", - "age": 5 - }, - { - "message": "The `SdkError::ResponseError`, typically caused by a connection terminating before the full response is received, is now treated as a transient failure and retried.", - "meta": { - "bug": true, - "breaking": false, - "tada": false - }, - "author": "jdisanti", - "references": [ - "aws-sdk-rust#303", - "smithy-rs#1717" - ], - "since-commit": "3952a10c44ec1f2eed4a8d5e401d36e07e8a2c73", - "age": 5 - }, - { - "message": "`ClassifyResponse` was renamed to `ClassifyRetry` and is no longer implemented for the unit type.", - "meta": { - "bug": false, - "breaking": true, - "tada": false - }, - "author": "jdisanti", - "references": [ - "smithy-rs#1715", - "smithy-rs#1717" - ], - "since-commit": "3952a10c44ec1f2eed4a8d5e401d36e07e8a2c73", - "age": 5 - }, - { - "message": "The `with_retry_policy` and `retry_policy` functions on `aws_smithy_http::operation::Operation` have been\nrenamed to `with_retry_classifier` and `retry_classifier` respectively. Public member `retry_policy` on\n`aws_smithy_http::operation::Parts` has been renamed to `retry_classifier`.\n", - "meta": { - "bug": false, - "breaking": true, - "tada": false - }, - "author": "jdisanti", - "references": [ - "smithy-rs#1715", - "smithy-rs#1717" - ], - "since-commit": "3952a10c44ec1f2eed4a8d5e401d36e07e8a2c73", - "age": 5 - }, { "message": "Bump MSRV to be 1.62.0.", "meta": { @@ -207,7 +17,7 @@ "smithy-rs#1825" ], "since-commit": "79b7274d180085a70cbcb565ea406a88b6f3cecb", - "age": 4 + "age": 5 }, { "message": "The SDK, by default, now times out if socket connect or time to first byte read takes longer than\n3.1 seconds. There are a large number of breaking changes that come with this change that may\naffect you if you customize the client configuration at all.\nSee [the upgrade guide](https://github.com/awslabs/aws-sdk-rust/issues/622) for information\non how to configure timeouts, and how to resolve compilation issues after upgrading.\n", @@ -222,7 +32,7 @@ "smithy-rs#256" ], "since-commit": "79b7274d180085a70cbcb565ea406a88b6f3cecb", - "age": 4 + "age": 5 }, { "message": "Setting connect/read timeouts with `SdkConfig` now works. Previously, these timeout config values\nwere lost during connector creation, so the only reliable way to set them was to manually override\nthe HTTP connector.\n", @@ -237,7 +47,7 @@ "smithy-rs#256" ], "since-commit": "79b7274d180085a70cbcb565ea406a88b6f3cecb", - "age": 4 + "age": 5 }, { "message": "It is now possible to programmatically customize the locations of the profile config/credentials files in `aws-config`:\n```rust\nuse aws_config::profile::{ProfileFileCredentialsProvider, ProfileFileRegionProvider};\nuse aws_config::profile::profile_file::{ProfileFiles, ProfileFileKind};\n\nlet profile_files = ProfileFiles::builder()\n .with_file(ProfileFileKind::Credentials, \"some/path/to/credentials-file\")\n .build();\nlet credentials_provider = ProfileFileCredentialsProvider::builder()\n .profile_files(profile_files.clone())\n .build();\nlet region_provider = ProfileFileRegionProvider::builder()\n .profile_files(profile_files)\n .build();\n\nlet sdk_config = aws_config::from_env()\n .credentials_provider(credentials_provider)\n .region(region_provider)\n .load()\n .await;\n```\n", @@ -252,7 +62,7 @@ "smithy-rs#1770" ], "since-commit": "79b7274d180085a70cbcb565ea406a88b6f3cecb", - "age": 4 + "age": 5 }, { "message": "Paginators now stop on encountering a duplicate token by default rather than panic. This behavior can be customized by toggling the `stop_on_duplicate_token` property on the paginator before calling `send`.", @@ -267,7 +77,7 @@ "smithy-rs#1748" ], "since-commit": "79b7274d180085a70cbcb565ea406a88b6f3cecb", - "age": 4 + "age": 5 }, { "message": "The client Config now has getters for every value that it holds.", @@ -281,7 +91,7 @@ "smithy-rs#1747" ], "since-commit": "79b7274d180085a70cbcb565ea406a88b6f3cecb", - "age": 4 + "age": 5 }, { "message": "Fix regression where `connect_timeout` and `read_timeout` fields are unused in the IMDS client", @@ -295,7 +105,7 @@ "smithy-rs#1822" ], "since-commit": "79b7274d180085a70cbcb565ea406a88b6f3cecb", - "age": 4 + "age": 5 }, { "message": "Ability to override the IMDS client in `DefaultCredentialsChain`", @@ -309,7 +119,7 @@ "aws-sdk-rust#625" ], "since-commit": "79b7274d180085a70cbcb565ea406a88b6f3cecb", - "age": 4 + "age": 5 }, { "message": "Fix aws-sigv4 canonical request formatting fallibility.", @@ -323,7 +133,7 @@ "smithy-rs#1656" ], "since-commit": "79b7274d180085a70cbcb565ea406a88b6f3cecb", - "age": 4 + "age": 5 }, { "message": "Add test to exercise excluded headers in aws-sigv4.", @@ -337,7 +147,7 @@ "smithy-rs#1890" ], "since-commit": "79b7274d180085a70cbcb565ea406a88b6f3cecb", - "age": 4 + "age": 5 }, { "message": "Add test to exercise excluded headers in aws-sigv4.", @@ -351,7 +161,7 @@ "smithy-rs#1890" ], "since-commit": "c3de8a3f93201f969c28deb9313c903c1315054d", - "age": 3 + "age": 4 }, { "message": "Support Sigv4 signature generation on PowerPC 32 and 64 bit. This architecture cannot compile `ring`, so the implementation has been updated to rely on `hamc` + `sha2` to achive the same result with broader platform compatibility and higher performance. We also updated the CI which is now running as many tests as possible against i686 and PowerPC 32 and 64 bit.", @@ -365,7 +175,7 @@ "smithy-rs#1847" ], "since-commit": "c3de8a3f93201f969c28deb9313c903c1315054d", - "age": 3 + "age": 4 }, { "message": "Add test ensuring that a response will error if the response body returns an EOF before the entire body has been read.", @@ -379,7 +189,7 @@ "smithy-rs#1801" ], "since-commit": "c3de8a3f93201f969c28deb9313c903c1315054d", - "age": 3 + "age": 4 }, { "message": "Fix cargo audit issue on criterion.", @@ -393,7 +203,7 @@ "smithy-rs#1923" ], "since-commit": "c3de8a3f93201f969c28deb9313c903c1315054d", - "age": 3 + "age": 4 }, { "message": "
\nThe HTTP connector used when making requests is now configurable through `SdkConfig`.\n\n```rust\nuse std::time::Duration;\nuse aws_smithy_client::{Client, hyper_ext};\nuse aws_smithy_client::erase::DynConnector;\nuse aws_smithy_client::http_connector::ConnectorSettings;\nuse aws_types::SdkConfig;\n\nlet https_connector = hyper_rustls::HttpsConnectorBuilder::new()\n .with_webpki_roots()\n .https_only()\n .enable_http1()\n .enable_http2()\n .build();\n\nlet smithy_connector = hyper_ext::Adapter::builder()\n // Optionally set things like timeouts as well\n .connector_settings(\n ConnectorSettings::builder()\n .connect_timeout(Duration::from_secs(5))\n .build()\n )\n .build(https_connector);\n\nlet sdk_config = aws_config::from_env()\n .http_connector(smithy_connector)\n .load()\n .await;\n\nlet client = Client::new(&sdk_config);\n\n// When sent, this operation will go through the custom smithy connector instead of\n// the default HTTP connector.\nlet op = client\n .get_object()\n .bucket(\"some-test-bucket\")\n .key(\"test.txt\")\n .send()\n .await\n .unwrap();\n```\n\n
\n", @@ -408,7 +218,7 @@ "smithy-rs#1918" ], "since-commit": "c3de8a3f93201f969c28deb9313c903c1315054d", - "age": 3 + "age": 4 }, { "message": "`::Client::from_conf_conn` has been removed since it's now possible to configure the connection from the\nshared and service configs. To update your code, pass connections to the `http_connector` method during config creation.\n\n
\nExample\n\nbefore:\n\n```rust\n let conf = aws_sdk_sts::Config::builder()\n // The builder has no defaults but setting other fields is omitted for brevity...\n .build();\n let (server, request) = capture_request(None);\n let client = aws_sdk_sts::Client::from_conf_conn(conf, server);\n```\n\nafter:\n\n```rust\n let (server, request) = capture_request(None);\n let conf = aws_sdk_sts::Config::builder()\n // The builder has no defaults but setting other fields is omitted for brevity...\n .http_connector(server)\n .build();\n let client = aws_sdk_sts::Client::from_conf(conf);\n```\n\n
\n", @@ -423,7 +233,7 @@ "smithy-rs#1918" ], "since-commit": "c3de8a3f93201f969c28deb9313c903c1315054d", - "age": 3 + "age": 4 }, { "message": "Add `to_vec` method to `aws_smithy_http::byte_stream::AggregatedBytes`.", @@ -437,7 +247,7 @@ "smithy-rs#1918" ], "since-commit": "c3de8a3f93201f969c28deb9313c903c1315054d", - "age": 3 + "age": 4 }, { "message": "Ability to add an inline policy or a list of policy ARNs to the `AssumeRoleProvider` builder.", @@ -452,7 +262,7 @@ "smithy-rs#1892" ], "since-commit": "c3de8a3f93201f969c28deb9313c903c1315054d", - "age": 3 + "age": 4 }, { "message": "Removed re-export of `aws_smithy_client::retry::Config` from the `middleware` module.", @@ -466,7 +276,7 @@ "smithy-rs#1935" ], "since-commit": "c3de8a3f93201f969c28deb9313c903c1315054d", - "age": 3 + "age": 4 }, { "message": "It was possible in some cases to send some S3 requests without a required upload ID, causing a risk of unintended data\ndeletion and modification. Now, when an operation has query parameters that are marked as required, the omission of\nthose query parameters will cause a BuildError, preventing the invalid operation from being sent.\n", @@ -480,7 +290,7 @@ "smithy-rs#1957" ], "since-commit": "c3de8a3f93201f969c28deb9313c903c1315054d", - "age": 3 + "age": 4 }, { "message": "Several breaking changes have been made to errors. See [the upgrade guide](https://github.com/awslabs/aws-sdk-rust/issues/657) for more information.", @@ -495,7 +305,7 @@ "smithy-rs#1819" ], "since-commit": "c3de8a3f93201f969c28deb9313c903c1315054d", - "age": 3 + "age": 4 }, { "message": "Generate enums that guide the users to write match expressions in a forward-compatible way.\nBefore this change, users could write a match expression against an enum in a non-forward-compatible way:\n```rust\nmatch some_enum {\n SomeEnum::Variant1 => { /* ... */ },\n SomeEnum::Variant2 => { /* ... */ },\n Unknown(value) if value == \"NewVariant\" => { /* ... */ },\n _ => { /* ... */ },\n}\n```\nThis code can handle a case for \"NewVariant\" with a version of SDK where the enum does not yet include `SomeEnum::NewVariant`, but breaks with another version of SDK where the enum defines `SomeEnum::NewVariant` because the execution will hit a different match arm, i.e. the last one.\nAfter this change, users are guided to write the above match expression as follows:\n```rust\nmatch some_enum {\n SomeEnum::Variant1 => { /* ... */ },\n SomeEnum::Variant2 => { /* ... */ },\n other @ _ if other.as_str() == \"NewVariant\" => { /* ... */ },\n _ => { /* ... */ },\n}\n```\nThis is forward-compatible because the execution will hit the second last match arm regardless of whether the enum defines `SomeEnum::NewVariant` or not.\n", @@ -509,7 +319,7 @@ "smithy-rs#1945" ], "since-commit": "c3de8a3f93201f969c28deb9313c903c1315054d", - "age": 3 + "age": 4 }, { "message": "Functions on `aws_smithy_http::endpoint::Endpoint` now return a `Result` instead of panicking.", @@ -524,7 +334,7 @@ "smithy-rs#1496" ], "since-commit": "c3de8a3f93201f969c28deb9313c903c1315054d", - "age": 3 + "age": 4 }, { "message": "`Endpoint::mutable` now takes `impl AsRef` instead of `Uri`. For the old functionality, use `Endpoint::mutable_uri`.", @@ -539,7 +349,7 @@ "smithy-rs#1496" ], "since-commit": "c3de8a3f93201f969c28deb9313c903c1315054d", - "age": 3 + "age": 4 }, { "message": "`Endpoint::immutable` now takes `impl AsRef` instead of `Uri`. For the old functionality, use `Endpoint::immutable_uri`.", @@ -554,7 +364,7 @@ "smithy-rs#1496" ], "since-commit": "c3de8a3f93201f969c28deb9313c903c1315054d", - "age": 3 + "age": 4 }, { "message": "Normalize URI paths per RFC3986 when constructing canonical requests, except for S3.", @@ -568,7 +378,7 @@ "smithy-rs#2018" ], "since-commit": "c3de8a3f93201f969c28deb9313c903c1315054d", - "age": 3 + "age": 4 }, { "message": "Implementation of the Debug trait for container shapes now redacts what is printed per the sensitive trait.", @@ -583,7 +393,7 @@ "smithy-rs#2029" ], "since-commit": "c3de8a3f93201f969c28deb9313c903c1315054d", - "age": 3 + "age": 4 }, { "message": "`SdkBody` callbacks have been removed. If you were using these, please [file an issue](https://github.com/awslabs/aws-sdk-rust/issues/new) so that we can better understand your use-case and provide the support you need.", @@ -597,7 +407,7 @@ "smithy-rs#2065" ], "since-commit": "c3de8a3f93201f969c28deb9313c903c1315054d", - "age": 3 + "age": 4 }, { "message": "`AwsEndpointStage`, a middleware which set endpoints and auth has been split into `AwsAuthStage` and `SmithyEndpointStage`. Related types have also been renamed.", @@ -611,7 +421,7 @@ "smithy-rs#2063" ], "since-commit": "c3de8a3f93201f969c28deb9313c903c1315054d", - "age": 3 + "age": 4 }, { "message": "The SDK clients now default max idle connections to 70 (previously unlimited) to reduce the likelihood of hitting max file handles in AWS Lambda.", @@ -626,7 +436,7 @@ "aws-sdk-rust#632" ], "since-commit": "c3de8a3f93201f969c28deb9313c903c1315054d", - "age": 3 + "age": 4 }, { "message": "The Unit type for a Union member is no longer rendered. The serializers and parsers generated now function accordingly in the absence of the inner data associated with the Unit type.\n", @@ -640,7 +450,7 @@ "smithy-rs#1989" ], "since-commit": "c3de8a3f93201f969c28deb9313c903c1315054d", - "age": 3 + "age": 4 }, { "message": "Fixed and improved the request `tracing` span hierarchy to improve log messages, profiling, and debuggability.", @@ -655,7 +465,7 @@ "smithy-rs#371" ], "since-commit": "c3de8a3f93201f969c28deb9313c903c1315054d", - "age": 3 + "age": 4 }, { "message": "Add more `tracing` events to signing and event streams", @@ -670,7 +480,7 @@ "smithy-rs#371" ], "since-commit": "c3de8a3f93201f969c28deb9313c903c1315054d", - "age": 3 + "age": 4 }, { "message": "Log an `info` on credentials cache miss and adjust level of some credential `tracing` spans/events.", @@ -684,7 +494,7 @@ "smithy-rs#2062" ], "since-commit": "c3de8a3f93201f969c28deb9313c903c1315054d", - "age": 3 + "age": 4 }, { "message": "Integrate Endpoints 2.0 into the Rust SDK. Endpoints 2.0 enables features like S3 virtual addressing & S3\nobject lambda. As part of this change, there are several breaking changes although efforts have been made to deprecate\nwhere possible to smooth the upgrade path.\n1. `aws_smithy_http::endpoint::Endpoint` and the `endpoint_resolver` methods have been deprecated. In general, these usages\n should be replaced with usages of `endpoint_url` instead. `endpoint_url` accepts a string so an `aws_smithy_http::Endpoint`\n does not need to be constructed. This structure and methods will be removed in a future release.\n2. The `endpoint_resolver` method on `::config::Builder` now accepts a service specific endpoint resolver instead\n of an implementation of `ResolveAwsEndpoint`. Most users will be able to replace these usages with a usage of `endpoint_url`.\n3. `ResolveAwsEndpoint` has been deprecated and will be removed in a future version of the SDK.\n4. The SDK does not support \"pseudo regions\" anymore. Specifically, regions like `iam-fips` will no longer resolve to a FIPS endpoint.\n", @@ -699,7 +509,7 @@ "smithy-rs#2074" ], "since-commit": "40da9a32b38e198da6ca2223b86c314b26438230", - "age": 2 + "age": 3 }, { "message": "Add additional configuration parameters to `aws_sdk_s3::Config`.\n\nThe launch of endpoints 2.0 includes more configuration options for S3. The default behavior for endpoint resolution has\nbeen changed. Before, all requests hit the path-style endpoint. Going forward, all requests that can be routed to the\nvirtually hosted bucket will be routed there automatically.\n- `force_path_style`: Requests will now default to the virtually-hosted endpoint `.s3..amazonaws.com`\n- `use_arn_region`: Enables this client to use an ARN’s region when constructing an endpoint instead of the client’s configured region.\n- `accelerate`: Enables this client to use S3 Transfer Acceleration endpoints.\n\nNote: the AWS SDK for Rust does not currently support Multi Region Access Points (MRAP).\n", @@ -714,7 +524,7 @@ "smithy-rs#2074" ], "since-commit": "40da9a32b38e198da6ca2223b86c314b26438230", - "age": 2 + "age": 3 }, { "message": "Move types for AWS SDK credentials to a separate crate.\nA new AWS runtime crate called `aws-credential-types` has been introduced. Types for AWS SDK credentials have been moved to that crate from `aws-config` and `aws-types`. The new crate is placed at the top of the dependency graph among AWS runtime crates with the aim of the downstream crates having access to the types defined in it.\n", @@ -728,7 +538,7 @@ "smithy-rs#2108" ], "since-commit": "40da9a32b38e198da6ca2223b86c314b26438230", - "age": 2 + "age": 3 }, { "message": "Add support for overriding profile name and profile file location across all providers. Prior to this change, each provider needed to be updated individually.\n\n### Before\n```rust\nuse aws_config::profile::{ProfileFileCredentialsProvider, ProfileFileRegionProvider};\nuse aws_config::profile::profile_file::{ProfileFiles, ProfileFileKind};\n\nlet profile_files = ProfileFiles::builder()\n .with_file(ProfileFileKind::Credentials, \"some/path/to/credentials-file\")\n .build();\nlet credentials_provider = ProfileFileCredentialsProvider::builder()\n .profile_files(profile_files.clone())\n .build();\nlet region_provider = ProfileFileRegionProvider::builder()\n .profile_files(profile_files)\n .build();\n\nlet sdk_config = aws_config::from_env()\n .credentials_provider(credentials_provider)\n .region(region_provider)\n .load()\n .await;\n```\n\n### After\n```rust\nuse aws_config::profile::{ProfileFileCredentialsProvider, ProfileFileRegionProvider};\nuse aws_config::profile::profile_file::{ProfileFiles, ProfileFileKind};\n\nlet profile_files = ProfileFiles::builder()\n .with_file(ProfileFileKind::Credentials, \"some/path/to/credentials-file\")\n .build();\nlet sdk_config = aws_config::from_env()\n .profile_files(profile_files)\n .load()\n .await;\n/// ```\n", @@ -742,7 +552,7 @@ "smithy-rs#2152" ], "since-commit": "40da9a32b38e198da6ca2223b86c314b26438230", - "age": 2 + "age": 3 }, { "message": "`aws_config::profile::retry_config` && `aws_config::environment::retry_config` have been removed. Use `aws_config::default_provider::retry_config` instead.", @@ -756,7 +566,7 @@ "smithy-rs#2162" ], "since-commit": "40da9a32b38e198da6ca2223b86c314b26438230", - "age": 2 + "age": 3 }, { "message": "Add support for resolving FIPS and dual-stack endpoints.\n\nFIPS and dual-stack endpoints can each be configured in multiple ways:\n1. Automatically from the environment and AWS profile\n2. Across all clients loaded from the same `SdkConfig` via `from_env().use_dual_stack(true).load().await`\n3. At a client level when constructing the configuration for an individual client.\n\nNote: Not all services support FIPS and dual-stack.\n", @@ -770,8 +580,66 @@ "smithy-rs#2168" ], "since-commit": "40da9a32b38e198da6ca2223b86c314b26438230", - "age": 2 + "age": 3 + }, + { + "message": "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.\n\nIf you previously used `LazyCachingCredentialsProvider`, you can replace it with `CredentialsCache`.\n
\nExample\n\nBefore:\n```rust\nuse aws_config::meta::credentials::lazy_caching::LazyCachingCredentialsProvider;\nuse aws_types::provider::ProvideCredentials;\n\nfn make_provider() -> impl ProvideCredentials {\n // --snip--\n}\n\nlet credentials_provider =\n LazyCachingCredentialsProvider::builder()\n .load(make_provider())\n .build();\n\nlet sdk_config = aws_config::from_env()\n .credentials_provider(credentials_provider)\n .load()\n .await;\n\nlet client = aws_sdk_s3::Client::new(&sdk_config);\n```\n\nAfter:\n```rust\nuse aws_credential_types::cache::CredentialsCache;\nuse aws_types::provider::ProvideCredentials;\n\nfn make_provider() -> impl ProvideCredentials {\n // --snip--\n}\n\n// Wrapping a result of `make_provider` in `LazyCredentialsCache` is done automatically.\nlet sdk_config = aws_config::from_env()\n .credentials_cache(CredentialsCache::lazy()) // This line can be omitted because it is on by default.\n .credentials_provider(make_provider())\n .load()\n .await;\n\nlet client = aws_sdk_s3::Client::new(&sdk_config);\n```\n\nIf you previously configured a `LazyCachingCredentialsProvider`, you can use the builder for `LazyCredentialsCache` instead.\n\nBefore:\n```rust\nuse aws_config::meta::credentials::lazy_caching::LazyCachingCredentialsProvider;\nuse aws_types::provider::ProvideCredentials;\nuse std::time::Duration;\n\nfn make_provider() -> impl ProvideCredentials {\n // --snip--\n}\n\nlet credentials_provider =\n LazyCachingCredentialsProvider::builder()\n .load(make_provider())\n .load_timeout(Duration::from_secs(60)) // Configures timeout.\n .build();\n\nlet sdk_config = aws_config::from_env()\n .credentials_provider(credentials_provider)\n .load()\n .await;\n\nlet client = aws_sdk_s3::Client::new(&sdk_config);\n```\n\nAfter:\n```rust\nuse aws_credential_types::cache::CredentialsCache;\nuse aws_types::provider::ProvideCredentials;\nuse std::time::Duration;\n\nfn make_provider() -> impl ProvideCredentials {\n // --snip--\n}\n\nlet sdk_config = aws_config::from_env()\n .credentials_cache(\n CredentialsCache::lazy_builder()\n .load_timeout(Duration::from_secs(60)) // Configures timeout.\n .into_credentials_cache(),\n )\n .credentials_provider(make_provider())\n .load()\n .await;\n\nlet client = aws_sdk_s3::Client::new(&sdk_config);\n```\n\nThe 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`.\n\n
\n\n\nIf 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.\n
\nExample\n\nBefore:\n```rust\nuse aws_config::default_provider::credentials::DefaultCredentialsChain;\nuse std::time::Duration;\n\nlet credentials_provider = DefaultCredentialsChain::builder()\n .buffer_time(Duration::from_secs(30))\n .default_credential_expiration(Duration::from_secs(20 * 60))\n .build()\n .await;\n\nlet sdk_config = aws_config::from_env()\n .credentials_provider(credentials_provider)\n .load()\n .await;\n\nlet client = aws_sdk_s3::Client::new(&sdk_config);\n```\n\nAfter:\n```rust\nuse aws_config::default_provider::credentials::default_provider;\nuse aws_credential_types::cache::CredentialsCache;\nuse std::time::Duration;\n\n// Previously used methods no longer exist on the builder for `DefaultCredentialsChain`.\nlet credentials_provider = default_provider().await;\n\nlet sdk_config = aws_config::from_env()\n .credentials_cache(\n CredentialsCache::lazy_builder()\n .buffer_time(Duration::from_secs(30))\n .default_credential_expiration(Duration::from_secs(20 * 60))\n .into_credentials_cache(),\n )\n .credentials_provider(credentials_provider)\n .load()\n .await;\n\nlet client = aws_sdk_s3::Client::new(&sdk_config);\n```\n\n
\n", + "meta": { + "bug": false, + "breaking": true, + "tada": false + }, + "author": "ysaito1001", + "references": [ + "smithy-rs#2122", + "smithy-rs#2227" + ], + "since-commit": "48ce90d3a32cc87337d87d1f291b41fc64f1e5bd", + "age": 1 + }, + { + "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`.\n\nBefore:\n```rust\nuse aws_credential_types::Credentials;\nuse aws_credential_types::provider::SharedCredentialsProvider;\nuse aws_http::auth::set_provider;\nuse aws_smithy_http::body::SdkBody;\nuse aws_smithy_http::operation;\n\nlet mut req = operation::Request::new(http::Request::new(SdkBody::from(\"some body\")));\nlet credentials = Credentials::new(\"example\", \"example\", None, None, \"my_provider_name\");\nset_provider(\n &mut req.properties_mut(),\n SharedCredentialsProvider::new(credentials),\n);\n```\n\nAfter:\n```rust\nuse aws_credential_types::Credentials;\nuse aws_credential_types::cache::{CredentialsCache, SharedCredentialsCache};\nuse aws_credential_types::provider::SharedCredentialsProvider;\nuse aws_http::auth::set_credentials_cache;\nuse aws_smithy_http::body::SdkBody;\nuse aws_smithy_http::operation;\n\nlet mut req = operation::Request::new(http::Request::new(SdkBody::from(\"some body\")));\nlet credentials = Credentials::new(\"example\", \"example\", None, None, \"my_provider_name\");\nlet credentials_cache = CredentialsCache::lazy_builder()\n .into_credentials_cache()\n .create_cache(SharedCredentialsProvider::new(credentials));\nset_credentials_cache(\n &mut req.properties_mut(),\n SharedCredentialsCache::new(credentials_cache),\n);\n```\n", + "meta": { + "bug": false, + "breaking": true, + "tada": false + }, + "author": "ysaito1001", + "references": [ + "smithy-rs#2122", + "smithy-rs#2227" + ], + "since-commit": "48ce90d3a32cc87337d87d1f291b41fc64f1e5bd", + "age": 1 + }, + { + "message": "Fix endpoint for s3.write_get_object_response(). This bug was introduced in 0.53.", + "meta": { + "bug": true, + "breaking": false, + "tada": false + }, + "author": "rcoh", + "references": [ + "smithy-rs#2204" + ], + "since-commit": "48ce90d3a32cc87337d87d1f291b41fc64f1e5bd", + "age": 1 + }, + { + "message": "Add `with_test_defaults()` and `set_test_defaults()` to `::Config`. These methods fill in defaults for configuration that is mandatory to successfully send a request.", + "meta": { + "bug": false, + "breaking": false, + "tada": false + }, + "author": "rcoh", + "references": [ + "smithy-rs#2204" + ], + "since-commit": "48ce90d3a32cc87337d87d1f291b41fc64f1e5bd", + "age": 1 } ], "aws-sdk-model": [] -} +} \ No newline at end of file