Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump the aws group with 1 update #653

Merged
merged 2 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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