diff --git a/.cargo-deny-config.toml b/.cargo-deny-config.toml
index b79e85383f..a90029c388 100644
--- a/.cargo-deny-config.toml
+++ b/.cargo-deny-config.toml
@@ -35,6 +35,20 @@ name = "ring"
expression = "MIT AND ISC AND OpenSSL"
license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }]
+[[licenses.clarify]]
+name = "webpki"
+expression = "ISC"
+license-files = [
+ { path = "LICENSE", hash = 0x001c7e6c },
+]
+
+[[licenses.clarify]]
+name = "rustls-webpki"
+expression = "ISC"
+license-files = [
+ { path = "LICENSE", hash = 0x001c7e6c },
+]
+
# This section is considered when running `cargo deny check bans`.
# More documentation about the 'bans' section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html
diff --git a/.cargo/config.toml b/.cargo/config.toml
index 0015055659..5afa0e9471 100644
--- a/.cargo/config.toml
+++ b/.cargo/config.toml
@@ -1,3 +1,7 @@
[build]
# Share one `target` directory at the project root for all Cargo projects and workspaces in smithy-rs
target-dir = "target"
+
+# TODO(https://github.com/awslabs/smithy-rs/issues/2766): The sparse registry config can be removed when upgrading to Rust 1.70
+[registries.crates-io]
+protocol = "sparse"
diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml
index 2229148de3..6f361c926d 100644
--- a/.github/workflows/ci-main.yml
+++ b/.github/workflows/ci-main.yml
@@ -32,7 +32,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Acquire credentials
- uses: aws-actions/configure-aws-credentials@v1-node16
+ uses: aws-actions/configure-aws-credentials@v2.2.0
with:
role-to-assume: ${{ secrets.SMITHY_RS_PUBLIC_ECR_PUSH_ROLE_ARN }}
role-session-name: GitHubActions
diff --git a/.github/workflows/ci-merge-queue.yml b/.github/workflows/ci-merge-queue.yml
index bedab9beb5..cfad5aab2f 100644
--- a/.github/workflows/ci-merge-queue.yml
+++ b/.github/workflows/ci-merge-queue.yml
@@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Attempt to load a docker login password
- uses: aws-actions/configure-aws-credentials@v1-node16
+ uses: aws-actions/configure-aws-credentials@v2.2.0
with:
role-to-assume: ${{ secrets.SMITHY_RS_PUBLIC_ECR_PUSH_ROLE_ARN }}
role-session-name: GitHubActions
@@ -67,7 +67,7 @@ jobs:
DOCKER_BUILDKIT: 1
run: ./smithy-rs/.github/scripts/acquire-build-image
- name: Acquire credentials
- uses: aws-actions/configure-aws-credentials@v1-node16
+ uses: aws-actions/configure-aws-credentials@v2.2.0
with:
role-to-assume: ${{ secrets.SMITHY_RS_PUBLIC_ECR_PUSH_ROLE_ARN }}
role-session-name: GitHubActions
diff --git a/.github/workflows/ci-pr.yml b/.github/workflows/ci-pr.yml
index 374d23a9b4..89d8099519 100644
--- a/.github/workflows/ci-pr.yml
+++ b/.github/workflows/ci-pr.yml
@@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Attempt to load a docker login password
- uses: aws-actions/configure-aws-credentials@v1-node16
+ uses: aws-actions/configure-aws-credentials@v2.2.0
with:
role-to-assume: ${{ secrets.SMITHY_RS_PUBLIC_ECR_PUSH_ROLE_ARN }}
role-session-name: GitHubActions
@@ -69,7 +69,7 @@ jobs:
DOCKER_BUILDKIT: 1
run: ./smithy-rs/.github/scripts/acquire-build-image
- name: Acquire credentials
- uses: aws-actions/configure-aws-credentials@v1-node16
+ uses: aws-actions/configure-aws-credentials@v2.2.0
with:
role-to-assume: ${{ secrets.SMITHY_RS_PUBLIC_ECR_PUSH_ROLE_ARN }}
role-session-name: GitHubActions
@@ -107,3 +107,41 @@ jobs:
secrets:
SMITHY_RS_PULL_REQUEST_CDN_S3_BUCKET_NAME: ${{ secrets.SMITHY_RS_PULL_REQUEST_CDN_S3_BUCKET_NAME }}
SMITHY_RS_PULL_REQUEST_CDN_ROLE_ARN: ${{ secrets.SMITHY_RS_PULL_REQUEST_CDN_ROLE_ARN }}
+
+ semver-checks:
+ name: check the semver status of this PR
+ runs-on: smithy_ubuntu-latest_8-core
+ needs:
+ - save-docker-login-token
+ - acquire-base-image
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ path: smithy-rs
+ ref: ${{ inputs.git_ref }}
+ - name: Get PR info
+ id: check-breaking-label
+ uses: actions/github-script@v6
+ with:
+ script: |
+ const response = await github.rest.pulls.get({
+ pull_number: context.issue.number,
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ });
+ const labels = response.data.labels.map(l => l.name);
+ const isBreaking = labels.includes("breaking-change");
+ const data = {
+ labels,
+ isBreaking
+ };
+ console.log("data:", data);
+ return data;
+ - name: Run semver check
+ uses: ./smithy-rs/.github/actions/docker-build
+ with:
+ action: check-semver
+ action-arguments: ${{ github.event.pull_request.base.sha }} ${{ fromJSON(steps.check-breaking-label.outputs.result).isBreaking }}
+ - name: print help message
+ if: failure()
+ run: echo "::error::This pull request contains breaking changes. Please add the `breaking-changes` label and a changelog entry"
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 8814fdd364..f4208b271a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -29,7 +29,7 @@ on:
required: false
env:
- rust_version: 1.66.1
+ rust_version: 1.69.0
rust_toolchain_components: clippy,rustfmt
ENCRYPTED_DOCKER_PASSWORD: ${{ secrets.ENCRYPTED_DOCKER_PASSWORD }}
DOCKER_LOGIN_TOKEN_PASSPHRASE: ${{ secrets.DOCKER_LOGIN_TOKEN_PASSPHRASE }}
@@ -84,6 +84,9 @@ jobs:
test:
- action: check-aws-sdk-adhoc-tests
runner: ubuntu-latest
+ # TODO(enableNewSmithyRuntimeCleanup): Remove `check-aws-sdk-middleware-impl` when cleaning up middleware
+ - action: check-aws-sdk-middleware-impl
+ runner: smithy_ubuntu-latest_8-core
- action: check-client-codegen-integration-tests
runner: smithy_ubuntu-latest_8-core
- action: check-client-codegen-unit-tests
@@ -108,6 +111,8 @@ jobs:
runner: ubuntu-latest
- action: check-style-and-lints
runner: ubuntu-latest
+ - action: check-book
+ runner: ubuntu-latest
- action: check-tools
runner: smithy_ubuntu-latest_8-core
- action: check-deterministic-codegen
@@ -159,6 +164,8 @@ jobs:
with:
action: ${{ matrix.test.action }}
+
+
test-rust-windows:
name: Rust Tests on Windows
runs-on: windows-latest
@@ -189,8 +196,9 @@ jobs:
pushd "${runtime_path}" &>/dev/null
# aws-smithy-http-server-python cannot be compiled on Windows since it uses the `signal-hook` crate
# which is not really yet fully supported on the platform.
- cargo test --all-features --workspace --exclude aws-smithy-http-server-python
- cargo doc --no-deps --document-private-items --all-features --workspace --exclude aws-smithy-http-server-python
+ # aws-smithy-http-server-typescript cannot be compiled right now on Windows.
+ cargo test --all-features --workspace --exclude aws-smithy-http-server-python --exclude aws-smithy-http-server-typescript
+ cargo doc --no-deps --document-private-items --all-features --workspace --exclude aws-smithy-http-server-python --exclude aws-smithy-http-server-typescript
popd &>/dev/null
done
@@ -205,29 +213,27 @@ jobs:
matrix:
include:
# We always exclude aws-smithy-http-server-python since the Python framework is experimental.
- # We only build the `native-tls` feature here because `rustls` depends on `ring` which in turn
- # does not support powerpc as a target platform (see https://github.com/briansmith/ring/issues/389)
- target: i686-unknown-linux-gnu
build_smithy_rs_features: --all-features
build_aws_exclude: ''
- build_smithy_rs_exclude: --exclude aws-smithy-http-server-python
+ build_smithy_rs_exclude: --exclude aws-smithy-http-server-python --exclude aws-smithy-http-server-typescript
test_smithy_rs_features: --all-features
test_aws_exclude: ''
- test_smithy_rs_exclude: --exclude aws-smithy-http-server-python
+ test_smithy_rs_exclude: --exclude aws-smithy-http-server-python --exclude aws-smithy-http-server-typescript
- target: powerpc-unknown-linux-gnu
- build_smithy_rs_features: --features native-tls
+ build_smithy_rs_features: ''
build_aws_exclude: --exclude aws-inlineable
- build_smithy_rs_exclude: --exclude aws-smithy-http-server-python
- test_smithy_rs_features: --features native-tls
+ build_smithy_rs_exclude: --exclude aws-smithy-http-server-python --exclude aws-smithy-http-server-typescript
+ test_smithy_rs_features: ''
test_aws_exclude: --exclude aws-inlineable
- test_smithy_rs_exclude: --exclude aws-smithy-http-server-python
+ test_smithy_rs_exclude: --exclude aws-smithy-http-server-python --exclude aws-smithy-http-server-typescript
- target: powerpc64-unknown-linux-gnu
- build_smithy_rs_features: --features native-tls
+ build_smithy_rs_features: ''
build_aws_exclude: --exclude aws-inlineable
- build_smithy_rs_exclude: --exclude aws-smithy-http-server-python
- test_smithy_rs_features: --features native-tls
+ build_smithy_rs_exclude: --exclude aws-smithy-http-server-python --exclude aws-smithy-http-server-typescript
+ test_smithy_rs_features: ''
test_aws_exclude: --exclude aws-inlineable
- test_smithy_rs_exclude: --exclude aws-smithy-http-server-python
+ test_smithy_rs_exclude: --exclude aws-smithy-http-server-python --exclude aws-smithy-http-server-typescript
env:
CROSS_CONFIG: Cross.toml
steps:
diff --git a/.github/workflows/claim-crate-names.yml b/.github/workflows/claim-crate-names.yml
index ef24446bb7..6f714a7671 100644
--- a/.github/workflows/claim-crate-names.yml
+++ b/.github/workflows/claim-crate-names.yml
@@ -10,7 +10,7 @@ concurrency:
cancel-in-progress: true
env:
- rust_version: 1.66.1
+ rust_version: 1.69.0
name: Claim unpublished crate names on crates.io
run-name: ${{ github.workflow }}
diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml
index 83926c09ac..c15767baa1 100644
--- a/.github/workflows/github-pages.yml
+++ b/.github/workflows/github-pages.yml
@@ -7,6 +7,9 @@ on:
name: Update GitHub Pages
+env:
+ rust_version: 1.69.0
+
# Allow only one doc pages build to run at a time for the entire smithy-rs repo
concurrency:
group: github-pages-yml
@@ -20,7 +23,9 @@ jobs:
uses: actions/checkout@v3
with:
persist-credentials: false
- - uses: dtolnay/rust-toolchain@stable
+ - uses: dtolnay/rust-toolchain@master
+ with:
+ toolchain: ${{ env.rust_version }}
- name: Generate docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/pull-request-bot.yml b/.github/workflows/pull-request-bot.yml
index 6d22213eb5..82fc80d975 100644
--- a/.github/workflows/pull-request-bot.yml
+++ b/.github/workflows/pull-request-bot.yml
@@ -28,7 +28,7 @@ concurrency:
env:
java_version: 11
- rust_version: 1.66.1
+ rust_version: 1.69.0
rust_toolchain_components: clippy,rustfmt
apt_dependencies: libssl-dev gnuplot jq
@@ -55,7 +55,7 @@ jobs:
with:
action: generate-codegen-diff
action-arguments: ${{ inputs.base_revision }}
- - uses: aws-actions/configure-aws-credentials@v1-node16
+ - uses: aws-actions/configure-aws-credentials@v2.2.0
name: Acquire credentials for uploading to S3
with:
role-to-assume: ${{ secrets.SMITHY_RS_PULL_REQUEST_CDN_ROLE_ARN }}
@@ -110,7 +110,7 @@ jobs:
./gradlew -Paws.services=+sts,+sso,+transcribestreaming,+dynamodb :aws:sdk:assemble
# Copy the Server runtime crate(s) in
- cp -r rust-runtime/aws-smithy-http-server rust-runtime/aws-smithy-http-server-python aws/sdk/build/aws-sdk/sdk
+ cp -r rust-runtime/aws-smithy-http-server rust-runtime/aws-smithy-http-server-python rust-runtime/aws-smithy-http-server-typescript aws/sdk/build/aws-sdk/sdk
pushd aws/sdk/build/aws-sdk
@@ -118,14 +118,14 @@ jobs:
sed -i '/examples/d' Cargo.toml
# Add server runtime crates to the workspace
- sed -i 's/"sdk\/sts",/"sdk\/sts","sdk\/aws-smithy-http-server","sdk\/aws-smithy-http-server-python",/' Cargo.toml
+ sed -i 's/"sdk\/sts",/"sdk\/sts","sdk\/aws-smithy-http-server","sdk\/aws-smithy-http-server-python","sdk\/aws-smithy-http-server-typescript",/' Cargo.toml
cargo doc --no-deps --all-features
popd
./tools/ci-scripts/generate-doc-preview-index.sh ${{ inputs.base_revision }}
echo 'bot-message=A [new doc preview](https://d2luzm2xt3nokh.cloudfront.net/docs/'${{ inputs.head_revision }}'/index.html) is ready to view.' >> "${GITHUB_OUTPUT}"
- - uses: aws-actions/configure-aws-credentials@v1-node16
+ - uses: aws-actions/configure-aws-credentials@v2.2.0
name: Acquire credentials for uploading to S3
with:
role-to-assume: ${{ secrets.SMITHY_RS_PULL_REQUEST_CDN_ROLE_ARN }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 52ddfdfe7a..7d33ceba4c 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -10,7 +10,7 @@ concurrency:
cancel-in-progress: true
env:
- rust_version: 1.66.1
+ rust_version: 1.69.0
name: Release smithy-rs
run-name: ${{ github.workflow }} ${{ inputs.semantic_version }} (${{ inputs.commit_sha }}) - ${{ inputs.dry_run && 'Dry run' || 'Production run' }}
diff --git a/.github/workflows/update-sdk-next.yml b/.github/workflows/update-sdk-next.yml
index c96b09b73f..155924020a 100644
--- a/.github/workflows/update-sdk-next.yml
+++ b/.github/workflows/update-sdk-next.yml
@@ -32,7 +32,7 @@ jobs:
- name: Set up Rust
uses: dtolnay/rust-toolchain@master
with:
- toolchain: 1.66.1
+ toolchain: 1.69.0
- name: Delete old SDK
run: |
- name: Generate a fresh SDK
@@ -47,7 +47,7 @@ jobs:
git checkout origin/main -b next
# Delete the old SDK
- rm -rf sdk examples
+ rm -rf sdk examples tests
rm -f versions.toml Cargo.toml index.md
# Copy in the new SDK
diff --git a/.gitignore b/.gitignore
index 710a23e16b..268344ecb1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -56,3 +56,6 @@ target/
# tools
.tool-versions
+
+# python
+__pycache__
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index cce6e26327..a45d403a09 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -20,7 +20,7 @@ repos:
files: ^.*$
pass_filenames: false
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
- rev: v2.6.0
+ rev: v2.10.0
hooks:
- id: pretty-format-kotlin
args: [--autofix, --ktlint-version, 0.48.2]
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e4eaa57e2f..9cb6e47746 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,496 @@
+August 1st, 2023
+================
+**Breaking Changes:**
+- ⚠🎉 (server, [smithy-rs#2740](https://github.com/awslabs/smithy-rs/issues/2740), [smithy-rs#2759](https://github.com/awslabs/smithy-rs/issues/2759), [smithy-rs#2779](https://github.com/awslabs/smithy-rs/issues/2779), [smithy-rs#2827](https://github.com/awslabs/smithy-rs/issues/2827), @hlbarber) The middleware system has been reworked as we push for a unified, simple, and consistent API. The following changes have been made in service of this goal:
+
+ - A `ServiceShape` trait has been added.
+ - The `Plugin` trait has been simplified.
+ - The `HttpMarker` and `ModelMarker` marker traits have been added to better distinguish when plugins run and what they have access to.
+ - The `Operation` structure has been removed.
+ - A `Scoped` `Plugin` has been added.
+
+ The `Plugin` trait has now been simplified and the `Operation` struct has been removed.
+
+ ## Addition of `ServiceShape`
+
+ Since the [0.52 release](https://github.com/awslabs/smithy-rs/releases/tag/release-2022-12-12) the `OperationShape` has existed.
+
+ ```rust
+ /// Models the [Smithy Operation shape].
+ ///
+ /// [Smithy Operation shape]: https://awslabs.github.io/smithy/1.0/spec/core/model.html#operation
+ pub trait OperationShape {
+ /// The ID of the operation.
+ const ID: ShapeId;
+
+ /// The operation input.
+ type Input;
+ /// The operation output.
+ type Output;
+ /// The operation error. [`Infallible`](std::convert::Infallible) in the case where no error
+ /// exists.
+ type Error;
+ }
+ ```
+
+ This allowed `Plugin` authors to access these associated types and constants. See the [`PrintPlugin`](https://github.com/awslabs/smithy-rs/blob/main/examples/pokemon-service/src/plugin.rs) as an example.
+
+ We continue with this approach and introduce the following trait:
+
+ ```rust
+ /// Models the [Smithy Service shape].
+ ///
+ /// [Smithy Service shape]: https://smithy.io/2.0/spec/service-types.html
+ pub trait ServiceShape {
+ /// The [`ShapeId`] of the service.
+ const ID: ShapeId;
+
+ /// The version of the service.
+ const VERSION: Option<&'static str>;
+
+ /// The [Protocol] applied to this service.
+ ///
+ /// [Protocol]: https://smithy.io/2.0/spec/protocol-traits.html
+ type Protocol;
+
+ /// An enumeration of all operations contained in this service.
+ type Operations;
+ }
+ ```
+
+ With the changes to `Plugin`, described below, middleware authors now have access to this information at compile time.
+
+ ## Simplication of the `Plugin` trait
+
+ Previously,
+
+ ```rust
+ trait Plugin
{
+ type Service;
+ type Layer;
+
+ fn map(&self, input: Operation) -> Operation;
+ }
+ ```
+
+ modified an `Operation`.
+
+ Now,
+
+ ```rust
+ trait Plugin {
+ type Output;
+
+ fn apply(&self, input: T) -> Self::Output;
+ }
+ ```
+
+ maps a `tower::Service` to a `tower::Service`. This is equivalent to `tower::Layer` with two extra type parameters: `Service` and `Operation`, which implement `ServiceShape` and `OperationShape` respectively.
+
+ Having both `Service` and `Operation` as type parameters also provides an even surface for advanced users to extend the codegenerator in a structured way. See [this issue](https://github.com/awslabs/smithy-rs/issues/2777) for more context.
+
+ The following middleware setup
+
+ ```rust
+ pub struct PrintService {
+ inner: S,
+ name: &'static str,
+ }
+
+ impl Service for PrintService
+ where
+ S: Service,
+ {
+ async fn call(&mut self, req: R) -> Self::Future {
+ println!("Hi {}", self.name);
+ self.inner.call(req)
+ }
+ }
+
+ pub struct PrintLayer {
+ name: &'static str,
+ }
+
+ impl Layer for PrintLayer {
+ type Service = PrintService;
+
+ fn layer(&self, service: S) -> Self::Service {
+ PrintService {
+ inner: service,
+ name: self.name,
+ }
+ }
+ }
+
+ pub struct PrintPlugin;
+
+ impl
Plugin
for PrintPlugin
+ where
+ Op: OperationShape,
+ {
+ type Service = S;
+ type Layer = Stack;
+
+ fn map(&self, input: Operation) -> Operation {
+ input.layer(PrintLayer { name: Op::NAME })
+ }
+ }
+ ```
+
+ now becomes
+
+ ```rust
+ pub struct PrintService {
+ inner: S,
+ name: &'static str,
+ }
+
+ impl Service for PrintService
+ where
+ S: Service,
+ {
+ async fn call(&mut self, req: R) -> Self::Future {
+ println!("Hi {}", self.name);
+ self.inner.call(req)
+ }
+ }
+
+ pub struct PrintPlugin;
+
+ impl Plugin for PrintPlugin
+ where
+ Op: OperationShape,
+ {
+ type Output = PrintService;
+
+ fn apply(&self, inner: T) -> Self::Output {
+ PrintService { inner, name: Op::ID.name() }
+ }
+ }
+
+ impl HttpMarker for PrintPlugin { }
+ ```
+
+ Alternatively, using the new `ServiceShape`, implemented on `Ser`:
+
+ ```rust
+ impl Plugin for PrintPlugin
+ where
+ Ser: ServiceShape,
+ {
+ type Service = PrintService;
+
+ fn apply(&self, inner: T) -> Self::Service {
+ PrintService { inner, name: Ser::ID.name() }
+ }
+ }
+ ```
+
+ A single `Plugin` can no longer apply a `tower::Layer` on HTTP requests/responses _and_ modelled structures at the same time (see middleware positions [C](https://awslabs.github.io/smithy-rs/design/server/middleware.html#c-operation-specific-http-middleware) and [D](https://awslabs.github.io/smithy-rs/design/server/middleware.html#d-operation-specific-model-middleware). Instead one `Plugin` must be specified for each and passed to the service builder constructor separately:
+
+ ```rust
+ let app = PokemonService::builder_with_plugins(/* HTTP plugins */, /* model plugins */)
+ /* setters */
+ .build()
+ .unwrap();
+ ```
+
+ To better distinguish when a plugin runs and what it has access to, `Plugin`s now have to additionally implement the `HttpMarker` marker trait, the `ModelMarker` marker trait, or both:
+
+ - A HTTP plugin acts on the HTTP request before it is deserialized, and acts on the HTTP response after it is serialized.
+ - A model plugin acts on the modeled operation input after it is deserialized, and acts on the modeled operation output or the modeled operation error before it is serialized.
+
+ The motivation behind this change is to simplify the job of middleware authors, separate concerns, accomodate common cases better, and to improve composition internally.
+
+ Because `Plugin` is now closer to `tower::Layer` we have two canonical converters:
+
+ ```rust
+ use aws_smithy_http_server::plugin::{PluginLayer, LayerPlugin};
+
+ // Convert from `Layer` to `Plugin` which applies uniformly across all operations
+ let layer = /* some layer */;
+ let plugin = PluginLayer(layer);
+
+ // Convert from `Plugin` to `Layer` for some fixed protocol and operation
+ let plugin = /* some plugin */;
+ let layer = LayerPlugin::new::(plugin);
+ ```
+
+ ## Removal of `PluginPipeline`
+
+ Since plugins now come in two flavors (those marked with `HttpMarker` and those marked with `ModelMarker`) that shouldn't be mixed in a collection of plugins, the primary way of concatenating plugins, `PluginPipeline` has been removed in favor of the `HttpPlugins` and `ModelPlugins` types, which eagerly check that whenever a plugin is pushed, it is of the expected type.
+
+ This worked before, but you wouldn't be able to do apply this collection of plugins anywhere; if you tried to, the compilation error messages would not be very helpful:
+
+ ```rust
+ use aws_smithy_http_server::plugin::PluginPipeline;
+
+ let pipeline = PluginPipeline::new().push(http_plugin).push(model_plugin);
+ ```
+
+ Now collections of plugins must contain plugins of the same flavor:
+
+ ```rust
+ use aws_smithy_http_server::plugin::{HttpPlugins, ModelPlugins};
+
+ let http_plugins = HttpPlugins::new()
+ .push(http_plugin)
+ // .push(model_plugin) // This fails to compile with a helpful error message.
+ .push(&http_and_model_plugin);
+ let model_plugins = ModelPlugins::new()
+ .push(model_plugin)
+ .push(&http_and_model_plugin);
+ ```
+
+ In the above example, `&http_and_model_plugin` implements both `HttpMarker` and `ModelMarker`, so we can add it to both collections.
+
+ ## Removal of `Operation`
+
+ The `aws_smithy_http_server::operation::Operation` structure has now been removed. Previously, there existed a `{operation_name}_operation` setter on the service builder, which accepted an `Operation`. This allowed users to
+
+ ```rust
+ let operation /* : Operation<_, _> */ = GetPokemonSpecies::from_service(/* tower::Service */);
+
+ let app = PokemonService::builder_without_plugins()
+ .get_pokemon_species_operation(operation)
+ /* other setters */
+ .build()
+ .unwrap();
+ ```
+
+ to set an operation with a `tower::Service`, and
+
+ ```rust
+ let operation /* : Operation<_, _> */ = GetPokemonSpecies::from_service(/* tower::Service */).layer(/* layer */);
+ let operation /* : Operation<_, _> */ = GetPokemonSpecies::from_handler(/* closure */).layer(/* layer */);
+
+ let app = PokemonService::builder_without_plugins()
+ .get_pokemon_species_operation(operation)
+ /* other setters */
+ .build()
+ .unwrap();
+ ```
+
+ to add a `tower::Layer` (acting on HTTP requests/responses post-routing) to a single operation.
+
+ We have seen little adoption of this API and for this reason we have opted instead to introduce a new setter, accepting a `tower::Service`, on the service builder:
+
+ ```rust
+ let app = PokemonService::builder_without_plugins()
+ .get_pokemon_species_service(/* tower::Service */)
+ /* other setters */
+ .build()
+ .unwrap();
+ ```
+
+ Applying a `tower::Layer` to a _subset_ of operations is should now be done through the `Plugin` API via `filter_by_operation_id`
+
+ ```rust
+ use aws_smithy_http_server::plugin::{PluginLayer, filter_by_operation_name, IdentityPlugin};
+
+ let plugin = PluginLayer(/* layer */);
+ let scoped_plugin = filter_by_operation_name(plugin, |id| id == GetPokemonSpecies::ID);
+
+ let app = PokemonService::builder_with_plugins(scoped_plugin, IdentityPlugin)
+ .get_pokemon_species(/* handler */)
+ /* other setters */
+ .build()
+ .unwrap();
+ ```
+
+ or the new `Scoped` `Plugin` introduced below.
+
+ # Addition of `Scoped`
+
+ Currently, users can selectively apply a `Plugin` via the `filter_by_operation_id` function
+
+ ```rust
+ use aws_smithy_http_server::plugin::filter_by_operation_id;
+ // Only apply `plugin` to `CheckHealth` and `GetStorage` operation
+ let filtered_plugin = filter_by_operation_id(plugin, |name| name == CheckHealth::ID || name == GetStorage::ID);
+ ```
+
+ In addition to this, we now provide `Scoped`, which selectively applies a `Plugin` at _compiletime_. Users should prefer this to `filter_by_operation_id` when applicable.
+
+ ```rust
+ use aws_smithy_http_server::plugin::Scoped;
+ use pokemon_service_server_sdk::scoped;
+
+ scope! {
+ /// Includes only the `CheckHealth` and `GetStorage` operation.
+ struct SomeScope {
+ includes: [CheckHealth, GetStorage]
+ }
+ }
+ let scoped_plugin = Scoped::new::(plugin);
+ ```
+
+- ⚠ (all, [smithy-rs#2675](https://github.com/awslabs/smithy-rs/issues/2675)) Remove native-tls and add a migration guide.
+- ⚠ (client, [smithy-rs#2671](https://github.com/awslabs/smithy-rs/issues/2671))
+ Breaking change in how event stream signing works (click to expand more details)
+
+ This change will only impact you if you are wiring up their own event stream signing/authentication scheme. If you're using `aws-sig-auth` to use AWS SigV4 event stream signing, then this change will **not** impact you.
+
+ Previously, event stream signing was configured at codegen time by placing a `new_event_stream_signer` method on the `Config`. This function was called at serialization time to connect the signer to the streaming body. Now, instead, a special `DeferredSigner` is wired up at serialization time that relies on a signing implementation to be sent on a channel by the HTTP request signer. To do this, a `DeferredSignerSender` must be pulled out of the property bag, and its `send()` method called with the desired event stream signing implementation.
+
+ See the changes in https://github.com/awslabs/smithy-rs/pull/2671 for an example of how this was done for SigV4.
+
+- ⚠ (all, [smithy-rs#2673](https://github.com/awslabs/smithy-rs/issues/2673)) For event stream operations, the `EventStreamSender` in inputs/outputs now requires the passed in `Stream` impl to implement `Sync`.
+- ⚠ (server, [smithy-rs#2539](https://github.com/awslabs/smithy-rs/issues/2539)) Code generation will abort if the `ignoreUnsupportedConstraints` codegen flag has no effect, that is, if all constraint traits used in your model are well-supported. Please remove the flag in such case.
+- ⚠ (client, [smithy-rs#2728](https://github.com/awslabs/smithy-rs/issues/2728), [smithy-rs#2262](https://github.com/awslabs/smithy-rs/issues/2262), [aws-sdk-rust#2087](https://github.com/awslabs/aws-sdk-rust/issues/2087)) The property bag type for Time is now `SharedTimeSource`, not `SystemTime`. If your code relies on setting request time, use `aws_smithy_async::time::SharedTimeSource`.
+- ⚠ (server, [smithy-rs#2676](https://github.com/awslabs/smithy-rs/issues/2676), [smithy-rs#2685](https://github.com/awslabs/smithy-rs/issues/2685)) Bump dependency on `lambda_http` by `aws-smithy-http-server` to 0.8.0. This version of `aws-smithy-http-server` is only guaranteed to be compatible with 0.8.0, or semver-compatible versions of 0.8.0 of the `lambda_http` crate. It will not work with versions prior to 0.8.0 _at runtime_, making requests to your smithy-rs service unroutable, so please make sure you're running your service in a compatible configuration
+- ⚠ (server, [smithy-rs#2457](https://github.com/awslabs/smithy-rs/issues/2457), @hlbarber) Remove `PollError` from an operations `Service::Error`.
+
+ Any [`tower::Service`](https://docs.rs/tower/latest/tower/trait.Service.html) provided to
+ [`Operation::from_service`](https://docs.rs/aws-smithy-http-server/latest/aws_smithy_http_server/operation/struct.Operation.html#method.from_service)
+ no longer requires `Service::Error = OperationError`, instead requiring just `Service::Error = Op::Error`.
+- ⚠ (client, [smithy-rs#2742](https://github.com/awslabs/smithy-rs/issues/2742)) A newtype wrapper `SharedAsyncSleep` has been introduced and occurrences of `Arc` that appear in public APIs have been replaced with it.
+- ⚠ (all, [smithy-rs#2893](https://github.com/awslabs/smithy-rs/issues/2893)) Update MSRV to Rust 1.69.0
+- ⚠ (server, [smithy-rs#2678](https://github.com/awslabs/smithy-rs/issues/2678)) `ShapeId` is the new structure used to represent a shape, with its absolute name, namespace and name.
+ `OperationExtension`'s members are replaced by the `ShapeId` and operations' names are now replced by a `ShapeId`.
+
+ Before you had an operation and an absolute name as its `NAME` member. You could apply a plugin only to some selected operation:
+
+ ```
+ filter_by_operation_name(plugin, |name| name != Op::ID);
+ ```
+
+ Your new filter selects on an operation's absolute name, namespace or name.
+
+ ```
+ filter_by_operation_id(plugin, |id| id.name() != Op::ID.name());
+ ```
+
+ The above filter is applied to an operation's name, the one you use to specify the operation in the Smithy model.
+
+ You can filter all operations in a namespace or absolute name:
+
+ ```
+ filter_by_operation_id(plugin, |id| id.namespace() != "namespace");
+ filter_by_operation_id(plugin, |id| id.absolute() != "namespace#name");
+ ```
+- ⚠ (client, [smithy-rs#2758](https://github.com/awslabs/smithy-rs/issues/2758)) The occurrences of `Arc` have now been replaced with `SharedEndpointResolver` in public APIs.
+- ⚠ (server, [smithy-rs#2740](https://github.com/awslabs/smithy-rs/issues/2740), [smithy-rs#2759](https://github.com/awslabs/smithy-rs/issues/2759), [smithy-rs#2779](https://github.com/awslabs/smithy-rs/issues/2779), @hlbarber) Remove `filter_by_operation_id` and `plugin_from_operation_id_fn` in favour of `filter_by_operation` and `plugin_from_operation_fn`.
+
+ Previously, we provided `filter_by_operation_id` which filtered `Plugin` application via a predicate over the Shape ID.
+
+ ```rust
+ use aws_smithy_http_server::plugin::filter_by_operation_id;
+ use pokemon_service_server_sdk::operation_shape::CheckHealth;
+
+ let filtered = filter_by_operation_id(plugin, |name| name != CheckHealth::NAME);
+ ```
+
+ This had the problem that the user is unable to exhaustively match over a `&'static str`. To remedy this we have switched to `filter_by_operation` which is a predicate over an enum containing all operations contained in the service.
+
+ ```rust
+ use aws_smithy_http_server::plugin::filter_by_operation_id;
+ use pokemon_service_server_sdk::service::Operation;
+
+ let filtered = filter_by_operation(plugin, |op: Operation| op != Operation::CheckHealth);
+ ```
+
+ Similarly, `plugin_from_operation_fn` now allows for
+
+ ```rust
+ use aws_smithy_http_server::plugin::plugin_from_operation_fn;
+ use pokemon_service_server_sdk::service::Operation;
+
+ fn map(op: Operation, inner: S) -> PrintService {
+ match op {
+ Operation::CheckHealth => PrintService { name: op.shape_id().name(), inner },
+ Operation::GetPokemonSpecies => PrintService { name: "hello world", inner },
+ _ => todo!()
+ }
+ }
+
+ let plugin = plugin_from_operation_fn(map);
+ ```
+- ⚠ (client, [smithy-rs#2783](https://github.com/awslabs/smithy-rs/issues/2783)) The naming `make_token` for fields and the API of `IdempotencyTokenProvider` in service configs and their builders has now been updated to `idempotency_token_provider`.
+- ⚠ (client, [smithy-rs#2845](https://github.com/awslabs/smithy-rs/issues/2845)) `aws_smithy_async::future::rendezvous::Sender::send` no longer exposes `tokio::sync::mpsc::error::SendError` for the error of its return type and instead exposes a new-type wrapper called `aws_smithy_async::future::rendezvous::error::SendError`. In addition, the `aws_smithy_xml` crate no longer exposes types from `xmlparser`.
+- ⚠ (client, [smithy-rs#2848](https://github.com/awslabs/smithy-rs/issues/2848)) The implementation `From` for `aws_smithy_http::event_stream::RawMessage` has been removed.
+- ⚠ (server, [smithy-rs#2865](https://github.com/awslabs/smithy-rs/issues/2865)) The `alb_health_check` module has been moved out of the `plugin` module into a new `layer` module. ALB health checks should be enacted before routing, and plugins run after routing, so the module location was misleading. Examples have been corrected to reflect the intended application of the layer.
+- ⚠ (client, [smithy-rs#2873](https://github.com/awslabs/smithy-rs/issues/2873)) The `test-util` feature in aws-smithy-client has been split to include a separate `wiremock` feature. This allows test-util to be used without a Hyper server dependency making it usable in webassembly targets.
+- ⚠ (client) The entire architecture of generated clients has been overhauled. See the [upgrade guide](https://github.com/awslabs/smithy-rs/discussions/2887) to get your code working again.
+
+**New this release:**
+- 🎉 (all, [smithy-rs#2647](https://github.com/awslabs/smithy-rs/issues/2647), [smithy-rs#2645](https://github.com/awslabs/smithy-rs/issues/2645), [smithy-rs#2646](https://github.com/awslabs/smithy-rs/issues/2646), [smithy-rs#2616](https://github.com/awslabs/smithy-rs/issues/2616), @thomas-k-cameron) Implement unstable serde support for the `Number`, `Blob`, `Document`, `DateTime` primitives
+- 🎉 (client, [smithy-rs#2652](https://github.com/awslabs/smithy-rs/issues/2652), @thomas-k-cameron) Add a `send_with` function on `-Input` types for sending requests without fluent builders
+- (client, [smithy-rs#2791](https://github.com/awslabs/smithy-rs/issues/2791), @davidsouther) Add accessors to Builders
+- (all, [smithy-rs#2786](https://github.com/awslabs/smithy-rs/issues/2786), @yotamofek) Avoid intermediate vec allocations in AggregatedBytes::to_vec.
+- 🐛 (server, [smithy-rs#2733](https://github.com/awslabs/smithy-rs/issues/2733), @thor-bjorgvinsson) Fix bug in AWS JSON 1.x routers where, if a service had more than 14 operations, the router was created without the route for the 15th operation.
+- (client, [smithy-rs#2728](https://github.com/awslabs/smithy-rs/issues/2728), [smithy-rs#2262](https://github.com/awslabs/smithy-rs/issues/2262), [aws-sdk-rust#2087](https://github.com/awslabs/aws-sdk-rust/issues/2087)) Time is now controlled by the `TimeSource` trait. This facilitates testing as well as use cases like WASM where `SystemTime::now()` is not supported.
+- 🐛 (client, [smithy-rs#2767](https://github.com/awslabs/smithy-rs/issues/2767), @mcmasn-amzn) Fix bug in client generation when using smithy.rules#endpointTests and operation and service shapes are in different namespaces.
+- (client, [smithy-rs#2854](https://github.com/awslabs/smithy-rs/issues/2854)) Public fields in structs are no longer marked as `#[doc(hidden)]`, and they are now visible.
+- (server, [smithy-rs#2866](https://github.com/awslabs/smithy-rs/issues/2866)) [RestJson1](https://awslabs.github.io/smithy/2.0/aws/protocols/aws-restjson1-protocol.html#operation-error-serialization) server SDKs now serialize only the [shape name](https://smithy.io/2.0/spec/model.html#shape-id) in operation error responses. Previously (from versions 0.52.0 to 0.55.4), the full shape ID was rendered.
+ Example server error response by a smithy-rs server version 0.52.0 until 0.55.4:
+ ```
+ HTTP/1.1 400 Bad Request
+ content-type: application/json
+ x-amzn-errortype: com.example.service#InvalidRequestException
+ ...
+ ```
+ Example server error response now:
+ ```
+ HTTP/1.1 400 Bad Request
+ content-type: application/json
+ x-amzn-errortype: InvalidRequestException
+ ...
+ ```
+
+**Contributors**
+Thank you for your contributions! ❤
+- @davidsouther ([smithy-rs#2791](https://github.com/awslabs/smithy-rs/issues/2791))
+- @hlbarber ([smithy-rs#2457](https://github.com/awslabs/smithy-rs/issues/2457), [smithy-rs#2740](https://github.com/awslabs/smithy-rs/issues/2740), [smithy-rs#2759](https://github.com/awslabs/smithy-rs/issues/2759), [smithy-rs#2779](https://github.com/awslabs/smithy-rs/issues/2779), [smithy-rs#2827](https://github.com/awslabs/smithy-rs/issues/2827))
+- @mcmasn-amzn ([smithy-rs#2767](https://github.com/awslabs/smithy-rs/issues/2767))
+- @thomas-k-cameron ([smithy-rs#2616](https://github.com/awslabs/smithy-rs/issues/2616), [smithy-rs#2645](https://github.com/awslabs/smithy-rs/issues/2645), [smithy-rs#2646](https://github.com/awslabs/smithy-rs/issues/2646), [smithy-rs#2647](https://github.com/awslabs/smithy-rs/issues/2647), [smithy-rs#2652](https://github.com/awslabs/smithy-rs/issues/2652))
+- @thor-bjorgvinsson ([smithy-rs#2733](https://github.com/awslabs/smithy-rs/issues/2733))
+- @yotamofek ([smithy-rs#2786](https://github.com/awslabs/smithy-rs/issues/2786))
+
+
+May 23rd, 2023
+==============
+**New this release:**
+- (all, [smithy-rs#2612](https://github.com/awslabs/smithy-rs/issues/2612)) The `Debug` implementation for `PropertyBag` now prints a list of the types it contains. This significantly improves debuggability.
+- (all, [smithy-rs#2653](https://github.com/awslabs/smithy-rs/issues/2653), [smithy-rs#2656](https://github.com/awslabs/smithy-rs/issues/2656), @henriiik) Implement `Ord` and `PartialOrd` for `DateTime`.
+- 🐛 (client, [smithy-rs#2696](https://github.com/awslabs/smithy-rs/issues/2696)) Fix compiler errors in generated code when naming shapes after types in the Rust standard library prelude.
+
+**Contributors**
+Thank you for your contributions! ❤
+- @henriiik ([smithy-rs#2653](https://github.com/awslabs/smithy-rs/issues/2653), [smithy-rs#2656](https://github.com/awslabs/smithy-rs/issues/2656))
+
+
+April 26th, 2023
+================
+**Breaking Changes:**
+- ⚠ (all, [smithy-rs#2611](https://github.com/awslabs/smithy-rs/issues/2611)) Update MSRV to Rust 1.67.1
+
+**New this release:**
+- 🎉 (server, [smithy-rs#2540](https://github.com/awslabs/smithy-rs/issues/2540)) Implement layer for servers to handle [ALB health checks](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/target-group-health-checks.html).
+ Take a look at `aws_smithy_http_server::plugin::alb_health_check` to learn about it.
+- 🎉 (client, [smithy-rs#2254](https://github.com/awslabs/smithy-rs/issues/2254), @eduardomourar) Clients now compile for the `wasm32-unknown-unknown` and `wasm32-wasi` targets when no default features are enabled. WebAssembly is not officially supported yet, but this is a great first step towards it!
+- (server, [smithy-rs#2540](https://github.com/awslabs/smithy-rs/issues/2540)) Implement `PluginPipeline::http_layer` which allows you to apply a `tower::Layer` to all operations.
+- (client, [aws-sdk-rust#784](https://github.com/awslabs/aws-sdk-rust/issues/784), @abusch) Implement std::error::Error#source() properly for the service meta Error enum.
+- 🐛 (all, [smithy-rs#2496](https://github.com/awslabs/smithy-rs/issues/2496)) The outputs for event stream operations now implement the `Sync` auto-trait.
+- 🐛 (all, [smithy-rs#2495](https://github.com/awslabs/smithy-rs/issues/2495)) Streaming operations now emit the request ID at the `debug` log level like their non-streaming counterparts.
+- 🐛 (client, [smithy-rs#2495](https://github.com/awslabs/smithy-rs/issues/2495)) Streaming operations now emit the request ID at the `debug` log level like their non-streaming counterparts.
+- (client, [smithy-rs#2507](https://github.com/awslabs/smithy-rs/issues/2507)) The `enableNewCrateOrganizationScheme` codegen flag has been removed. If you opted out of the new crate organization scheme, it must be adopted now in order to upgrade (see [the upgrade guidance](https://github.com/awslabs/smithy-rs/discussions/2449) from March 23rd's release).
+- (client, [smithy-rs#2534](https://github.com/awslabs/smithy-rs/issues/2534)) `aws_smithy_types::date_time::Format` has been re-exported in service client crates.
+- 🐛 (server, [smithy-rs#2582](https://github.com/awslabs/smithy-rs/issues/2582), [smithy-rs#2585](https://github.com/awslabs/smithy-rs/issues/2585)) Fix generation of constrained shapes reaching `@sensitive` shapes
+- 🐛 (server, [smithy-rs#2583](https://github.com/awslabs/smithy-rs/issues/2583), [smithy-rs#2584](https://github.com/awslabs/smithy-rs/issues/2584)) Fix server code generation bug affecting constrained shapes bound with `@httpPayload`
+- (client, [smithy-rs#2603](https://github.com/awslabs/smithy-rs/issues/2603)) Add a sensitive method to `ParseHttpResponse`. When this returns true, logging of the HTTP response body will be suppressed.
+
+**Contributors**
+Thank you for your contributions! ❤
+- @abusch ([aws-sdk-rust#784](https://github.com/awslabs/aws-sdk-rust/issues/784))
+- @eduardomourar ([smithy-rs#2254](https://github.com/awslabs/smithy-rs/issues/2254))
+
+
+April 11th, 2023
+================
+
+
March 23rd, 2023
================
**Breaking Changes:**
diff --git a/CHANGELOG.next.toml b/CHANGELOG.next.toml
index 7770e39605..fc4c4c2578 100644
--- a/CHANGELOG.next.toml
+++ b/CHANGELOG.next.toml
@@ -9,74 +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"
-
-[[aws-sdk-rust]]
-message = "The outputs for event stream operations (for example, S3's SelectObjectContent) now implement the `Sync` auto-trait."
-references = ["smithy-rs#2496"]
-meta = { "breaking" = false, "tada" = false, "bug" = true }
-author = "jdisanti"
-
-[[smithy-rs]]
-message = "The outputs for event stream operations now implement the `Sync` auto-trait."
-references = ["smithy-rs#2496"]
-meta = { "breaking" = false, "tada" = false, "bug" = true, "target" = "all"}
-author = "jdisanti"
-
-[[aws-sdk-rust]]
-message = "The AWS SDK now compiles for the `wasm32-unknown-unknown` and `wasm32-wasi` targets when no default features are enabled. WebAssembly is not officially supported yet, but this is a great first step towards it!"
-references = ["smithy-rs#2254"]
-meta = { "breaking" = false, "tada" = true, "bug" = false }
-author = "eduardomourar"
-
-[[smithy-rs]]
-message = "Clients now compile for the `wasm32-unknown-unknown` and `wasm32-wasi` targets when no default features are enabled. WebAssembly is not officially supported yet, but this is a great first step towards it!"
-references = ["smithy-rs#2254"]
-meta = { "breaking" = false, "tada" = true, "bug" = false, "target" = "client"}
-author = "eduardomourar"
-
-[[smithy-rs]]
-message = "Streaming operations now emit the request ID at the `debug` log level like their non-streaming counterparts."
-references = ["smithy-rs#2495"]
-meta = { "breaking" = false, "tada" = false, "bug" = true }
-author = "jdisanti"
-
-[[smithy-rs]]
-message = "Streaming operations now emit the request ID at the `debug` log level like their non-streaming counterparts."
-references = ["smithy-rs#2495"]
-meta = { "breaking" = false, "tada" = false, "bug" = true, "target" = "client"}
-author = "jdisanti"
-
-[[smithy-rs]]
-message = "The `enableNewCrateOrganizationScheme` codegen flag has been removed. If you opted out of the new crate organization scheme, it must be adopted now in order to upgrade (see [the upgrade guidance](https://github.com/awslabs/smithy-rs/discussions/2449) from March 23rd's release)."
-references = ["smithy-rs#2507"]
-meta = { "breaking" = false, "tada" = false, "bug" = false, "target" = "client" }
-author = "jdisanti"
-
-[[aws-sdk-rust]]
-message = """
-S3's `GetObject` will no longer panic when checksum validation is enabled and the target object was uploaded as a multi-part upload.
-However, these objects cannot be checksum validated by the SDK due to the way checksums are calculated for multipart uploads.
-For more information, see [this page](https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums).
-"""
-references = ["aws-sdk-rust#764"]
-meta = { "breaking" = false, "tada" = false, "bug" = true }
-author = "Velfi"
-
-[[aws-sdk-rust]]
-message = "`AppName` is now configurable from within `ConfigLoader`."
-references = ["smithy-rs#2513"]
-meta = { "breaking" = false, "tada" = false, "bug" = true }
-author = "ysaito1001"
-
-[[aws-sdk-rust]]
-message = "Add support for omitting session token in canonical requests for SigV4 signing."
-references = ["smithy-rs#2473"]
-meta = { "breaking" = false, "tada" = false, "bug" = false }
-author = "martinjlowm"
-
-[[aws-sdk-rust]]
-message = "Add `into_segments` method to `AggregatedBytes`, for zero-copy conversions."
-references = ["smithy-rs#2525"]
-meta = { "breaking" = false, "tada" = false, "bug" = false }
-author = "parker-timmerman"
+# author = "rcoh"
\ No newline at end of file
diff --git a/CODEOWNERS b/CODEOWNERS
index 9671079212..79b21893c0 100644
--- a/CODEOWNERS
+++ b/CODEOWNERS
@@ -1,34 +1,40 @@
-* @awslabs/rust-sdk-owners
+* @awslabs/rust-sdk-owners
# Server
-/codegen-server-test/ @awslabs/smithy-rs-server
-/codegen-server/ @awslabs/smithy-rs-server
-/rust-runtime/aws-smithy-http-server/ @awslabs/smithy-rs-server
+/codegen-server-test/ @awslabs/smithy-rs-server
+/codegen-server/ @awslabs/smithy-rs-server
+/rust-runtime/aws-smithy-http-server/ @awslabs/smithy-rs-server
+/examples/ @awslabs/smithy-rs-server
# Python Server
-/codegen-server-test/python/ @awslabs/smithy-rs-python-server @awslabs/smithy-rs-server
-/codegen-server/python/ @awslabs/smithy-rs-python-server @awslabs/smithy-rs-server
-/rust-runtime/aws-smithy-http-server-python/ @awslabs/smithy-rs-python-server @awslabs/smithy-rs-server
+/codegen-server-test/python/ @awslabs/smithy-rs-python-server @awslabs/smithy-rs-server
+/codegen-server/python/ @awslabs/smithy-rs-python-server @awslabs/smithy-rs-server
+/rust-runtime/aws-smithy-http-server-python/ @awslabs/smithy-rs-python-server @awslabs/smithy-rs-server
+
+# Typescript Server
+/codegen-server-test/typescript/ @awslabs/smithy-rs-typescript-server @awslabs/smithy-rs-server
+/codegen-server/typescript/ @awslabs/smithy-rs-typescript-server @awslabs/smithy-rs-server
+/rust-runtime/aws-smithy-http-server-typescript/ @awslabs/smithy-rs-typescript-server @awslabs/smithy-rs-server
# Shared ownership
-/.github/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
-/CHANGELOG.md @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
-/CHANGELOG.next.toml @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
-/README.md @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
-/build.gradle.kts @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
-/buildSrc/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
-/codegen-core/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
-/design/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
-/gradle.properties @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
-/tools/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
-/rust-runtime/aws-smithy-async/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
-/rust-runtime/aws-smithy-eventstream/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
-/rust-runtime/aws-smithy-http/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
-/rust-runtime/aws-smithy-json/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
-/rust-runtime/aws-smithy-protocol-test/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
-/rust-runtime/aws-smithy-types/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
-/rust-runtime/aws-smithy-types-convert/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
-/rust-runtime/aws-smithy-xml/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
-/rust-runtime/inlineable/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
-/rust-runtime/build.gradle.kts @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
-/rust-runtime/Cargo.toml @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
+/.github/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
+/CHANGELOG.md @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
+/CHANGELOG.next.toml @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
+/README.md @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
+/build.gradle.kts @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
+/buildSrc/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
+/codegen-core/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
+/design/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
+/gradle.properties @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
+/tools/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
+/rust-runtime/aws-smithy-async/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
+/rust-runtime/aws-smithy-eventstream/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
+/rust-runtime/aws-smithy-http/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
+/rust-runtime/aws-smithy-json/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
+/rust-runtime/aws-smithy-protocol-test/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
+/rust-runtime/aws-smithy-types/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
+/rust-runtime/aws-smithy-types-convert/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
+/rust-runtime/aws-smithy-xml/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
+/rust-runtime/inlineable/ @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
+/rust-runtime/build.gradle.kts @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
+/rust-runtime/Cargo.toml @awslabs/rust-sdk-owners @awslabs/smithy-rs-server
diff --git a/aws/SDK_CHANGELOG.next.json b/aws/SDK_CHANGELOG.next.json
index 6d3e509f8e..cb5a407d32 100644
--- a/aws/SDK_CHANGELOG.next.json
+++ b/aws/SDK_CHANGELOG.next.json
@@ -6,65 +6,156 @@
"smithy-rs": [],
"aws-sdk-rust": [
{
- "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",
+ "message": "Request IDs can now be easily retrieved on successful responses. For example, with S3:\n```rust\n// Import the trait to get the `request_id` method on outputs\nuse aws_sdk_s3::types::RequestId;\nlet output = client.list_buckets().send().await?;\nprintln!(\"Request ID: {:?}\", output.request_id());\n```\n",
"meta": {
"bug": false,
"breaking": true,
- "tada": true
+ "tada": false
},
- "author": "rcoh",
+ "author": "jdisanti",
"references": [
- "smithy-rs#1784",
- "smithy-rs#2074"
+ "smithy-rs#76",
+ "smithy-rs#2129"
],
- "since-commit": "40da9a32b38e198da6ca2223b86c314b26438230",
- "age": 5
+ "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "age": 4
},
{
- "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",
+ "message": "Retrieving a request ID from errors now requires importing the `RequestId` trait. For example, with S3:\n```rust\nuse aws_sdk_s3::types::RequestId;\nprintln!(\"Request ID: {:?}\", error.request_id());\n```\n",
"meta": {
"bug": false,
"breaking": true,
- "tada": true
+ "tada": false
},
- "author": "rcoh",
+ "author": "jdisanti",
"references": [
- "smithy-rs#1784",
- "smithy-rs#2074"
+ "smithy-rs#76",
+ "smithy-rs#2129"
],
- "since-commit": "40da9a32b38e198da6ca2223b86c314b26438230",
- "age": 5
+ "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "age": 4
},
{
- "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",
+ "message": "The `message()` and `code()` methods on errors have been moved into `ProvideErrorMetadata` trait. This trait will need to be imported to continue calling these.",
"meta": {
"bug": false,
"breaking": true,
"tada": false
},
+ "author": "jdisanti",
+ "references": [
+ "smithy-rs#76",
+ "smithy-rs#2129"
+ ],
+ "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "age": 4
+ },
+ {
+ "message": "The `*Error` and `*ErrorKind` types have been combined to make error matching simpler.\n\nExample with S3\n**Before:**\n```rust\nlet result = client\n .get_object()\n .bucket(BUCKET_NAME)\n .key(\"some-key\")\n .send()\n .await;\nmatch result {\n Ok(_output) => { /* Do something with the output */ }\n Err(err) => match err.into_service_error() {\n GetObjectError { kind, .. } => match kind {\n GetObjectErrorKind::InvalidObjectState(value) => println!(\"invalid object state: {:?}\", value),\n GetObjectErrorKind::NoSuchKey(_) => println!(\"object didn't exist\"),\n }\n err @ GetObjectError { .. } if err.code() == Some(\"SomeUnmodeledError\") => {}\n err @ _ => return Err(err.into()),\n },\n}\n```\n**After:**\n```rust\n// Needed to access the `.code()` function on the error type:\nuse aws_sdk_s3::types::ProvideErrorMetadata;\nlet result = client\n .get_object()\n .bucket(BUCKET_NAME)\n .key(\"some-key\")\n .send()\n .await;\nmatch result {\n Ok(_output) => { /* Do something with the output */ }\n Err(err) => match err.into_service_error() {\n GetObjectError::InvalidObjectState(value) => {\n println!(\"invalid object state: {:?}\", value);\n }\n GetObjectError::NoSuchKey(_) => {\n println!(\"object didn't exist\");\n }\n err if err.code() == Some(\"SomeUnmodeledError\") => {}\n err @ _ => return Err(err.into()),\n },\n}\n```\n\n",
+ "meta": {
+ "bug": false,
+ "breaking": true,
+ "tada": false
+ },
+ "author": "jdisanti",
+ "references": [
+ "smithy-rs#76",
+ "smithy-rs#2129",
+ "smithy-rs#2075"
+ ],
+ "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "age": 4
+ },
+ {
+ "message": "`aws_smithy_types::Error` has been renamed to `aws_smithy_types::error::ErrorMetadata`.",
+ "meta": {
+ "bug": false,
+ "breaking": true,
+ "tada": false
+ },
+ "author": "jdisanti",
+ "references": [
+ "smithy-rs#76",
+ "smithy-rs#2129"
+ ],
+ "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "age": 4
+ },
+ {
+ "message": "Fluent builder methods on the client are now marked as deprecated when the related operation is deprecated.",
+ "meta": {
+ "bug": true,
+ "breaking": false,
+ "tada": true
+ },
+ "author": "Velfi",
+ "references": [
+ "aws-sdk-rust#740"
+ ],
+ "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "age": 4
+ },
+ {
+ "message": "`SdkError` variants can now be constructed for easier unit testing.",
+ "meta": {
+ "bug": false,
+ "breaking": false,
+ "tada": true
+ },
+ "author": "jdisanti",
+ "references": [
+ "smithy-rs#2428",
+ "smithy-rs#2208"
+ ],
+ "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "age": 4
+ },
+ {
+ "message": "Add more client re-exports. Specifically, it re-exports `aws_smithy_http::body::SdkBody`, `aws_smithy_http::byte_stream::error::Error`, and `aws_smithy_http::operation::{Request, Response}`.",
+ "meta": {
+ "bug": false,
+ "breaking": false,
+ "tada": false
+ },
"author": "ysaito1001",
"references": [
- "smithy-rs#2108"
+ "smithy-rs#2437",
+ "aws-sdk-rust#600"
],
- "since-commit": "40da9a32b38e198da6ca2223b86c314b26438230",
- "age": 5
+ "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "age": 4
},
{
- "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",
+ "message": "Enable presigning for S3's `HeadObject` operation.",
"meta": {
"bug": false,
"breaking": false,
+ "tada": true
+ },
+ "author": "Velfi",
+ "references": [
+ "aws-sdk-rust#753",
+ "smithy-rs#2451"
+ ],
+ "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "age": 4
+ },
+ {
+ "message": "The modules in the SDK crates have been reorganized. See the [SDK Crate Reorganization Upgrade Guidance](https://github.com/awslabs/aws-sdk-rust/discussions/752) to see how to fix your code after this change.",
+ "meta": {
+ "bug": false,
+ "breaking": true,
"tada": false
},
- "author": "rcoh",
+ "author": "jdisanti",
"references": [
- "smithy-rs#2152"
+ "smithy-rs#2433"
],
- "since-commit": "40da9a32b38e198da6ca2223b86c314b26438230",
- "age": 5
+ "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "age": 4
},
{
- "message": "`aws_config::profile::retry_config` && `aws_config::environment::retry_config` have been removed. Use `aws_config::default_provider::retry_config` instead.",
+ "message": "Reconnect on transient errors.\n\nIf a transient error (timeout, 500, 503, 503) is encountered, the connection will be evicted from the pool and will not\nbe reused. This is enabled by default for all AWS services. It can be disabled by setting `RetryConfig::with_reconnect_mode`\n\nAlthough there is no API breakage from this change, it alters the client behavior in a way that may cause breakage for customers.\n",
"meta": {
"bug": false,
"breaking": true,
@@ -72,57 +163,171 @@
},
"author": "rcoh",
"references": [
- "smithy-rs#2162"
+ "aws-sdk-rust#160",
+ "smithy-rs#2445"
],
- "since-commit": "40da9a32b38e198da6ca2223b86c314b26438230",
- "age": 5
+ "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "age": 4
},
{
- "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",
+ "message": "Update MSRV to 1.66.1",
"meta": {
"bug": false,
- "breaking": false,
+ "breaking": true,
"tada": true
},
+ "author": "Velfi",
+ "references": [
+ "smithy-rs#2467"
+ ],
+ "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "age": 4
+ },
+ {
+ "message": "Default connector provided by `aws-config` now respects `ConnectorSettings`.\n\nPreviously, it used the timeout settings provided by aws-config. A test from @Oliboy50 has been incorporated to verify this behavior.\n\n**Behavior Change**: Prior to this change, the Hyper client would be shared between all service clients. After this change, each service client will use its own Hyper Client.\nTo revert to the previous behavior, set `HttpConnector::Prebuilt` on `SdkConfig::http_connector`.\n",
+ "meta": {
+ "bug": true,
+ "breaking": false,
+ "tada": false
+ },
"author": "rcoh",
"references": [
- "smithy-rs#2168"
+ "smithy-rs#2471",
+ "smithy-rs#2333",
+ "smithy-rs#2151"
],
- "since-commit": "40da9a32b38e198da6ca2223b86c314b26438230",
- "age": 5
+ "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "age": 4
},
{
- "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",
+ "message": "Remove deprecated `ResolveAwsEndpoint` interfaces.\n[For details see the longform changelog entry](https://github.com/awslabs/aws-sdk-rust/discussions/755).\n",
"meta": {
"bug": false,
"breaking": true,
"tada": false
},
- "author": "ysaito1001",
+ "author": "rcoh",
+ "references": [
+ "smithy-rs#2390",
+ "smithy-rs#1784"
+ ],
+ "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "age": 4
+ },
+ {
+ "message": "Increase Tokio version to 1.23.1 for all crates. This is to address [RUSTSEC-2023-0001](https://rustsec.org/advisories/RUSTSEC-2023-0001)",
+ "meta": {
+ "bug": false,
+ "breaking": false,
+ "tada": false
+ },
+ "author": "rcoh",
+ "references": [
+ "smithy-rs#2474"
+ ],
+ "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "age": 4
+ },
+ {
+ "message": "Implement std::error::Error#source() properly for the service meta Error enum.",
+ "meta": {
+ "bug": false,
+ "breaking": false,
+ "tada": false
+ },
+ "author": "abusch",
"references": [
- "smithy-rs#2122",
- "smithy-rs#2227"
+ "aws-sdk-rust#784"
],
- "since-commit": "48ce90d3a32cc87337d87d1f291b41fc64f1e5bd",
+ "since-commit": "9201176c9876c9f7bf6599f8a93fe69d25ee0f03",
"age": 3
},
{
- "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",
+ "message": "The outputs for event stream operations (for example, S3's SelectObjectContent) now implement the `Sync` auto-trait.",
+ "meta": {
+ "bug": true,
+ "breaking": false,
+ "tada": false
+ },
+ "author": "jdisanti",
+ "references": [
+ "smithy-rs#2496"
+ ],
+ "since-commit": "9201176c9876c9f7bf6599f8a93fe69d25ee0f03",
+ "age": 3
+ },
+ {
+ "message": "The AWS SDK now compiles for the `wasm32-unknown-unknown` and `wasm32-wasi` targets when no default features are enabled. WebAssembly is not officially supported yet, but this is a great first step towards it!",
"meta": {
"bug": false,
- "breaking": true,
+ "breaking": false,
+ "tada": true
+ },
+ "author": "eduardomourar",
+ "references": [
+ "smithy-rs#2254"
+ ],
+ "since-commit": "9201176c9876c9f7bf6599f8a93fe69d25ee0f03",
+ "age": 3
+ },
+ {
+ "message": "S3's `GetObject` will no longer panic when checksum validation is enabled and the target object was uploaded as a multi-part upload.\nHowever, these objects cannot be checksum validated by the SDK due to the way checksums are calculated for multipart uploads.\nFor more information, see [this page](https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums).\n",
+ "meta": {
+ "bug": true,
+ "breaking": false,
+ "tada": false
+ },
+ "author": "Velfi",
+ "references": [
+ "aws-sdk-rust#764"
+ ],
+ "since-commit": "9201176c9876c9f7bf6599f8a93fe69d25ee0f03",
+ "age": 3
+ },
+ {
+ "message": "`AppName` is now configurable from within `ConfigLoader`.",
+ "meta": {
+ "bug": true,
+ "breaking": false,
"tada": false
},
"author": "ysaito1001",
"references": [
- "smithy-rs#2122",
- "smithy-rs#2227"
+ "smithy-rs#2513"
],
- "since-commit": "48ce90d3a32cc87337d87d1f291b41fc64f1e5bd",
+ "since-commit": "9201176c9876c9f7bf6599f8a93fe69d25ee0f03",
"age": 3
},
{
- "message": "Fix endpoint for s3.write_get_object_response(). This bug was introduced in 0.53.",
+ "message": "Add support for omitting session token in canonical requests for SigV4 signing.",
+ "meta": {
+ "bug": false,
+ "breaking": false,
+ "tada": false
+ },
+ "author": "martinjlowm",
+ "references": [
+ "smithy-rs#2473"
+ ],
+ "since-commit": "9201176c9876c9f7bf6599f8a93fe69d25ee0f03",
+ "age": 3
+ },
+ {
+ "message": "Add `into_segments` method to `AggregatedBytes`, for zero-copy conversions.",
+ "meta": {
+ "bug": false,
+ "breaking": false,
+ "tada": false
+ },
+ "author": "parker-timmerman",
+ "references": [
+ "smithy-rs#2525"
+ ],
+ "since-commit": "9201176c9876c9f7bf6599f8a93fe69d25ee0f03",
+ "age": 3
+ },
+ {
+ "message": "Fix bug where an incorrect endpoint was produced for `WriteGetObjectResponse`",
"meta": {
"bug": true,
"breaking": false,
@@ -130,13 +335,42 @@
},
"author": "rcoh",
"references": [
- "smithy-rs#2204"
+ "smithy-rs#781",
+ "aws-sdk-rust#781"
+ ],
+ "since-commit": "9201176c9876c9f7bf6599f8a93fe69d25ee0f03",
+ "age": 3
+ },
+ {
+ "message": "Update the `std::fmt::Debug` implementation for `aws-sigv4::SigningParams` so that it will no longer print sensitive information.",
+ "meta": {
+ "bug": true,
+ "breaking": false,
+ "tada": true
+ },
+ "author": "Velfi",
+ "references": [
+ "smithy-rs#2562"
],
- "since-commit": "48ce90d3a32cc87337d87d1f291b41fc64f1e5bd",
+ "since-commit": "9201176c9876c9f7bf6599f8a93fe69d25ee0f03",
"age": 3
},
{
- "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.",
+ "message": "`aws_smithy_types::date_time::Format` has been re-exported in SDK crates.",
+ "meta": {
+ "bug": false,
+ "breaking": false,
+ "tada": false
+ },
+ "author": "ysaito1001",
+ "references": [
+ "smithy-rs#2534"
+ ],
+ "since-commit": "9201176c9876c9f7bf6599f8a93fe69d25ee0f03",
+ "age": 3
+ },
+ {
+ "message": "Reduce several instances of credential exposure in the SDK logs:\n- IMDS now suppresses the body of the response from logs\n- `aws-sigv4` marks the `x-amz-session-token` header as sensitive\n- STS & SSO credentials have been manually marked as sensitive which suppresses logging of response bodies for relevant operations\n",
"meta": {
"bug": false,
"breaking": false,
@@ -144,13 +378,13 @@
},
"author": "rcoh",
"references": [
- "smithy-rs#2204"
+ "smithy-rs#2603"
],
- "since-commit": "48ce90d3a32cc87337d87d1f291b41fc64f1e5bd",
+ "since-commit": "9201176c9876c9f7bf6599f8a93fe69d25ee0f03",
"age": 3
},
{
- "message": "Request IDs can now be easily retrieved on successful responses. For example, with S3:\n```rust\n// Import the trait to get the `request_id` method on outputs\nuse aws_sdk_s3::types::RequestId;\nlet output = client.list_buckets().send().await?;\nprintln!(\"Request ID: {:?}\", output.request_id());\n```\n",
+ "message": "Update MSRV to Rust 1.67.1",
"meta": {
"bug": false,
"breaking": true,
@@ -158,60 +392,99 @@
},
"author": "jdisanti",
"references": [
- "smithy-rs#76",
- "smithy-rs#2129"
+ "smithy-rs#2611"
],
- "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "since-commit": "9201176c9876c9f7bf6599f8a93fe69d25ee0f03",
+ "age": 3
+ },
+ {
+ "message": "Avoid extending IMDS credentials' expiry unconditionally, which may incorrectly extend it beyond what is originally defined; If returned credentials are not stale, use them as they are.",
+ "meta": {
+ "bug": true,
+ "breaking": false,
+ "tada": false
+ },
+ "author": "ysaito1001",
+ "references": [
+ "smithy-rs#2687",
+ "smithy-rs#2694"
+ ],
+ "since-commit": "3b5fc51a41700c88270145e38fa708eca72dc414",
+ "age": 2
+ },
+ {
+ "message": "Automatically exclude X-Ray trace ID headers and authorization headers from SigV4 canonical request calculations.",
+ "meta": {
+ "bug": true,
+ "breaking": false,
+ "tada": false
+ },
+ "author": "relevantsam",
+ "references": [
+ "smithy-rs#2815"
+ ],
+ "since-commit": "6eaacaa96684f662b7d355eea94a526c0b465e7f",
"age": 1
},
{
- "message": "Retrieving a request ID from errors now requires importing the `RequestId` trait. For example, with S3:\n```rust\nuse aws_sdk_s3::types::RequestId;\nprintln!(\"Request ID: {:?}\", error.request_id());\n```\n",
+ "message": "Add accessors to Builders",
"meta": {
"bug": false,
- "breaking": true,
+ "breaking": false,
"tada": false
},
- "author": "jdisanti",
+ "author": "davidsouther",
"references": [
- "smithy-rs#76",
- "smithy-rs#2129"
+ "smithy-rs#2791"
],
- "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "since-commit": "6eaacaa96684f662b7d355eea94a526c0b465e7f",
"age": 1
},
{
- "message": "The `message()` and `code()` methods on errors have been moved into `ProvideErrorMetadata` trait. This trait will need to be imported to continue calling these.",
+ "message": "Remove native-tls and add a migration guide.",
"meta": {
"bug": false,
"breaking": true,
"tada": false
},
- "author": "jdisanti",
+ "author": "82marbag",
"references": [
- "smithy-rs#76",
- "smithy-rs#2129"
+ "smithy-rs#2675"
],
- "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "since-commit": "6eaacaa96684f662b7d355eea94a526c0b465e7f",
"age": 1
},
{
- "message": "The `*Error` and `*ErrorKind` types have been combined to make error matching simpler.\n\nExample with S3\n**Before:**\n```rust\nlet result = client\n .get_object()\n .bucket(BUCKET_NAME)\n .key(\"some-key\")\n .send()\n .await;\nmatch result {\n Ok(_output) => { /* Do something with the output */ }\n Err(err) => match err.into_service_error() {\n GetObjectError { kind, .. } => match kind {\n GetObjectErrorKind::InvalidObjectState(value) => println!(\"invalid object state: {:?}\", value),\n GetObjectErrorKind::NoSuchKey(_) => println!(\"object didn't exist\"),\n }\n err @ GetObjectError { .. } if err.code() == Some(\"SomeUnmodeledError\") => {}\n err @ _ => return Err(err.into()),\n },\n}\n```\n**After:**\n```rust\n// Needed to access the `.code()` function on the error type:\nuse aws_sdk_s3::types::ProvideErrorMetadata;\nlet result = client\n .get_object()\n .bucket(BUCKET_NAME)\n .key(\"some-key\")\n .send()\n .await;\nmatch result {\n Ok(_output) => { /* Do something with the output */ }\n Err(err) => match err.into_service_error() {\n GetObjectError::InvalidObjectState(value) => {\n println!(\"invalid object state: {:?}\", value);\n }\n GetObjectError::NoSuchKey(_) => {\n println!(\"object didn't exist\");\n }\n err if err.code() == Some(\"SomeUnmodeledError\") => {}\n err @ _ => return Err(err.into()),\n },\n}\n```\n\n",
+ "message": "Fix error message when `credentials-sso` feature is not enabled on `aws-config`. NOTE: if you use `no-default-features`, you will need to manually able `credentials-sso` after 0.55.*",
"meta": {
- "bug": false,
- "breaking": true,
+ "bug": true,
+ "breaking": false,
"tada": false
},
- "author": "jdisanti",
+ "author": "rcoh",
"references": [
- "smithy-rs#76",
- "smithy-rs#2129",
- "smithy-rs#2075"
+ "smithy-rs#2722",
+ "aws-sdk-rust#703"
],
- "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "since-commit": "6eaacaa96684f662b7d355eea94a526c0b465e7f",
"age": 1
},
{
- "message": "`aws_smithy_types::Error` has been renamed to `aws_smithy_types::error::ErrorMetadata`.",
+ "message": "`SsoCredentialsProvider`, `AssumeRoleProvider`, and `WebIdentityTokenCredentialsProvider` now use `NoCredentialsCache` internally when fetching credentials using an STS client. This avoids double-caching when these providers are wrapped by `LazyCredentialsCache` when a service client is created.",
+ "meta": {
+ "bug": true,
+ "breaking": false,
+ "tada": false
+ },
+ "author": "ysaito1001",
+ "references": [
+ "smithy-rs#2720"
+ ],
+ "since-commit": "6eaacaa96684f662b7d355eea94a526c0b465e7f",
+ "age": 1
+ },
+ {
+ "message": "For event stream operations such as S3 SelectObjectContent or Transcribe StartStreamTranscription, the `EventStreamSender` in the input now requires the passed in `Stream` impl to implement `Sync`.",
"meta": {
"bug": false,
"breaking": true,
@@ -219,132 +492,160 @@
},
"author": "jdisanti",
"references": [
- "smithy-rs#76",
- "smithy-rs#2129"
+ "smithy-rs#2673"
],
- "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "since-commit": "6eaacaa96684f662b7d355eea94a526c0b465e7f",
"age": 1
},
{
- "message": "Fluent builder methods on the client are now marked as deprecated when the related operation is deprecated.",
+ "message": "The `SigningInstructions` in the `aws-sigv4` module are now public. This allows them to be named in a function signature.",
"meta": {
"bug": true,
"breaking": false,
- "tada": true
+ "tada": false
},
- "author": "Velfi",
+ "author": "cholcombe973",
"references": [
- "aws-sdk-rust#740"
+ "smithy-rs#2730"
],
- "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "since-commit": "6eaacaa96684f662b7d355eea94a526c0b465e7f",
"age": 1
},
{
- "message": "`SdkError` variants can now be constructed for easier unit testing.",
+ "message": "Time is now controlled by the `TimeSource` trait. This facilitates testing as well as use cases like WASM where `SystemTime::now()` is not supported.",
"meta": {
"bug": false,
"breaking": false,
- "tada": true
+ "tada": false
},
- "author": "jdisanti",
+ "author": "rcoh",
"references": [
- "smithy-rs#2428",
- "smithy-rs#2208"
+ "smithy-rs#2728",
+ "smithy-rs#2262",
+ "aws-sdk-rust#2087"
],
- "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "since-commit": "6eaacaa96684f662b7d355eea94a526c0b465e7f",
"age": 1
},
{
- "message": "Add more client re-exports. Specifically, it re-exports `aws_smithy_http::body::SdkBody`, `aws_smithy_http::byte_stream::error::Error`, and `aws_smithy_http::operation::{Request, Response}`.",
+ "message": "The SDK has added support for timestreamwrite and timestreamquery. Support for these services is considered experimental at this time. In order to use these services, you MUST call `.with_endpoint_discovery_enabled()` on the `Client` after construction.",
"meta": {
"bug": false,
"breaking": false,
+ "tada": true
+ },
+ "author": "rcoh",
+ "references": [
+ "smithy-rs#2707",
+ "aws-sdk-rust#114",
+ "smithy-rs#2846"
+ ],
+ "since-commit": "6eaacaa96684f662b7d355eea94a526c0b465e7f",
+ "age": 1
+ },
+ {
+ "message": "A newtype wrapper `SharedAsyncSleep` has been introduced and occurrences of `Arc` that appear in public APIs have been replaced with it.",
+ "meta": {
+ "bug": false,
+ "breaking": true,
"tada": false
},
"author": "ysaito1001",
"references": [
- "smithy-rs#2437",
- "aws-sdk-rust#600"
+ "smithy-rs#2742"
],
- "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "since-commit": "6eaacaa96684f662b7d355eea94a526c0b465e7f",
"age": 1
},
{
- "message": "Enable presigning for S3's `HeadObject` operation.",
+ "message": "Update MSRV to Rust 1.69.0",
+ "meta": {
+ "bug": false,
+ "breaking": true,
+ "tada": false
+ },
+ "author": "Velfi",
+ "references": [
+ "smithy-rs#2893"
+ ],
+ "since-commit": "6eaacaa96684f662b7d355eea94a526c0b465e7f",
+ "age": 1
+ },
+ {
+ "message": "Implement unstable serde support for the `Number`, `Blob`, `Document`, `DateTime` primitives",
"meta": {
"bug": false,
"breaking": false,
"tada": true
},
- "author": "Velfi",
+ "author": "thomas-k-cameron",
"references": [
- "aws-sdk-rust#753",
- "smithy-rs#2451"
+ "smithy-rs#2647",
+ "smithy-rs#2645",
+ "smithy-rs#2646",
+ "smithy-rs#2616"
],
- "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "since-commit": "6eaacaa96684f662b7d355eea94a526c0b465e7f",
"age": 1
},
{
- "message": "The modules in the SDK crates have been reorganized. See the [SDK Crate Reorganization Upgrade Guidance](https://github.com/awslabs/aws-sdk-rust/discussions/752) to see how to fix your code after this change.",
+ "message": "Add a `send_with` function on `-Input` types for sending requests without fluent builders",
"meta": {
"bug": false,
- "breaking": true,
- "tada": false
+ "breaking": false,
+ "tada": true
},
- "author": "jdisanti",
+ "author": "thomas-k-cameron",
"references": [
- "smithy-rs#2433"
+ "smithy-rs#2652"
],
- "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "since-commit": "6eaacaa96684f662b7d355eea94a526c0b465e7f",
"age": 1
},
{
- "message": "Reconnect on transient errors.\n\nIf a transient error (timeout, 500, 503, 503) is encountered, the connection will be evicted from the pool and will not\nbe reused. This is enabled by default for all AWS services. It can be disabled by setting `RetryConfig::with_reconnect_mode`\n\nAlthough there is no API breakage from this change, it alters the client behavior in a way that may cause breakage for customers.\n",
+ "message": "The naming `make_token` for fields and the API of `IdempotencyTokenProvider` in service configs and their builders has now been updated to `idempotency_token_provider`.",
"meta": {
"bug": false,
"breaking": true,
"tada": false
},
- "author": "rcoh",
+ "author": "ysaito1001",
"references": [
- "aws-sdk-rust#160",
- "smithy-rs#2445"
+ "smithy-rs#2783"
],
- "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "since-commit": "6eaacaa96684f662b7d355eea94a526c0b465e7f",
"age": 1
},
{
- "message": "Update MSRV to 1.66.1",
+ "message": "The implementation `From` for `aws_http::user_agent::UserAgentStageError` has been removed.",
"meta": {
"bug": false,
"breaking": true,
- "tada": true
+ "tada": false
},
- "author": "Velfi",
+ "author": "ysaito1001",
"references": [
- "smithy-rs#2467"
+ "smithy-rs#2845"
],
- "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "since-commit": "6eaacaa96684f662b7d355eea94a526c0b465e7f",
"age": 1
},
{
- "message": "Default connector provided by `aws-config` now respects `ConnectorSettings`.\n\nPreviously, it used the timeout settings provided by aws-config. A test from @Oliboy50 has been incorporated to verify this behavior.\n\n**Behavior Change**: Prior to this change, the Hyper client would be shared between all service clients. After this change, each service client will use its own Hyper Client.\nTo revert to the previous behavior, set `HttpConnector::Prebuilt` on `SdkConfig::http_connector`.\n",
+ "message": "The AppName property can now be set with `sdk_ua_app_id` in profile files. The old field, `sdk-ua-app-id`, is maintained for backwards compatibility.",
"meta": {
- "bug": true,
+ "bug": false,
"breaking": false,
"tada": false
},
"author": "rcoh",
"references": [
- "smithy-rs#2471",
- "smithy-rs#2333",
- "smithy-rs#2151"
+ "smithy-rs#2724"
],
- "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "since-commit": "6eaacaa96684f662b7d355eea94a526c0b465e7f",
"age": 1
},
{
- "message": "Remove deprecated `ResolveAwsEndpoint` interfaces.\n[For details see the longform changelog entry](https://github.com/awslabs/aws-sdk-rust/discussions/755).\n",
+ "message": "**Behavior change**: Credential providers now share the HTTP connector used by the SDK. If you want to keep a separate connector for clients, use `::ConfigBuilder::http_connector` when constructing the client.",
"meta": {
"bug": false,
"breaking": true,
@@ -352,24 +653,50 @@
},
"author": "rcoh",
"references": [
- "smithy-rs#2390",
- "smithy-rs#1784"
+ "aws-sdk-rust#579",
+ "aws-sdk-rust#338"
],
- "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "since-commit": "6eaacaa96684f662b7d355eea94a526c0b465e7f",
"age": 1
},
{
- "message": "Increase Tokio version to 1.23.1 for all crates. This is to address [RUSTSEC-2023-0001](https://rustsec.org/advisories/RUSTSEC-2023-0001)",
+ "message": "The `doc(hidden)` `time_source` in `aws-credential-types` was removed. Use `aws_smithy_async::time` instead.",
"meta": {
"bug": false,
- "breaking": false,
+ "breaking": true,
"tada": false
},
"author": "rcoh",
"references": [
- "smithy-rs#2474"
+ "smithy-rs#2877"
],
- "since-commit": "562e196bbfb5c57270b2855479a5c365ba3d2dff",
+ "since-commit": "6eaacaa96684f662b7d355eea94a526c0b465e7f",
+ "age": 1
+ },
+ {
+ "message": "The `doc(hidden)` `with_env` in `ProviderConfig` was removed.",
+ "meta": {
+ "bug": false,
+ "breaking": true,
+ "tada": false
+ },
+ "author": "rcoh",
+ "references": [
+ "smithy-rs#2877"
+ ],
+ "since-commit": "6eaacaa96684f662b7d355eea94a526c0b465e7f",
+ "age": 1
+ },
+ {
+ "message": "The underlying architecture of the SDK clients has been overhauled. This shouldn't require any changes for most projects, but will affect projects that customize the SDK middleware. More details are available in the [upgrade guide](https://github.com/awslabs/aws-sdk-rust/discussions/853) if you are effected by these changes.",
+ "meta": {
+ "bug": false,
+ "breaking": true,
+ "tada": false
+ },
+ "author": "jdisanti",
+ "references": [],
+ "since-commit": "6eaacaa96684f662b7d355eea94a526c0b465e7f",
"age": 1
}
],
diff --git a/aws/rust-runtime/Cargo.toml b/aws/rust-runtime/Cargo.toml
index b4e4670550..0e32e03bfc 100644
--- a/aws/rust-runtime/Cargo.toml
+++ b/aws/rust-runtime/Cargo.toml
@@ -8,9 +8,11 @@ members = [
"aws-http",
"aws-hyper",
"aws-inlineable",
+ "aws-runtime",
+ "aws-runtime-api",
"aws-sig-auth",
+ "aws-sigv4",
"aws-types",
- "aws-sigv4"
]
exclude = ["aws-config"]
diff --git a/aws/rust-runtime/aws-config/Cargo.toml b/aws/rust-runtime/aws-config/Cargo.toml
index 92cacc1c52..60fb0f5261 100644
--- a/aws/rust-runtime/aws-config/Cargo.toml
+++ b/aws/rust-runtime/aws-config/Cargo.toml
@@ -10,8 +10,9 @@ repository = "https://github.com/awslabs/smithy-rs"
[features]
client-hyper = ["aws-smithy-client/client-hyper"]
-rustls = ["aws-smithy-client/rustls"]
-native-tls = ["aws-smithy-client/native-tls"]
+rustls = ["aws-smithy-client/rustls", "client-hyper"]
+native-tls = []
+allow-compilation = [] # our tests use `cargo test --all-features` and native-tls breaks CI
rt-tokio = ["aws-smithy-async/rt-tokio", "tokio/rt"]
credentials-sso = ["dep:aws-sdk-sso", "dep:ring", "dep:hex", "dep:zeroize"]
@@ -28,13 +29,13 @@ aws-smithy-http-tower = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-http-to
aws-smithy-json = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-json" }
aws-smithy-types = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-types" }
aws-types = { path = "../../sdk/build/aws-sdk/sdk/aws-types" }
-hyper = { version = "0.14.25", default-features = false }
+hyper = { version = "0.14.26", default-features = false }
time = { version = "0.3.4", features = ["parsing"] }
tokio = { version = "1.13.1", features = ["sync"] }
tracing = { version = "0.1" }
# implementation detail of IMDS credentials provider
-fastrand = "1"
+fastrand = "2.0.0"
bytes = "1.1.0"
http = "0.2.4"
@@ -49,21 +50,23 @@ zeroize = { version = "1", optional = true }
[dev-dependencies]
futures-util = { version = "0.3.16", default-features = false }
tracing-test = "0.2.1"
+tracing-subscriber = { version = "0.3.16", features = ["fmt", "json"] }
tokio = { version = "1.23.1", features = ["full", "test-util"] }
# used for fuzzing profile parsing
-arbitrary = "=1.1.3" # 1.1.4 requires Rust 1.63 to compile
+arbitrary = "1.3"
# used for test case deserialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"
aws-credential-types = { path = "../../sdk/build/aws-sdk/sdk/aws-credential-types", features = ["test-util"] }
-aws-smithy-client = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-client", features = ["test-util"] }
+aws-smithy-client = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-client", features = ["test-util", "rt-tokio", "client-hyper"] }
# used for a usage example
-hyper-rustls = { version = "0.23.0", features = ["webpki-tokio", "http2", "http1"] }
+hyper-rustls = { version = "0.24", features = ["webpki-tokio", "http2", "http1"] }
+aws-smithy-async = { path = "../../sdk/build/aws-sdk/sdk/aws-smithy-async", features = ["test-util"] }
[package.metadata.docs.rs]
all-features = true
diff --git a/aws/rust-runtime/aws-config/clippy.toml b/aws/rust-runtime/aws-config/clippy.toml
new file mode 120000
index 0000000000..85f6167cb1
--- /dev/null
+++ b/aws/rust-runtime/aws-config/clippy.toml
@@ -0,0 +1 @@
+../clippy.toml
\ No newline at end of file
diff --git a/aws/rust-runtime/aws-config/external-types.toml b/aws/rust-runtime/aws-config/external-types.toml
index 7e0257f46d..b90a84885c 100644
--- a/aws/rust-runtime/aws-config/external-types.toml
+++ b/aws/rust-runtime/aws-config/external-types.toml
@@ -9,7 +9,9 @@ allowed_external_types = [
"aws_credential_types::provider::SharedCredentialsProvider",
"aws_sdk_sts::types::_policy_descriptor_type::PolicyDescriptorType",
"aws_smithy_async::rt::sleep::AsyncSleep",
+ "aws_smithy_async::time::TimeSource",
"aws_smithy_client::bounds::SmithyConnector",
+ "aws_smithy_client::conns::default_connector::default_connector",
"aws_smithy_client::erase::DynConnector",
"aws_smithy_client::erase::boxclone::BoxCloneService",
"aws_smithy_client::http_connector::ConnectorSettings",
diff --git a/aws/rust-runtime/aws-config/src/connector.rs b/aws/rust-runtime/aws-config/src/connector.rs
index f03d44ab6e..33c820261f 100644
--- a/aws/rust-runtime/aws-config/src/connector.rs
+++ b/aws/rust-runtime/aws-config/src/connector.rs
@@ -5,56 +5,28 @@
//! Functionality related to creating new HTTP Connectors
-use aws_smithy_async::rt::sleep::AsyncSleep;
use aws_smithy_client::erase::DynConnector;
-use aws_smithy_client::http_connector::ConnectorSettings;
-use std::sync::Arc;
-// unused when all crate features are disabled
/// Unwrap an [`Option`](aws_smithy_client::erase::DynConnector), and panic with a helpful error message if it's `None`
-pub(crate) fn expect_connector(connector: Option) -> DynConnector {
- connector.expect("No HTTP connector was available. Enable the `rustls` or `native-tls` crate feature or set a connector to fix this.")
-}
-
-#[cfg(any(feature = "rustls", feature = "native-tls"))]
-fn base(
- settings: &ConnectorSettings,
- sleep: Option>,
-) -> aws_smithy_client::hyper_ext::Builder {
- let mut hyper =
- aws_smithy_client::hyper_ext::Adapter::builder().connector_settings(settings.clone());
- if let Some(sleep) = sleep {
- hyper = hyper.sleep_impl(sleep);
+pub(crate) fn expect_connector(for_what: &str, connector: Option) -> DynConnector {
+ if let Some(conn) = connector {
+ conn
+ } else {
+ panic!("{for_what} require(s) a HTTP connector, but none was available. Enable the `rustls` crate feature or set a connector to fix this.")
}
- hyper
}
-/// Given `ConnectorSettings` and an `AsyncSleep`, create a `DynConnector` from defaults depending on what cargo features are activated.
-#[cfg(feature = "rustls")]
-pub fn default_connector(
- settings: &ConnectorSettings,
- sleep: Option>,
-) -> Option {
- tracing::trace!(settings = ?settings, sleep = ?sleep, "creating a new connector");
- let hyper = base(settings, sleep).build(aws_smithy_client::conns::https());
- Some(DynConnector::new(hyper))
-}
+#[cfg(feature = "client-hyper")]
+pub use aws_smithy_client::conns::default_connector;
-/// Given `ConnectorSettings` and an `AsyncSleep`, create a `DynConnector` from defaults depending on what cargo features are activated.
-#[cfg(all(not(feature = "rustls"), feature = "native-tls"))]
-pub fn default_connector(
- settings: &ConnectorSettings,
- sleep: Option>,
-) -> Option {
- let hyper = base(settings, sleep).build(aws_smithy_client::conns::native_tls());
- Some(DynConnector::new(hyper))
-}
+#[cfg(all(feature = "native-tls", not(feature = "allow-compilation")))]
+compile_error!("Feature native-tls has been removed. For upgrade instructions, see: https://awslabs.github.io/smithy-rs/design/transport/connector.html");
-/// Given `ConnectorSettings` and an `AsyncSleep`, create a `DynConnector` from defaults depending on what cargo features are activated.
-#[cfg(not(any(feature = "rustls", feature = "native-tls")))]
+/// Given `ConnectorSettings` and a [`SharedAsyncSleep`](aws_smithy_async::rt::sleep::SharedAsyncSleep), create a `DynConnector` from defaults depending on what cargo features are activated.
+#[cfg(not(feature = "client-hyper"))]
pub fn default_connector(
- _settings: &ConnectorSettings,
- _sleep: Option>,
+ _settings: &aws_smithy_client::http_connector::ConnectorSettings,
+ _sleep: Option,
) -> Option {
None
}
diff --git a/aws/rust-runtime/aws-config/src/default_provider/app_name.rs b/aws/rust-runtime/aws-config/src/default_provider/app_name.rs
index f6fce3d730..041d0f8261 100644
--- a/aws/rust-runtime/aws-config/src/default_provider/app_name.rs
+++ b/aws/rust-runtime/aws-config/src/default_provider/app_name.rs
@@ -3,16 +3,33 @@
* SPDX-License-Identifier: Apache-2.0
*/
-use crate::environment::app_name::EnvironmentVariableAppNameProvider;
-use crate::profile::app_name;
use crate::provider_config::ProviderConfig;
-use aws_types::app_name::AppName;
+use crate::standard_property::{PropertyResolutionError, StandardProperty};
+use aws_smithy_types::error::display::DisplayErrorContext;
+use aws_types::app_name::{AppName, InvalidAppName};
/// Default App Name Provider chain
///
/// This provider will check the following sources in order:
-/// 1. [Environment variables](EnvironmentVariableAppNameProvider)
-/// 2. [Profile file](crate::profile::app_name::ProfileFileAppNameProvider)
+/// 1. Environment variables: `AWS_SDK_UA_APP_ID`
+/// 2. Profile files from the key `sdk_ua_app_id`
+///
+#[doc = include_str!("../profile/location_of_profile_files.md")]
+///
+/// # Examples
+///
+/// **Loads "my-app" as the app name**
+/// ```ini
+/// [default]
+/// sdk_ua_app_id = my-app
+/// ```
+///
+/// **Loads "my-app" as the app name _if and only if_ the `AWS_PROFILE` environment variable
+/// is set to `other`.**
+/// ```ini
+/// [profile other]
+/// sdk_ua_app_id = my-app
+/// ```
pub fn default_provider() -> Builder {
Builder::default()
}
@@ -20,8 +37,7 @@ pub fn default_provider() -> Builder {
/// Default provider builder for [`AppName`]
#[derive(Debug, Default)]
pub struct Builder {
- env_provider: EnvironmentVariableAppNameProvider,
- profile_file: app_name::Builder,
+ provider_config: ProviderConfig,
}
impl Builder {
@@ -29,23 +45,43 @@ impl Builder {
/// Configure the default chain
///
/// Exposed for overriding the environment when unit-testing providers
- pub fn configure(mut self, configuration: &ProviderConfig) -> Self {
- self.env_provider = EnvironmentVariableAppNameProvider::new_with_env(configuration.env());
- self.profile_file = self.profile_file.configure(configuration);
- self
+ pub fn configure(self, configuration: &ProviderConfig) -> Self {
+ Self {
+ provider_config: configuration.clone(),
+ }
}
/// Override the profile name used by this provider
pub fn profile_name(mut self, name: &str) -> Self {
- self.profile_file = self.profile_file.profile_name(name);
+ self.provider_config = self.provider_config.with_profile_name(name.to_string());
self
}
+ async fn fallback_app_name(
+ &self,
+ ) -> Result