Skip to content

Releases: awslabs/aws-sdk-rust

August 8th, 2022

09 Aug 00:28
Compare
Choose a tag to compare
August 8th, 2022 Pre-release
Pre-release

Breaking Changes:

  • ⚠ (smithy-rs#1157) Rename EventStreamInput to EventStreamSender
  • ⚠ (smithy-rs#1157) The type of streaming unions that contain errors is generated without those errors.
    Errors in a streaming union Union are generated as members of the type UnionError.
    Taking Transcribe as an example, the AudioStream streaming union generates, in the client, both the AudioStream type:
    pub enum AudioStream {
        AudioEvent(crate::model::AudioEvent),
        Unknown,
    }
    and its error type,
    pub struct AudioStreamError {
        /// Kind of error that occurred.
        pub kind: AudioStreamErrorKind,
        /// Additional metadata about the error, including error code, message, and request ID.
        pub(crate) meta: aws_smithy_types::Error,
    }
    AudioStreamErrorKind contains all error variants for the union.
    Before, the generated code looked as:
    pub enum AudioStream {
        AudioEvent(crate::model::AudioEvent),
        ... all error variants,
        Unknown,
    }
  • ⚠ (smithy-rs#1157) aws_smithy_http::event_stream::EventStreamSender and aws_smithy_http::event_stream::Receiver are now generic over <T, E>,
    where T is a streaming union and E the union's errors.
    This means that event stream errors are now sent as Err of the union's error type.
    With this example model:
    @streaming union Event {
        throttlingError: ThrottlingError
    }
    @error("client") structure ThrottlingError {}
    Before:
    stream! { yield Ok(Event::ThrottlingError ...) }
    After:
    stream! { yield Err(EventError::ThrottlingError ...) }
    An example from the SDK is in transcribe streaming.

New this release:

  • 🎉 (smithy-rs#1482) The AWS SDK for Rust now supports additional checksum algorithms for Amazon S3.
    When getting and putting objects, you may now request that the request body be validated with a checksum. The supported
    algorithms are SHA-1, SHA-256, CRC-32, and CRC-32C.

    #[tokio::main]
    async fn main() -> Result<(), Box<dyn std::error::Error>> {
        let sdk_config = aws_config::load_from_env().await;
        let s3_client = aws_sdk_s3::Client::new(&sdk_config);
        let body = aws_sdk_s3::types::ByteStream::read_from()
            .path(std::path::Path::new("./path/to/your/file.txt"))
            .build()
            .await
            .unwrap();
    
        let _ = s3_client
            .put_object()
            .bucket("your-bucket")
            .key("file.txt")
            .body(body)
            // When using this field, the checksum will be calculated for you
            .checksum_algorithm(aws_sdk_s3::model::ChecksumAlgorithm::Crc32C)
            .send()
            .await?;
    
        let body = aws_sdk_s3::types::ByteStream::read_from()
            .path(std::path::Path::new("./path/to/your/other-file.txt"))
            .build()
            .await
            .unwrap();
    
        let _ = s3_client
            .put_object()
            .bucket("your-bucket")
            .key("other-file.txt")
            .body(body)
            // Alternatively, you can pass a checksum that you've calculated yourself. It must be base64
            // encoded. Also, make sure that you're base64 encoding the bytes of the checksum, not its
            // string representation.
            .checksum_crc32_c(aws_smithy_types::base64::encode(&A_PRECALCULATED_CRC_32_C_CHECKSUM[..]))
            .send()
            .await?;
    }
  • 🎉 (smithy-rs#1571, smithy-rs#1385) SDK crate READMEs now include an example of creating a client

  • (smithy-rs#1573, smithy-rs#1569) Non-streaming struct members are now marked #[doc(hidden)] since they will be removed in the future

July 21st, 2022

22 Jul 00:07
Compare
Choose a tag to compare
July 21st, 2022 Pre-release
Pre-release

New this release:

  • 🎉 (smithy-rs#1457, @calavera) Re-export aws_types::SdkConfig in aws_config

  • 🎉 (aws-sdk-rust#581) Add From<aws_smithy_client::erase::DynConnector> impl for aws_smithy_client::http_connector::HttpConnector

  • 🎉 (aws-sdk-rust#567) Updated SDK Client retry behavior to allow for a configurable initial backoff. Previously, the initial backoff
    (named r in the code) was set to 2 seconds. This is not an ideal default for services like DynamoDB that expect
    clients to quickly retry failed request attempts. Now, users can set quicker (or slower) backoffs according to their
    needs.

    #[tokio::main]
    async fn main() -> Result<(), aws_sdk_dynamodb::Error> {
        let retry_config = aws_smithy_types::retry::RetryConfigBuilder::new()
            .max_attempts(4)
            .initial_backoff(Duration::from_millis(20));
    
        let shared_config = aws_config::from_env()
            .retry_config(retry_config)
            .load()
            .await;
    
        let client = aws_sdk_dynamodb::Client::new(&shared_config);
    
        // Given the 20ms backoff multiplier, and assuming this request fails 3 times before succeeding,
        // the first retry would take place between 0-20ms after the initial request,
        // the second retry would take place between 0-40ms after the first retry,
        // and the third retry would take place between 0-80ms after the second retry.
        let request = client
            .put_item()
            .table_name("users")
            .item("username", "Velfi")
            .item("account_type", "Developer")
            .send().await?;
    
        Ok(())
    }
  • 🎉 (smithy-rs#1557, aws-sdk-rust#580) The imds::Client in aws-config now implements Clone

  • 🐛 (smithy-rs#1541, @joshtriplett) Fix compilation of aws-config with rustls and native-tls disabled. The
    ProviderConfig::with_tcp_connector method uses
    aws_smithy_client::hyper_ext, which only exists with the client-hyper
    feature enabled. Add a feature enabling that, and enable it by default.

  • (smithy-rs#1263) Add support for aws-chunked content encoding. Only single-chunk encoding is supported. Multiple chunks and
    chunk signing are not supported at this time.

  • (smithy-rs#1540) Until now, SDK crates have all shared the exact same version numbers.
    This changes with this release. From now on, SDK crates will only version
    bump if they have changes. Coincidentally, they may share the same version
    number for some releases since changes to the code generator will cause
    a version bump in all of them, but this should not be relied upon.

  • 🐛 (smithy-rs#1559, aws-sdk-rust#582) Remove warning for valid IMDS provider use-case

  • 🐛 (smithy-rs#1558, aws-sdk-rust#583) Only emit a warning about failing to expand a ~ to the home
    directory in a profile file's path if that path was explicitly
    set (don't emit it for the default paths)

  • (smithy-rs#1556) The sleep_impl methods on the SdkConfig builder are now exposed and documented.

Contributors
Thank you for your contributions! ❤

v0.15.0 (June 29th, 2022)

29 Jun 20:26
Compare
Choose a tag to compare
Pre-release

Breaking Changes:

  • ⚠ (smithy-rs#932) Replaced use of pin-project with equivalent pin-project-lite. For pinned enum tuple variants and tuple structs, this
    change requires that we switch to using enum struct variants and regular structs. Most of the structs and enums that
    were updated had only private fields/variants and so have the same public API. However, this change does affect the
    public API of aws_smithy_http_tower::map_request::MapRequestFuture<F, E>. The Inner and Ready variants contained a
    single value. Each have been converted to struct variants and the inner value is now accessible by the inner field
    instead of the 0 field.

New this release:

Contributors
Thank you for your contributions! ❤

v0.14.0 (June 22nd, 2022)

22 Jun 21:38
Compare
Choose a tag to compare
Pre-release

New this release:

  • 🐛 (aws-sdk-rust#547, smithy-rs#1458) Fix bug in profile file credential provider where a missing default profile lead to an unintended error.
  • (smithy-rs#1421) Add Debug implementation to several types in aws-config
  • 🐛 (aws-sdk-rust#558, smithy-rs#1478) Fix bug in retry policy where user configured timeouts were not retried. With this fix, setting
    with_call_attempt_timeout
    will lead to a retry when retries are enabled.
  • 🐛 (aws-sdk-rust#554) Requests to Route53 that return ResourceIds often come with a prefix. When passing those IDs directly into another
    request, the request would fail unless they manually stripped the prefix. Now, when making a request with a prefixed ID,
    the prefix will be stripped automatically.

v0.13.0 (June 9th, 2022)

09 Jun 23:37
Compare
Choose a tag to compare
Pre-release

New this release:

  • 🎉 (smithy-rs#1390) Add method ByteStream::into_async_read. This makes it easy to convert ByteStreams into a struct implementing tokio:io::AsyncRead. Available on crate feature rt-tokio only.
  • 🎉 (smithy-rs#1356, @jszwedko) Add support for credential_process in AWS configs for fetching credentials from an external process.
  • (smithy-rs#1404, @petrosagg) Switch to RustCrypto's implementation of MD5.

Contributors
Thank you for your contributions! ❤

v0.12.0 (May 13th, 2022)

13 May 22:55
Compare
Choose a tag to compare
Pre-release

New this release:

  • (smithy-rs#1352) Log a debug event when a retry is going to be peformed

v0.11.0 (April 28th 2022)

29 Apr 18:49
Compare
Choose a tag to compare
Pre-release

Breaking Changes:

  • ⚠ (smithy-rs#1318) Bump MSRV from 1.56.1 to 1.58.1 per our "two versions behind" policy.

New this release:

  • 🐛 (smithy-rs#1344, @ryansb) Suppress irrelevant $HOME expansion warning when running in a Lambda Extension

Contributors
Thank you for your contributions! ❤

0.10.1 (April 14th, 2022)

14 Apr 21:58
3ff4157
Compare
Choose a tag to compare
Pre-release

Breaking Changes:

New this release:

Contributors
Thank you for your contributions! ❤

0.9.0 (March 17, 2022)

17 Mar 22:32
Compare
Choose a tag to compare
Pre-release

Breaking Changes:

  • ⚠ (aws-sdk-rust#406) aws_types::config::Config has been renamed to aws_types::sdk_config::SdkConfig. This is to better differentiate it
    from service-specific configs like aws_sdk_s3::Config. If you were creating shared configs with
    aws_config::load_from_env(), then you don't have to do anything. If you were directly referring to a shared config,
    update your use statements and struct names.

    Before:

    use aws_types::config::Config;
    
    fn main() {
        let config = Config::builder()
        // config builder methods...
        .build()
        .await;
    }

    After:

    // We re-export this type from the root module so it's easier to reference
    use aws_types::SdkConfig;
    
    fn main() {
        let config = SdkConfig::builder()
        // config builder methods...
        .build()
        .await;
    }
  • ⚠ (smithy-rs#724) Timeout configuration has been refactored a bit. If you were setting timeouts through environment variables or an AWS
    profile, then you shouldn't need to change anything. Take note, however, that we don't currently support HTTP connect,
    read, write, or TLS negotiation timeouts. If you try to set any of those timeouts in your profile or environment, we'll
    log a warning explaining that those timeouts don't currently do anything.

    If you were using timeouts programmatically,
    you'll need to update your code. In previous versions, timeout configuration was stored in a single TimeoutConfig
    struct. In this new version, timeouts have been broken up into several different config structs that are then collected
    in a timeout::Config struct. As an example, to get the API per-attempt timeout in previous versions you would access
    it with <your TimeoutConfig>.api_call_attempt_timeout() and in this new version you would access it with
    <your timeout::Config>.api.call_attempt_timeout(). We also made some unimplemented timeouts inaccessible in order to
    avoid giving users the impression that setting them had an effect. We plan to re-introduce them once they're made
    functional in a future update.

New this release:

0.8.0 (Februrary 24, 2022)

24 Feb 22:04
Compare
Choose a tag to compare
Pre-release

Breaking Changes:

  • ⚠ (smithy-rs#1216) aws-sigv4 no longer skips the content-length and content-type headers when signing with SignatureLocation::QueryParams

New this release:

  • 🎉 (smithy-rs#1220, aws-sdk-rust#462) Made it possible to change settings, such as load timeout, on the credential cache used by the DefaultCredentialsChain.
  • 🐛 (smithy-rs#1197) Fixed a bug that caused clients to eventually stop retrying. The cross-request retry allowance wasn't being reimbursed upon receiving a successful response, so once this allowance reached zero, no further retries would ever be attempted.
  • 🐛 (smithy-rs#1217, aws-sdk-rust#467) ClientBuilder helpers rustls() and native_tls() now return DynConnector so that they once again work when constructing clients with custom middleware in the SDK.
  • 🐛 (smithy-rs#1216, aws-sdk-rust#466) Fixed a bug in S3 that prevented the content-length and content-type inputs from being included in a presigned request signature. With this fix, customers can generate presigned URLs that enforce content-length and content-type for requests to S3.