diff --git a/packages/retry-middleware/src/retryMiddleware.ts b/packages/retry-middleware/src/retryMiddleware.ts deleted file mode 100644 index fa5a97f9ef6e..000000000000 --- a/packages/retry-middleware/src/retryMiddleware.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - FinalizeHandler, - FinalizeHandlerArguments, - MetadataBearer, - FinalizeHandlerOutput, - Pluggable -} from "@aws-sdk/types"; -import { RetryConfig } from "./configurations"; - -export function retryMiddleware(options: RetryConfig.Resolved) { - return ( - next: FinalizeHandler - ): FinalizeHandler => async ( - args: FinalizeHandlerArguments - ): Promise> => { - return options.retryStrategy.retry(next, args); - }; -} - -export const retryPlugin = ( - options: RetryConfig.Resolved -): Pluggable => ({ - applyToStack: clientStack => { - if (options.maxRetries > 0) { - clientStack.add(retryMiddleware(options), { - step: "finalizeRequest", - tags: { RETRY: true } - }); - } - } -});