Write A Text String To An AWS S3 File In Rust
April 2024
```cargo
aws-config = "1.1.9"
aws-sdk-s3 = "1.21.0"
tokio =
```
use aws_sdk_s3 as s3;
async
async - This sends a string of text to a file in AWS S3
-
The config details are loaded from a named profile in the
~/.aws/configand~/.aws/credentailsfiles. -
The
~/.aws/credentailsfile has an entry for[Blog_Example_Profile]with my AWS credentails. -
The
~/.aws/configfile has a corresponding profile that sets the region like this:[Blog_Example_Profile] region = us-east-1
-
Some of the AWS SDK Examples show using
.region()in the config chain like:aws_config::defaults(...).credentials_provider(provider).region("us-east-1").load().await;Or, using aws_config::meta::region::RegionProviderChain. My setup doesn't need that, but yours might if you don't set the region in the
~/.aws/configfile or something else is different in the set up.
end of line