Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

AWS Encryption SDK for Rust - AWS Encryption SDK

AWS Encryption SDK for Rust

This topic explains how to install and use the AWS Encryption SDK for Rust. For details about programming with the AWS Encryption SDK for Rust, see the Rust directory of the aws-encryption-sdk repository on GitHub.

The AWS Encryption SDK for Rust differs from some of the other programming language implementations of the AWS Encryption SDK in the following ways:

The AWS Encryption SDK for Rust includes all of the security features introduced in versions 2.0.x and later of other language implementations of the AWS Encryption SDK. However, if you are using the AWS Encryption SDK for Rust to decrypt data that was encrypted by a pre-2.0.x version another language implementation of the AWS Encryption SDK, you might need to adjust your commitment policy. For details, see How to set your commitment policy.

The AWS Encryption SDK for Rust is a product of the AWS Encryption SDK in Dafny, a formal verification language in which you write specifications, the code to implement them, and the proofs to test them. The result is a library that implements the features of the AWS Encryption SDK in a framework that assures functional correctness.

Learn More

  • For examples showing how to configure options in the AWS Encryption SDK, such as specifying an alternate algorithm suite, limiting encrypted data keys, and using AWS KMS multi-Region keys, see Configuring the AWS Encryption SDK.

  • For examples showing how to configure and use the AWS Encryption SDK for Rust, see the Rust examples in the aws-encryption-sdk repository on GitHub.

Prerequisites

Before you install the AWS Encryption SDK for Rust, be sure you have the following prerequisites.

Install Rust and Cargo

Install the current stable release of Rust using rustup.

For more information on downloading and installing rustup, see the installation procedures in The Cargo Book.

Installation

The AWS Encryption SDK for Rust is available as the aws-esdk crate on Crates.io. For details on installing and building the AWS Encryption SDK for Rust, see the README.md in the aws-encryption-sdk repository on GitHub.

You can install the AWS Encryption SDK for Rust in the following ways.

Manually

To install the AWS Encryption SDK for Rust, clone or download the aws-encryption-sdk GitHub repository.

Using Crates.io

Run the following Cargo command in your project directory:

cargo add aws-esdk

Or add the following line to your Cargo.toml:

aws-esdk = "<version>"
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.