Skip to content

Commit

Permalink
Bump the aws group with 1 update (#653)
Browse files Browse the repository at this point in the history
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rob Ede <[email protected]>
  • Loading branch information
dependabot[bot] and robjtede authored Nov 20, 2023
1 parent f967173 commit 1b43dde
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 50 deletions.
91 changes: 46 additions & 45 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions forms/multipart-s3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ actix-multipart.workspace = true
actix-web.workspace = true
actix-web-lab.workspace = true

aws-config = "0.57"
aws-sdk-s3 = "0.35"
aws-config = "0.101"
aws-sdk-s3 = "0.38"

dotenvy.workspace = true
env_logger.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion forms/multipart-s3/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl Client {
Some((
object
.content_length()
.try_into()
.and_then(|len| len.try_into().ok())
.expect("file has invalid size"),
object.body,
))
Expand Down
7 changes: 5 additions & 2 deletions forms/multipart-s3/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use actix_web::{
HttpServer, Responder,
};
use actix_web_lab::{extract::Path, respond::Html};
use aws_config::meta::region::RegionProviderChain;
use aws_config::{meta::region::RegionProviderChain, BehaviorVersion};
use dotenvy::dotenv;
use serde_json::json;

Expand Down Expand Up @@ -90,7 +90,10 @@ async fn main() -> std::io::Result<()> {

log::info!("configuring S3 client");
let aws_region = RegionProviderChain::default_provider().or_else("us-east-1");
let aws_config = aws_config::from_env().region(aws_region).load().await;
let aws_config = aws_config::defaults(BehaviorVersion::latest())
.region(aws_region)
.load()
.await;

// create singleton S3 client
let s3_client = Client::new(&aws_config);
Expand Down

0 comments on commit 1b43dde

Please sign in to comment.