diff --git a/tools/ci-cdk/canary-lambda/src/s3_canary.rs b/tools/ci-cdk/canary-lambda/src/s3_canary.rs index 3a39028b4cc..f8d8e0955a3 100644 --- a/tools/ci-cdk/canary-lambda/src/s3_canary.rs +++ b/tools/ci-cdk/canary-lambda/src/s3_canary.rs @@ -34,14 +34,15 @@ pub async fn s3_canary(client: s3::Client, s3_bucket_name: String) -> anyhow::Re CanaryError(format!("Expected object {} to not exist in S3", test_key)).into(), ); } - Err(SdkError::ServiceError { - err: + Err(SdkError::ServiceError(context)) + if matches!( + context.err(), GetObjectError { kind: GetObjectErrorKind::NoSuchKey { .. }, .. - }, - .. - }) => { + } + ) => + { // good } Err(err) => {