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.”

Make requests

Focus mode
Make requests - AWS SDK for Rust

To make a request to an AWS service, you must first create a service client. For each AWS service your code uses, it has its own crate and its own Client for interacting with it.

The Client exposes one method for each API operation exposed by the service. The return value of each of these methods is a "fluent builder", where different inputs for that API are added by builder-style function call chaining. After calling the service's methods, call send() to get a Future that will result in either a successful output or a SdkError. For more information on SdkError, see Error handling.

The following example demonstrates a basic operation using Amazon S3 to create a bucket in the us-west-2 AWS Region:

let config = aws_config::defaults(BehaviorVersion::latest()) .load() .await; let s3 = aws_sdk_s3::Client::new(&config); let result = s3.create_bucket() // Set some of the inputs for the operation. .bucket("my-bucket") .create_bucket_configuration( CreateBucketConfiguration::builder() .location_constraint(aws_sdk_s3::types::BucketLocationConstraint::UsWest2) .build() ) // send() returns a Future that does nothing until awaited. .send() .await;

Each service crate has additional modules used for API inputs, such as the following:

  • The types module has structs or enums to provide more complex structured information.

  • The primitives module has simpler types for representing data such as date times or binary blobs.

See the API reference documentation for the service crate for more detailed crate organization and information. For example, the aws-sdk-s3 crate for the Amazon Simple Storage Service has several Modules. Two of which are:

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.