diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddS3Config.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddS3Config.java index bb7df1bb9b3d..2f765ac20203 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddS3Config.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddS3Config.java @@ -272,7 +272,7 @@ && containsInputMembers(m, o, BUCKET_ENDPOINT_INPUT_KEYS)) RuntimeClientPlugin.builder() .withConventions(AwsDependency.S3_MIDDLEWARE.dependency, "S3ExpiresMiddleware", HAS_MIDDLEWARE) - .operationPredicate((m, s, o) -> containsExpiresOutput(m, o)) + .operationPredicate((m, s, o) -> isS3(s) && containsExpiresOutput(m, o)) .build(), RuntimeClientPlugin.builder() .withConventions(AwsDependency.S3_MIDDLEWARE.dependency, "S3Express",