Skip to content

Commit

Permalink
fix(deps): update aws-sdk (#251)
Browse files Browse the repository at this point in the history
* fix(deps): update aws-sdk

* fix: Create error type that includes Response<SdkBody> in SdkError

* feat: Create types file with DefaultSdkError type

* Formatting

* FOrmatting

* Formatting

* Formatting

* Update src/types.rs

Co-authored-by: Ryan Kelly <[email protected]>

* Rename alias

* Renaming import

* Formatting

* Rename alias

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: mangoez <[email protected]>
Co-authored-by: Ryan Kelly <[email protected]>
  • Loading branch information
3 people authored Aug 21, 2023
1 parent 10824b5 commit a3d8de2
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 10 deletions.
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ include = [
[dependencies]
anyhow = "1.0.72"
async-trait = "0.1.71"
aws-config = "0.55.3"
aws-sdk-athena = "0.28.0"
aws-sdk-s3 = "0.28.0"
aws-sdk-sqs = "0.28.0"
aws-smithy-http = "0.55.3"
aws-types = "0.55.3"
aws-config = "0.56.0"
aws-sdk-athena = "0.29.0"
aws-sdk-s3 = "0.29.0"
aws-sdk-sqs = "0.29.0"
aws-smithy-http = "0.56.0"
aws-types = "0.56.0"
aws_lambda_events = { version = "0.10.0", default-features=false, features = ["sqs"]}
lambda_runtime = "0.8.1"
bytesize = "1.2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ pub mod config;
pub mod lambda;
pub mod s3;
pub mod sqs;

pub mod types;
// Internal shared modules
mod localstack;
3 changes: 2 additions & 1 deletion src/s3/async_multipart_put_object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use aws_sdk_s3::{
types::{CompletedMultipartUpload, CompletedPart, ObjectCannedAcl, Part},
Client,
};
use aws_smithy_http::{byte_stream::ByteStream, result::SdkError};
use aws_smithy_http::byte_stream::ByteStream;
use bytesize::{GIB, MIB};
use derivative::Derivative;
use futures::future::BoxFuture;
Expand All @@ -21,6 +21,7 @@ use std::pin::Pin;
use tracing::{event, instrument, Level};

use crate::s3::S3Object;
use crate::types::SdkError;

/// Convenience wrapper for boxed future
type MultipartUploadFuture<'a> =
Expand Down
2 changes: 1 addition & 1 deletion src/s3/async_put_object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ use aws_sdk_s3::{
operation::put_object::{PutObjectError, PutObjectOutput},
types::ObjectCannedAcl,
};
use aws_smithy_http::result::SdkError;
use futures::io::{Error, ErrorKind};
use futures::task::{Context, Poll};
use futures::{ready, AsyncWrite, Future};
use std::mem;
use std::pin::Pin;

use crate::s3::Client;
use crate::types::SdkError;

// Tracks the state of the AsyncWrite lifecycle for an AsyncPutObject.
enum PutObjectState<'a> {
Expand Down
3 changes: 2 additions & 1 deletion src/s3/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ use aws_sdk_s3::{
operation::{get_object::GetObjectError, list_objects_v2::ListObjectsV2Error},
types::Object,
};
use aws_smithy_http::result::SdkError;
use aws_types::SdkConfig;
use core::fmt::Debug;
use futures::stream;
use futures::stream::Stream;
use futures::{AsyncBufRead, TryStreamExt};

use crate::localstack;
use crate::types::SdkError;

/// Re-export of [aws_sdk_s3::client::Client](https://docs.rs/aws-sdk-s3/latest/aws_sdk_s3/client/struct.Client.html).
///
Expand Down Expand Up @@ -167,6 +167,7 @@ mod test {
types::{BucketLocationConstraint, CreateBucketConfiguration},
Client,
};
use aws_smithy_http::result::SdkError;
use rand::distributions::{Alphanumeric, DistString};
use rand::Rng;
use rand::SeedableRng;
Expand Down
5 changes: 5 additions & 0 deletions src/types.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
use aws_sdk_s3::primitives::SdkBody;
use http::Response;

/// Convenience wrapper to handle http response
pub(crate) type SdkError<E> = aws_smithy_http::result::SdkError<E, Response<SdkBody>>;

0 comments on commit a3d8de2

Please sign in to comment.