You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by da...@apache.org on 2024/12/12 18:59:40 UTC

(beam) branch users/damccorm/deprecate-aws-1 created (now e73aa88fcce)

This is an automated email from the ASF dual-hosted git repository.

damccorm pushed a change to branch users/damccorm/deprecate-aws-1
in repository https://gitbox.apache.org/repos/asf/beam.git


      at e73aa88fcce Deprecate AWS v1 module

This branch includes the following new commits:

     new e73aa88fcce Deprecate AWS v1 module

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(beam) 01/01: Deprecate AWS v1 module

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

damccorm pushed a commit to branch users/damccorm/deprecate-aws-1
in repository https://gitbox.apache.org/repos/asf/beam.git

commit e73aa88fcce85d12c4e9a9640b7ebcd4d86e24f5
Author: Danny Mccormick <da...@google.com>
AuthorDate: Thu Dec 12 13:59:16 2024 -0500

    Deprecate AWS v1 module
---
 .github/workflows/README.md                        |    2 -
 ...reCommit_Java_Amazon-Web-Services_IO_Direct.yml |  145 ---
 .../beam_PreCommit_Java_Kinesis_IO_Direct.yml      |  152 ---
 sdks/java/io/amazon-web-services/build.gradle      |   74 --
 .../apache/beam/sdk/io/aws/coders/AwsCoders.java   |  141 ---
 .../beam/sdk/io/aws/coders/package-info.java       |   19 -
 .../sdk/io/aws/dynamodb/AttributeValueCoder.java   |  166 ---
 .../AttributeValueCoderProviderRegistrar.java      |   37 -
 .../sdk/io/aws/dynamodb/AwsClientsProvider.java    |   40 -
 .../sdk/io/aws/dynamodb/BasicDynamoDBProvider.java |   67 --
 .../beam/sdk/io/aws/dynamodb/DynamoDBIO.java       |  630 ----------
 .../beam/sdk/io/aws/dynamodb/package-info.java     |   19 -
 .../apache/beam/sdk/io/aws/options/AwsModule.java  |  390 ------
 .../apache/beam/sdk/io/aws/options/AwsOptions.java |  130 --
 .../aws/options/AwsPipelineOptionsRegistrar.java   |   36 -
 .../sdk/io/aws/options/S3ClientBuilderFactory.java |   25 -
 .../apache/beam/sdk/io/aws/options/S3Options.java  |  106 --
 .../beam/sdk/io/aws/options/package-info.java      |   22 -
 .../io/aws/s3/DefaultS3ClientBuilderFactory.java   |   51 -
 .../aws/s3/DefaultS3FileSystemSchemeRegistrar.java |   38 -
 .../apache/beam/sdk/io/aws/s3/S3FileSystem.java    |  671 -----------
 .../sdk/io/aws/s3/S3FileSystemConfiguration.java   |  124 --
 .../beam/sdk/io/aws/s3/S3FileSystemRegistrar.java  |   55 -
 .../sdk/io/aws/s3/S3FileSystemSchemeRegistrar.java |   47 -
 .../io/aws/s3/S3ReadableSeekableByteChannel.java   |  180 ---
 .../apache/beam/sdk/io/aws/s3/S3ResourceId.java    |  229 ----
 .../beam/sdk/io/aws/s3/S3WritableByteChannel.java  |  212 ----
 .../apache/beam/sdk/io/aws/s3/package-info.java    |   19 -
 .../beam/sdk/io/aws/sns/AwsClientsProvider.java    |   40 -
 .../beam/sdk/io/aws/sns/BasicSnsProvider.java      |   66 --
 .../beam/sdk/io/aws/sns/PublishResultCoders.java   |  124 --
 .../sdk/io/aws/sns/SnsCoderProviderRegistrar.java  |   38 -
 .../java/org/apache/beam/sdk/io/aws/sns/SnsIO.java |  420 -------
 .../apache/beam/sdk/io/aws/sns/package-info.java   |   19 -
 .../beam/sdk/io/aws/sqs/SqsCheckpointMark.java     |  101 --
 .../beam/sdk/io/aws/sqs/SqsConfiguration.java      |   81 --
 .../java/org/apache/beam/sdk/io/aws/sqs/SqsIO.java |  250 ----
 .../beam/sdk/io/aws/sqs/SqsMessageCoder.java       |   89 --
 .../beam/sdk/io/aws/sqs/SqsUnboundedReader.java    |  944 ---------------
 .../beam/sdk/io/aws/sqs/SqsUnboundedSource.java    |   88 --
 .../apache/beam/sdk/io/aws/sqs/package-info.java   |   19 -
 .../org/apache/beam/sdk/io/aws/ITEnvironment.java  |  148 ---
 .../beam/sdk/io/aws/coders/AwsCodersTest.java      |   68 --
 .../io/aws/dynamodb/AttributeValueCoderTest.java   |  211 ----
 .../beam/sdk/io/aws/dynamodb/DynamoDBIOIT.java     |  222 ----
 .../sdk/io/aws/dynamodb/DynamoDBIOReadTest.java    |  224 ----
 .../sdk/io/aws/dynamodb/DynamoDBIOWriteTest.java   |  430 -------
 .../io/aws/dynamodb/StaticAwsClientsProvider.java  |   55 -
 .../options/AwsHttpClientConfigurationTest.java    |   51 -
 .../beam/sdk/io/aws/options/AwsModuleTest.java     |  265 -----
 .../beam/sdk/io/aws/s3/MatchResultMatcher.java     |  118 --
 .../apache/beam/sdk/io/aws/s3/S3FileSystemIT.java  |  135 ---
 .../beam/sdk/io/aws/s3/S3FileSystemTest.java       | 1248 --------------------
 .../beam/sdk/io/aws/s3/S3ResourceIdTest.java       |  348 ------
 .../org/apache/beam/sdk/io/aws/s3/S3TestUtils.java |  169 ---
 .../sdk/io/aws/s3/S3WritableByteChannelTest.java   |  225 ----
 .../sdk/io/aws/sns/PublishResultCodersTest.java    |   91 --
 .../org/apache/beam/sdk/io/aws/sns/SnsIOIT.java    |  159 ---
 .../org/apache/beam/sdk/io/aws/sns/SnsIOTest.java  |  223 ----
 .../beam/sdk/io/aws/sqs/EmbeddedSqsServer.java     |   69 --
 .../org/apache/beam/sdk/io/aws/sqs/SqsIOIT.java    |  112 --
 .../org/apache/beam/sdk/io/aws/sqs/SqsIOTest.java  |   72 --
 .../beam/sdk/io/aws/sqs/SqsMessageCoderTest.java   |   62 -
 .../sdk/io/aws/sqs/SqsUnboundedReaderTest.java     |  196 ---
 .../sdk/io/aws/sqs/SqsUnboundedSourceTest.java     |   51 -
 sdks/java/io/kinesis/build.gradle                  |   57 -
 .../java/io/kinesis/expansion-service/build.gradle |   39 -
 .../beam/sdk/io/kinesis/AWSClientsProvider.java    |   38 -
 .../beam/sdk/io/kinesis/BasicKinesisProvider.java  |  122 --
 .../beam/sdk/io/kinesis/CheckpointGenerator.java   |   29 -
 .../apache/beam/sdk/io/kinesis/CustomOptional.java |  102 --
 .../sdk/io/kinesis/DynamicCheckpointGenerator.java |   59 -
 .../sdk/io/kinesis/GetKinesisRecordsResult.java    |   60 -
 .../kinesis/KinesisClientThrottledException.java   |   28 -
 .../org/apache/beam/sdk/io/kinesis/KinesisIO.java  | 1116 -----------------
 .../beam/sdk/io/kinesis/KinesisPartitioner.java    |   27 -
 .../apache/beam/sdk/io/kinesis/KinesisReader.java  |  222 ----
 .../sdk/io/kinesis/KinesisReaderCheckpoint.java    |   81 --
 .../apache/beam/sdk/io/kinesis/KinesisRecord.java  |  133 ---
 .../beam/sdk/io/kinesis/KinesisRecordCoder.java    |   76 --
 .../io/kinesis/KinesisShardClosedException.java    |   26 -
 .../apache/beam/sdk/io/kinesis/KinesisSource.java  |  164 ---
 .../sdk/io/kinesis/KinesisTransformRegistrar.java  |  266 -----
 .../beam/sdk/io/kinesis/RateLimitPolicy.java       |   37 -
 .../sdk/io/kinesis/RateLimitPolicyFactory.java     |  146 ---
 .../apache/beam/sdk/io/kinesis/RecordFilter.java   |   41 -
 .../beam/sdk/io/kinesis/ShardCheckpoint.java       |  180 ---
 .../beam/sdk/io/kinesis/ShardReadersPool.java      |  394 ------
 .../beam/sdk/io/kinesis/ShardRecordsIterator.java  |  153 ---
 .../sdk/io/kinesis/SimplifiedKinesisClient.java    |  359 ------
 .../apache/beam/sdk/io/kinesis/StartingPoint.java  |   88 --
 .../sdk/io/kinesis/StaticCheckpointGenerator.java  |   41 -
 .../sdk/io/kinesis/TransientKinesisException.java  |   28 -
 .../beam/sdk/io/kinesis/WatermarkParameters.java   |   98 --
 .../beam/sdk/io/kinesis/WatermarkPolicy.java       |   29 -
 .../sdk/io/kinesis/WatermarkPolicyFactory.java     |  152 ---
 .../apache/beam/sdk/io/kinesis/package-info.java   |   20 -
 .../beam/sdk/io/kinesis/serde/AwsModule.java       |  213 ----
 .../sdk/io/kinesis/serde/AwsSerializableUtils.java |   48 -
 .../beam/sdk/io/kinesis/serde/package-info.java    |   19 -
 .../beam/sdk/io/kinesis/AmazonKinesisMock.java     |  504 --------
 .../io/kinesis/BasicKinesisClientProviderTest.java |   53 -
 .../beam/sdk/io/kinesis/CustomOptionalTest.java    |   44 -
 .../io/kinesis/DynamicCheckpointGeneratorTest.java |   55 -
 .../apache/beam/sdk/io/kinesis/KinesisIOIT.java    |  261 ----
 .../beam/sdk/io/kinesis/KinesisIOReadTest.java     |  136 ---
 .../beam/sdk/io/kinesis/KinesisIOWriteTest.java    |  130 --
 .../beam/sdk/io/kinesis/KinesisMockReadTest.java   |  110 --
 .../beam/sdk/io/kinesis/KinesisMockWriteTest.java  |  255 ----
 .../beam/sdk/io/kinesis/KinesisProducerMock.java   |  130 --
 .../io/kinesis/KinesisReaderCheckpointTest.java    |   64 -
 .../beam/sdk/io/kinesis/KinesisReaderTest.java     |  184 ---
 .../sdk/io/kinesis/KinesisRecordCoderTest.java     |   46 -
 .../beam/sdk/io/kinesis/KinesisServiceMock.java    |   84 --
 .../beam/sdk/io/kinesis/KinesisTestOptions.java    |   87 --
 .../sdk/io/kinesis/RateLimitPolicyFactoryTest.java |  144 ---
 .../beam/sdk/io/kinesis/RecordFilterTest.java      |   62 -
 .../beam/sdk/io/kinesis/ShardCheckpointTest.java   |  162 ---
 .../beam/sdk/io/kinesis/ShardReadersPoolTest.java  |  355 ------
 .../sdk/io/kinesis/ShardRecordsIteratorTest.java   |  186 ---
 .../io/kinesis/SimplifiedKinesisClientTest.java    |  614 ----------
 .../beam/sdk/io/kinesis/WatermarkPolicyTest.java   |  166 ---
 .../beam/sdk/io/kinesis/serde/AwsModuleTest.java   |  172 ---
 .../io/kinesis/serde/AwsSerializableUtilsTest.java |  174 ---
 124 files changed, 19927 deletions(-)

diff --git a/.github/workflows/README.md b/.github/workflows/README.md
index 206364f416f..fe2bb63e19b 100644
--- a/.github/workflows/README.md
+++ b/.github/workflows/README.md
@@ -207,7 +207,6 @@ PreCommit Jobs run in a schedule and also get triggered in a PR if relevant sour
 | [ PreCommit Go ](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Go.yml) | N/A |`Run Go PreCommit`| [![.github/workflows/beam_PreCommit_Go.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Go.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Go.yml?query=event%3Aschedule) |
 | [ PreCommit GoPortable ](https://github.com/apache/beam/actions/workflows/beam_PreCommit_GoPortable.yml) | N/A |`Run GoPortable PreCommit`| [![.github/workflows/beam_PreCommit_GoPortable.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_GoPortable.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_GoPortable.yml?query=event%3Aschedule) |
 | [ PreCommit Java ](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java.yml) | N/A |`Run Java PreCommit`| [![.github/workflows/beam_PreCommit_Java.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java.yml?query=event%3Aschedule) |
-| [ PreCommit Java Amazon Web Services IO Direct ](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Amazon-Web-Services_IO_Direct.yml) | N/A |`Run Java_Amazon-Web-Services_IO_Direct PreCommit`| [![.github/workflows/beam_PreCommit_Java_Amazon-Web-Services_IO_Direct.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Amazon-Web-Services_IO_Direct.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Ama [...]
 | [ PreCommit Java Amazon Web Services2 IO Direct ](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Amazon-Web-Services2_IO_Direct.yml) | N/A |`Run Java_Amazon-Web-Services2_IO_Direct PreCommit`| [![.github/workflows/beam_PreCommit_Java_Amazon-Web-Services2_IO_Direct.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Amazon-Web-Services2_IO_Direct.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Jav [...]
 | [ PreCommit Java Amqp IO Direct ](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Amqp_IO_Direct.yml) | N/A |`Run Java_Amqp_IO_Direct PreCommit`| [![.github/workflows/beam_PreCommit_Java_Amqp_IO_Direct.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Amqp_IO_Direct.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Amqp_IO_Direct.yml?query=event%3Aschedule) |
 | [ PreCommit Java Azure IO Direct ](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Azure_IO_Direct.yml) | N/A |`Run Java_Azure_IO_Direct PreCommit`| [![.github/workflows/beam_PreCommit_Java_Azure_IO_Direct.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Azure_IO_Direct.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Azure_IO_Direct.yml?query=event%3Aschedule) |
@@ -231,7 +230,6 @@ PreCommit Jobs run in a schedule and also get triggered in a PR if relevant sour
 | [ PreCommit Java IOs Direct ](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_IOs_Direct.yml) | N/A |`Run Java_IOs_Direct PreCommit`| N/A |
 | [ PreCommit Java JDBC IO Direct ](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_JDBC_IO_Direct.yml) | N/A |`Run Java_JDBC_IO_Direct PreCommit`| [![.github/workflows/beam_PreCommit_Java_JDBC_IO_Direct.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_JDBC_IO_Direct.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_JDBC_IO_Direct.yml?query=event%3Aschedule) |
 | [ PreCommit Java Jms IO Direct ](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Jms_IO_Direct.yml) | N/A |`Run Java_Jms_IO_Direct PreCommit`| [![.github/workflows/beam_PreCommit_Java_Jms_IO_Direct.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Jms_IO_Direct.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Jms_IO_Direct.yml?query=event%3Aschedule) |
-| [ PreCommit Java Kinesis IO Direct ](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Kinesis_IO_Direct.yml) | N/A |`Run Java_Kinesis_IO_Direct PreCommit`| [![.github/workflows/beam_PreCommit_Java_Kinesis_IO_Direct.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Kinesis_IO_Direct.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Kinesis_IO_Direct.yml?query=event%3Aschedule) |
 | [ PreCommit Java Kudu IO Direct ](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Kudu_IO_Direct.yml) | N/A |`Run Java_Kudu_IO_Direct PreCommit`| [![.github/workflows/beam_PreCommit_Java_Kudu_IO_Direct.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Kudu_IO_Direct.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Kudu_IO_Direct.yml?query=event%3Aschedule) |
 | [ PreCommit Java MongoDb IO Direct ](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_MongoDb_IO_Direct.yml) | N/A |`Run Java_MongoDb_IO_Direct PreCommit`| [![.github/workflows/beam_PreCommit_Java_MongoDb_IO_Direct.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_MongoDb_IO_Direct.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_MongoDb_IO_Direct.yml?query=event%3Aschedule) |
 | [ PreCommit Java Mqtt IO Direct ](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Mqtt_IO_Direct.yml) | N/A |`Run Java_Mqtt_IO_Direct PreCommit`| [![.github/workflows/beam_PreCommit_Java_Mqtt_IO_Direct.yml](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Mqtt_IO_Direct.yml/badge.svg?event=schedule)](https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Mqtt_IO_Direct.yml?query=event%3Aschedule) |
diff --git a/.github/workflows/beam_PreCommit_Java_Amazon-Web-Services_IO_Direct.yml b/.github/workflows/beam_PreCommit_Java_Amazon-Web-Services_IO_Direct.yml
deleted file mode 100644
index 9053bb73037..00000000000
--- a/.github/workflows/beam_PreCommit_Java_Amazon-Web-Services_IO_Direct.yml
+++ /dev/null
@@ -1,145 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-name: PreCommit Java Amazon-Web-Services IO Direct
-
-on:
-  push:
-    tags: ['v*']
-    branches: ['master', 'release-*']
-    paths:
-      - "sdks/java/io/amazon-web-services/**"
-      - "sdks/java/io/common/**"
-      - "sdks/java/core/src/main/**"
-      - "build.gradle"
-      - "buildSrc/**"
-      - "gradle/**"
-      - "gradle.properties"
-      - "gradlew"
-      - "gradle.bat"
-      - "settings.gradle.kts"
-      - ".github/workflows/beam_PreCommit_Java_Amazon-Web-Services_IO_Direct.yml"
-  pull_request_target:
-    branches: ['master', 'release-*']
-    paths:
-      - "sdks/java/io/amazon-web-services/**"
-      - "sdks/java/io/common/**"
-      - "sdks/java/core/src/main/**"
-      - 'release/trigger_all_tests.json'
-      - '.github/trigger_files/beam_PreCommit_Java_Amazon-Web-Services_IO_Direct.json'
-      - "build.gradle"
-      - "buildSrc/**"
-      - "gradle/**"
-      - "gradle.properties"
-      - "gradlew"
-      - "gradle.bat"
-      - "settings.gradle.kts"
-  issue_comment:
-    types: [created]
-  schedule:
-    - cron: '0 1/6 * * *'
-  workflow_dispatch:
-
-#Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
-permissions:
-  actions: write
-  pull-requests: write
-  checks: write
-  contents: read
-  deployments: read
-  id-token: none
-  issues: write
-  discussions: read
-  packages: read
-  pages: read
-  repository-projects: read
-  security-events: read
-  statuses: read
-
-# This allows a subsequently queued workflow run to interrupt previous runs
-concurrency:
-  group: '${{ github.workflow }} @ ${{ github.event.issue.number || github.event.pull_request.head.label || github.sha || github.head_ref || github.ref }}-${{ github.event.schedule || github.event.comment.id || github.event.sender.login }}'
-  cancel-in-progress: true
-
-env:
-  DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
-  GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
-  GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}
-
-jobs:
-  beam_PreCommit_Java_Amazon-Web-Services_IO_Direct:
-    name: ${{ matrix.job_name }} (${{ matrix.job_phrase }})
-    strategy:
-      matrix:
-        job_name: ["beam_PreCommit_Java_Amazon-Web-Services_IO_Direct"]
-        job_phrase: ["Run Java_Amazon-Web-Services_IO_Direct PreCommit"]
-    timeout-minutes: 60
-    if: |
-      github.event_name == 'push' ||
-      github.event_name == 'pull_request_target' ||
-      (github.event_name == 'schedule' && github.repository == 'apache/beam') ||
-      github.event_name == 'workflow_dispatch' ||
-      github.event.comment.body == 'Run Java_Amazon-Web-Services_IO_Direct PreCommit'
-    runs-on: [self-hosted, ubuntu-20.04, main]
-    steps:
-      - uses: actions/checkout@v4
-      - name: Setup repository
-        uses: ./.github/actions/setup-action
-        with:
-          comment_phrase: ${{ matrix.job_phrase }}
-          github_token: ${{ secrets.GITHUB_TOKEN }}
-          github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }})
-      - name: Setup environment
-        uses: ./.github/actions/setup-environment-action
-      - name: run Amazon-Web-Services IO build script
-        uses: ./.github/actions/gradle-command-self-hosted-action
-        with:
-          gradle-command: :sdks:java:io:amazon-web-services:build
-          arguments: |
-            -PdisableSpotlessCheck=true \
-            -PdisableCheckStyle=true \
-      - name: run Amazon-Web-Services IO IT script
-        uses: ./.github/actions/gradle-command-self-hosted-action
-        with:
-          gradle-command: :sdks:java:io:amazon-web-services:integrationTest
-          arguments: |
-            -PdisableSpotlessCheck=true \
-            -PdisableCheckStyle=true \
-      - name: Archive JUnit Test Results
-        uses: actions/upload-artifact@v4
-        if: ${{ !success() }}
-        with:
-          name: JUnit Test Results
-          path: "**/build/reports/tests/"
-      - name: Publish JUnit Test Results
-        uses: EnricoMi/publish-unit-test-result-action@v2
-        if: always()
-        with:
-          commit: '${{ env.prsha || env.GITHUB_SHA }}'
-          comment_mode: ${{ github.event_name == 'issue_comment'  && 'always' || 'off' }}
-          files: '**/build/test-results/**/*.xml'
-          large_files: true
-      - name: Archive SpotBugs Results
-        uses: actions/upload-artifact@v4
-        if: always()
-        with:
-          name: SpotBugs Results
-          path: '**/build/reports/spotbugs/*.html'
-      - name: Publish SpotBugs Results
-        uses: jwgmeligmeyling/spotbugs-github-action@v1.2
-        if: always()
-        with:
-          name: Publish SpotBugs
-          path: '**/build/reports/spotbugs/*.html'
\ No newline at end of file
diff --git a/.github/workflows/beam_PreCommit_Java_Kinesis_IO_Direct.yml b/.github/workflows/beam_PreCommit_Java_Kinesis_IO_Direct.yml
deleted file mode 100644
index 785748e793e..00000000000
--- a/.github/workflows/beam_PreCommit_Java_Kinesis_IO_Direct.yml
+++ /dev/null
@@ -1,152 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-name: PreCommit Java Kinesis IO Direct
-
-on:
-  push:
-    tags: ['v*']
-    branches: ['master', 'release-*']
-    paths:
-      - "sdks/java/io/kinesis/**"
-      - "sdks/java/io/common/**"
-      - "sdks/java/core/src/main/**"
-      - "build.gradle"
-      - "buildSrc/**"
-      - "gradle/**"
-      - "gradle.properties"
-      - "gradlew"
-      - "gradle.bat"
-      - "settings.gradle.kts"
-      - ".github/workflows/beam_PreCommit_Java_Kinesis_IO_Direct.yml"
-  pull_request_target:
-    branches: ['master', 'release-*']
-    paths:
-      - "sdks/java/io/kinesis/**"
-      - "sdks/java/io/common/**"
-      - "sdks/java/core/src/main/**"
-      - "build.gradle"
-      - "buildSrc/**"
-      - "gradle/**"
-      - "gradle.properties"
-      - "gradlew"
-      - "gradle.bat"
-      - "settings.gradle.kts"
-      - 'release/trigger_all_tests.json'
-      - '.github/trigger_files/beam_PreCommit_Java_Kinesis_IO_Direct.json'
-  issue_comment:
-    types: [created]
-  schedule:
-    - cron: '0 2/6 * * *'
-  workflow_dispatch:
-
-#Setting explicit permissions for the action to avoid the default permissions which are `write-all` in case of pull_request_target event
-permissions:
-  actions: write
-  pull-requests: write
-  checks: write
-  contents: read
-  deployments: read
-  id-token: none
-  issues: write
-  discussions: read
-  packages: read
-  pages: read
-  repository-projects: read
-  security-events: read
-  statuses: read
-
-# This allows a subsequently queued workflow run to interrupt previous runs
-concurrency:
-  group: '${{ github.workflow }} @ ${{ github.event.issue.number || github.event.pull_request.head.label || github.sha || github.head_ref || github.ref }}-${{ github.event.schedule || github.event.comment.id || github.event.sender.login }}'
-  cancel-in-progress: true
-
-env:
-  DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
-  GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
-  GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}
-
-jobs:
-  beam_PreCommit_Java_Kinesis_IO_Direct:
-    name: ${{ matrix.job_name }} (${{ matrix.job_phrase }})
-    strategy:
-      matrix:
-        job_name: ["beam_PreCommit_Java_Kinesis_IO_Direct"]
-        job_phrase: ["Run Java_Kinesis_IO_Direct PreCommit"]
-    timeout-minutes: 60
-    if: |
-      github.event_name == 'push' ||
-      github.event_name == 'pull_request_target' ||
-      (github.event_name == 'schedule' && github.repository == 'apache/beam') ||
-      github.event_name == 'workflow_dispatch' ||
-      github.event.comment.body == 'Run Java_Kinesis_IO_Direct PreCommit'
-    runs-on: [self-hosted, ubuntu-20.04, main]
-    steps:
-      - uses: actions/checkout@v4
-      - name: Setup repository
-        uses: ./.github/actions/setup-action
-        with:
-          comment_phrase: ${{ matrix.job_phrase }}
-          github_token: ${{ secrets.GITHUB_TOKEN }}
-          github_job: ${{ matrix.job_name }} (${{ matrix.job_phrase }})
-      - name: Setup environment
-        uses: ./.github/actions/setup-environment-action
-      - name: run Kinesis IO build script
-        uses: ./.github/actions/gradle-command-self-hosted-action
-        with:
-          gradle-command: :sdks:java:io:kinesis:build
-          arguments: |
-            -PdisableSpotlessCheck=true \
-            -PdisableCheckStyle=true \
-      - name: run Kinesis expansion service script
-        uses: ./.github/actions/gradle-command-self-hosted-action
-        with:
-          gradle-command: :sdks:java:io:kinesis:expansion-service:build
-          arguments: |
-            -PdisableSpotlessCheck=true \
-            -PdisableCheckStyle=true \
-      - name: run Kinesis IO IT script
-        uses: ./.github/actions/gradle-command-self-hosted-action
-        with:
-          gradle-command: :sdks:java:io:kinesis:integrationTest
-          arguments: |
-            -PdisableSpotlessCheck=true \
-            -PdisableCheckStyle=true \
-      - name: Archive JUnit Test Results
-        uses: actions/upload-artifact@v4
-        if: ${{ !success() }}
-        with:
-          name: JUnit Test Results
-          path: "**/build/reports/tests/"
-      - name: Publish JUnit Test Results
-        uses: EnricoMi/publish-unit-test-result-action@v2
-        if: always()
-        with:
-          commit: '${{ env.prsha || env.GITHUB_SHA }}'
-          comment_mode: ${{ github.event_name == 'issue_comment'  && 'always' || 'off' }}
-          files: '**/build/test-results/**/*.xml'
-          large_files: true
-      - name: Archive SpotBugs Results
-        uses: actions/upload-artifact@v4
-        if: always()
-        with:
-          name: SpotBugs Results
-          path: '**/build/reports/spotbugs/*.html'
-      - name: Publish SpotBugs Results
-        uses: jwgmeligmeyling/spotbugs-github-action@v1.2
-        if: always()
-        with:
-          name: Publish SpotBugs
-          path: '**/build/reports/spotbugs/*.html'
\ No newline at end of file
diff --git a/sdks/java/io/amazon-web-services/build.gradle b/sdks/java/io/amazon-web-services/build.gradle
deleted file mode 100644
index b9ed51fbbf7..00000000000
--- a/sdks/java/io/amazon-web-services/build.gradle
+++ /dev/null
@@ -1,74 +0,0 @@
-import groovy.json.JsonOutput
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * License); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-plugins {
-  id 'org.apache.beam.module'
-}
-
-applyJavaNature(
-  automaticModuleName: 'org.apache.beam.sdk.io.aws',
-)
-
-provideIntegrationTestingDependencies()
-enableJavaPerformanceTesting()
-
-description = "Apache Beam :: SDKs :: Java :: IO :: Amazon Web Services"
-ext.summary = "IO library to read and write Amazon Web Services services from Beam."
-
-dependencies {
-  implementation library.java.vendored_guava_32_1_2_jre
-  implementation project(path: ":sdks:java:core", configuration: "shadow")
-  implementation library.java.aws_java_sdk_cloudwatch
-  implementation library.java.aws_java_sdk_core
-  implementation library.java.aws_java_sdk_dynamodb
-  implementation library.java.aws_java_sdk_s3
-  implementation library.java.aws_java_sdk_sns
-  implementation library.java.aws_java_sdk_sqs
-  implementation library.java.aws_java_sdk_sts
-  implementation library.java.jackson_core
-  implementation library.java.jackson_annotations
-  implementation library.java.jackson_databind
-  implementation library.java.slf4j_api
-  implementation library.java.joda_time
-  implementation library.java.http_core
-  runtimeOnly library.java.commons_codec
-  runtimeOnly "org.apache.httpcomponents:httpclient:4.5.12"
-  testImplementation project(path: ":sdks:java:core", configuration: "shadowTest")
-  testImplementation project(path: ":sdks:java:extensions:avro", configuration: "testRuntimeMigration")
-  testImplementation project(path: ":sdks:java:io:common")
-  testImplementation "io.findify:s3mock_2.12:0.2.6"
-  testImplementation library.java.commons_lang3
-  testImplementation library.java.hamcrest
-  testImplementation library.java.mockito_core
-  testImplementation library.java.junit
-  testImplementation library.java.testcontainers_localstack
-  testImplementation "org.assertj:assertj-core:3.11.1"
-  testImplementation 'org.elasticmq:elasticmq-rest-sqs_2.12:0.15.6'
-  testRuntimeOnly library.java.slf4j_jdk14
-  testRuntimeOnly project(path: ":runners:direct-java", configuration: "shadow")
-}
-
-test {
-  systemProperty "beamTestPipelineOptions", JsonOutput.toJson([
-      '--awsRegion=us-west-2',
-      '--awsCredentialsProvider={"@type" : "AWSStaticCredentialsProvider", "awsAccessKeyId" : "key_id_value","awsSecretKey" : "secret_value"}'
-  ])
-  maxParallelForks 4
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/coders/AwsCoders.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/coders/AwsCoders.java
deleted file mode 100644
index 501bfc01586..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/coders/AwsCoders.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.coders;
-
-import com.amazonaws.ResponseMetadata;
-import com.amazonaws.http.HttpResponse;
-import com.amazonaws.http.SdkHttpMetadata;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Map;
-import java.util.Optional;
-import org.apache.beam.sdk.coders.AtomicCoder;
-import org.apache.beam.sdk.coders.Coder;
-import org.apache.beam.sdk.coders.CoderException;
-import org.apache.beam.sdk.coders.CustomCoder;
-import org.apache.beam.sdk.coders.MapCoder;
-import org.apache.beam.sdk.coders.NullableCoder;
-import org.apache.beam.sdk.coders.StringUtf8Coder;
-import org.apache.beam.sdk.coders.VarIntCoder;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableMap;
-
-/** {@link Coder}s for common AWS SDK objects. */
-@SuppressWarnings({
-  "nullness" // TODO(https://github.com/apache/beam/issues/20497)
-})
-public final class AwsCoders {
-
-  private AwsCoders() {}
-
-  /**
-   * Returns a new coder for ResponseMetadata.
-   *
-   * @return the ResponseMetadata coder
-   */
-  public static Coder<ResponseMetadata> responseMetadata() {
-    return ResponseMetadataCoder.of();
-  }
-
-  /**
-   * Returns a new coder for SdkHttpMetadata.
-   *
-   * @return the SdkHttpMetadata coder
-   */
-  public static Coder<SdkHttpMetadata> sdkHttpMetadata() {
-    return new SdkHttpMetadataCoder(true);
-  }
-
-  /**
-   * Returns a new coder for SdkHttpMetadata that does not serialize the response headers.
-   *
-   * @return the SdkHttpMetadata coder
-   */
-  public static Coder<SdkHttpMetadata> sdkHttpMetadataWithoutHeaders() {
-    return new SdkHttpMetadataCoder(false);
-  }
-
-  private static class ResponseMetadataCoder extends AtomicCoder<ResponseMetadata> {
-
-    private static final Coder<Map<String, String>> METADATA_ENCODER =
-        NullableCoder.of(MapCoder.of(StringUtf8Coder.of(), StringUtf8Coder.of()));
-    private static final ResponseMetadataCoder INSTANCE = new ResponseMetadataCoder();
-
-    private ResponseMetadataCoder() {}
-
-    public static ResponseMetadataCoder of() {
-      return INSTANCE;
-    }
-
-    @Override
-    public void encode(ResponseMetadata value, OutputStream outStream)
-        throws CoderException, IOException {
-      METADATA_ENCODER.encode(
-          ImmutableMap.of(ResponseMetadata.AWS_REQUEST_ID, value.getRequestId()), outStream);
-    }
-
-    @Override
-    public ResponseMetadata decode(InputStream inStream) throws CoderException, IOException {
-      return new ResponseMetadata(METADATA_ENCODER.decode(inStream));
-    }
-  }
-
-  private static class SdkHttpMetadataCoder extends CustomCoder<SdkHttpMetadata> {
-
-    private static final Coder<Integer> STATUS_CODE_CODER = VarIntCoder.of();
-    private static final Coder<Map<String, String>> HEADERS_ENCODER =
-        NullableCoder.of(MapCoder.of(StringUtf8Coder.of(), StringUtf8Coder.of()));
-
-    private final boolean includeHeaders;
-
-    protected SdkHttpMetadataCoder(boolean includeHeaders) {
-      this.includeHeaders = includeHeaders;
-    }
-
-    @Override
-    public void encode(SdkHttpMetadata value, OutputStream outStream)
-        throws CoderException, IOException {
-      STATUS_CODE_CODER.encode(value.getHttpStatusCode(), outStream);
-      if (includeHeaders) {
-        HEADERS_ENCODER.encode(value.getHttpHeaders(), outStream);
-      }
-    }
-
-    @Override
-    public SdkHttpMetadata decode(InputStream inStream) throws CoderException, IOException {
-      final int httpStatusCode = STATUS_CODE_CODER.decode(inStream);
-      HttpResponse httpResponse = new HttpResponse(null, null);
-      httpResponse.setStatusCode(httpStatusCode);
-      if (includeHeaders) {
-        Optional.ofNullable(HEADERS_ENCODER.decode(inStream))
-            .ifPresent(
-                headers ->
-                    headers.keySet().forEach(k -> httpResponse.addHeader(k, headers.get(k))));
-      }
-      return SdkHttpMetadata.from(httpResponse);
-    }
-
-    @Override
-    public void verifyDeterministic() throws NonDeterministicException {
-      STATUS_CODE_CODER.verifyDeterministic();
-      if (includeHeaders) {
-        HEADERS_ENCODER.verifyDeterministic();
-      }
-    }
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/coders/package-info.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/coders/package-info.java
deleted file mode 100644
index 1b76a71ae64..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/coders/package-info.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/** Defines common coders for Amazon Web Services. */
-package org.apache.beam.sdk.io.aws.coders;
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/dynamodb/AttributeValueCoder.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/dynamodb/AttributeValueCoder.java
deleted file mode 100644
index 4bdf8b51d3b..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/dynamodb/AttributeValueCoder.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.dynamodb;
-
-import com.amazonaws.services.dynamodbv2.model.AttributeValue;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.ByteBuffer;
-import java.util.List;
-import java.util.stream.Collectors;
-import org.apache.beam.sdk.coders.AtomicCoder;
-import org.apache.beam.sdk.coders.BooleanCoder;
-import org.apache.beam.sdk.coders.ByteArrayCoder;
-import org.apache.beam.sdk.coders.Coder;
-import org.apache.beam.sdk.coders.CoderException;
-import org.apache.beam.sdk.coders.ListCoder;
-import org.apache.beam.sdk.coders.MapCoder;
-import org.apache.beam.sdk.coders.StringUtf8Coder;
-
-/** A {@link Coder} that serializes and deserializes the {@link AttributeValue} objects. */
-public class AttributeValueCoder extends AtomicCoder<AttributeValue> {
-
-  /** Data type of each value type in AttributeValue object. */
-  private enum AttributeValueType {
-    s, // for String
-    n, // for Number
-    b, // for Byte
-    sS, // for List of String
-    nS, // for List of Number
-    bS, // for List of Byte
-    m, // for Map of String and AttributeValue
-    l, // for list of AttributeValue
-    bOOL, // for Boolean
-    nULLValue, // for null
-  }
-
-  private static final AttributeValueCoder INSTANCE = new AttributeValueCoder();
-
-  private static final ListCoder<String> LIST_STRING_CODER = ListCoder.of(StringUtf8Coder.of());
-  private static final ListCoder<byte[]> LIST_BYTE_CODER = ListCoder.of(ByteArrayCoder.of());
-
-  private static final ListCoder<AttributeValue> LIST_ATTRIBUTE_CODER =
-      ListCoder.of(AttributeValueCoder.of());
-  private static final MapCoder<String, AttributeValue> MAP_ATTRIBUTE_CODER =
-      MapCoder.of(StringUtf8Coder.of(), AttributeValueCoder.of());
-
-  private AttributeValueCoder() {}
-
-  public static AttributeValueCoder of() {
-    return INSTANCE;
-  }
-
-  @Override
-  public void encode(AttributeValue value, OutputStream outStream) throws IOException {
-
-    if (value.getS() != null) {
-      StringUtf8Coder.of().encode(AttributeValueType.s.toString(), outStream);
-      StringUtf8Coder.of().encode(value.getS(), outStream);
-    } else if (value.getN() != null) {
-      StringUtf8Coder.of().encode(AttributeValueType.n.toString(), outStream);
-      StringUtf8Coder.of().encode(value.getN(), outStream);
-    } else if (value.getBOOL() != null) {
-      StringUtf8Coder.of().encode(AttributeValueType.bOOL.toString(), outStream);
-      BooleanCoder.of().encode(value.getBOOL(), outStream);
-    } else if (value.getB() != null) {
-      StringUtf8Coder.of().encode(AttributeValueType.b.toString(), outStream);
-      ByteArrayCoder.of().encode(convertToByteArray(value.getB()), outStream);
-    } else if (value.getSS() != null) {
-      StringUtf8Coder.of().encode(AttributeValueType.sS.toString(), outStream);
-      LIST_STRING_CODER.encode(value.getSS(), outStream);
-    } else if (value.getNS() != null) {
-      StringUtf8Coder.of().encode(AttributeValueType.nS.toString(), outStream);
-      LIST_STRING_CODER.encode(value.getNS(), outStream);
-    } else if (value.getBS() != null) {
-      StringUtf8Coder.of().encode(AttributeValueType.bS.toString(), outStream);
-      LIST_BYTE_CODER.encode(convertToListByteArray(value.getBS()), outStream);
-    } else if (value.getL() != null) {
-      StringUtf8Coder.of().encode(AttributeValueType.l.toString(), outStream);
-      LIST_ATTRIBUTE_CODER.encode(value.getL(), outStream);
-    } else if (value.getM() != null) {
-      StringUtf8Coder.of().encode(AttributeValueType.m.toString(), outStream);
-      MAP_ATTRIBUTE_CODER.encode(value.getM(), outStream);
-    } else if (value.getNULL() != null) {
-      StringUtf8Coder.of().encode(AttributeValueType.nULLValue.toString(), outStream);
-      BooleanCoder.of().encode(value.getNULL(), outStream);
-    } else {
-      throw new CoderException("Unknown Type");
-    }
-  }
-
-  @Override
-  public AttributeValue decode(InputStream inStream) throws IOException {
-    AttributeValue attrValue = new AttributeValue();
-
-    String type = StringUtf8Coder.of().decode(inStream);
-    AttributeValueType attrType = AttributeValueType.valueOf(type);
-
-    switch (attrType) {
-      case s:
-        attrValue.setS(StringUtf8Coder.of().decode(inStream));
-        break;
-      case n:
-        attrValue.setN(StringUtf8Coder.of().decode(inStream));
-        break;
-      case bOOL:
-        attrValue.setBOOL(BooleanCoder.of().decode(inStream));
-        break;
-      case b:
-        attrValue.setB(ByteBuffer.wrap(ByteArrayCoder.of().decode(inStream)));
-        break;
-      case sS:
-        attrValue.setSS(LIST_STRING_CODER.decode(inStream));
-        break;
-      case nS:
-        attrValue.setNS(LIST_STRING_CODER.decode(inStream));
-        break;
-      case bS:
-        attrValue.setBS(convertToListByteBuffer(LIST_BYTE_CODER.decode(inStream)));
-        break;
-      case l:
-        attrValue.setL(LIST_ATTRIBUTE_CODER.decode(inStream));
-        break;
-      case m:
-        attrValue.setM(MAP_ATTRIBUTE_CODER.decode(inStream));
-        break;
-      case nULLValue:
-        attrValue.setNULL(BooleanCoder.of().decode(inStream));
-        break;
-      default:
-        throw new CoderException("Unknown Type");
-    }
-
-    return attrValue;
-  }
-
-  private List<byte[]> convertToListByteArray(List<ByteBuffer> listByteBuffer) {
-    return listByteBuffer.stream().map(this::convertToByteArray).collect(Collectors.toList());
-  }
-
-  private byte[] convertToByteArray(ByteBuffer buffer) {
-    byte[] bytes = new byte[buffer.remaining()];
-    buffer.get(bytes);
-    buffer.position(buffer.position() - bytes.length);
-    return bytes;
-  }
-
-  private List<ByteBuffer> convertToListByteBuffer(List<byte[]> listByteArr) {
-    return listByteArr.stream().map(ByteBuffer::wrap).collect(Collectors.toList());
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/dynamodb/AttributeValueCoderProviderRegistrar.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/dynamodb/AttributeValueCoderProviderRegistrar.java
deleted file mode 100644
index 5a187e734d6..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/dynamodb/AttributeValueCoderProviderRegistrar.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.dynamodb;
-
-import com.amazonaws.services.dynamodbv2.model.AttributeValue;
-import com.google.auto.service.AutoService;
-import java.util.List;
-import org.apache.beam.sdk.coders.CoderProvider;
-import org.apache.beam.sdk.coders.CoderProviderRegistrar;
-import org.apache.beam.sdk.coders.CoderProviders;
-import org.apache.beam.sdk.values.TypeDescriptor;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableList;
-
-/** A {@link CoderProviderRegistrar} for standard types used with {@link DynamoDBIO}. */
-@AutoService(CoderProviderRegistrar.class)
-public class AttributeValueCoderProviderRegistrar implements CoderProviderRegistrar {
-  @Override
-  public List<CoderProvider> getCoderProviders() {
-    return ImmutableList.of(
-        CoderProviders.forCoder(TypeDescriptor.of(AttributeValue.class), AttributeValueCoder.of()));
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/dynamodb/AwsClientsProvider.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/dynamodb/AwsClientsProvider.java
deleted file mode 100644
index f2d13b144e8..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/dynamodb/AwsClientsProvider.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.dynamodb;
-
-import com.amazonaws.services.cloudwatch.AmazonCloudWatch;
-import com.amazonaws.services.dynamodbv2.AmazonDynamoDB;
-import java.io.Serializable;
-
-/**
- * Provides instances of AWS clients.
- *
- * <p>Please note, that any instance of {@link AwsClientsProvider} must be {@link Serializable} to
- * ensure it can be sent to worker machines.
- */
-public interface AwsClientsProvider extends Serializable {
-
-  /** @deprecated DynamoDBIO doesn't require a CloudWatch client */
-  @Deprecated
-  @SuppressWarnings("return")
-  default AmazonCloudWatch getCloudWatchClient() {
-    return null;
-  }
-
-  AmazonDynamoDB createDynamoDB();
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/dynamodb/BasicDynamoDBProvider.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/dynamodb/BasicDynamoDBProvider.java
deleted file mode 100644
index b4ee1be74ab..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/dynamodb/BasicDynamoDBProvider.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.dynamodb;
-
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkArgument;
-
-import com.amazonaws.auth.AWSCredentialsProvider;
-import com.amazonaws.auth.AWSStaticCredentialsProvider;
-import com.amazonaws.auth.BasicAWSCredentials;
-import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration;
-import com.amazonaws.regions.Regions;
-import com.amazonaws.services.dynamodbv2.AmazonDynamoDB;
-import com.amazonaws.services.dynamodbv2.AmazonDynamoDBClientBuilder;
-import org.checkerframework.checker.nullness.qual.Nullable;
-
-/** Basic implementation of {@link AwsClientsProvider} used by default in {@link DynamoDBIO}. */
-public class BasicDynamoDBProvider implements AwsClientsProvider {
-  private final String accessKey;
-  private final String secretKey;
-  private final Regions region;
-  private final @Nullable String serviceEndpoint;
-
-  BasicDynamoDBProvider(
-      String accessKey, String secretKey, Regions region, @Nullable String serviceEndpoint) {
-    checkArgument(accessKey != null, "accessKey can not be null");
-    checkArgument(secretKey != null, "secretKey can not be null");
-    checkArgument(region != null, "region can not be null");
-    this.accessKey = accessKey;
-    this.secretKey = secretKey;
-    this.region = region;
-    this.serviceEndpoint = serviceEndpoint;
-  }
-
-  private AWSCredentialsProvider getCredentialsProvider() {
-    return new AWSStaticCredentialsProvider(new BasicAWSCredentials(accessKey, secretKey));
-  }
-
-  @Override
-  public AmazonDynamoDB createDynamoDB() {
-    AmazonDynamoDBClientBuilder clientBuilder =
-        AmazonDynamoDBClientBuilder.standard().withCredentials(getCredentialsProvider());
-
-    if (serviceEndpoint == null) {
-      clientBuilder.withRegion(region);
-    } else {
-      clientBuilder.withEndpointConfiguration(
-          new EndpointConfiguration(serviceEndpoint, region.getName()));
-    }
-
-    return clientBuilder.build();
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/dynamodb/DynamoDBIO.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/dynamodb/DynamoDBIO.java
deleted file mode 100644
index e2c04c58b45..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/dynamodb/DynamoDBIO.java
+++ /dev/null
@@ -1,630 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.dynamodb;
-
-import static java.util.stream.Collectors.groupingBy;
-import static java.util.stream.Collectors.mapping;
-import static java.util.stream.Collectors.toList;
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkArgument;
-
-import com.amazonaws.regions.Regions;
-import com.amazonaws.services.dynamodbv2.AmazonDynamoDB;
-import com.amazonaws.services.dynamodbv2.model.AmazonDynamoDBException;
-import com.amazonaws.services.dynamodbv2.model.AttributeValue;
-import com.amazonaws.services.dynamodbv2.model.BatchWriteItemRequest;
-import com.amazonaws.services.dynamodbv2.model.BatchWriteItemResult;
-import com.amazonaws.services.dynamodbv2.model.ScanRequest;
-import com.amazonaws.services.dynamodbv2.model.ScanResult;
-import com.amazonaws.services.dynamodbv2.model.WriteRequest;
-import com.google.auto.value.AutoValue;
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.function.Predicate;
-import java.util.stream.Collectors;
-import org.apache.beam.sdk.coders.Coder;
-import org.apache.beam.sdk.coders.ListCoder;
-import org.apache.beam.sdk.coders.MapCoder;
-import org.apache.beam.sdk.coders.SerializableCoder;
-import org.apache.beam.sdk.coders.StringUtf8Coder;
-import org.apache.beam.sdk.metrics.Counter;
-import org.apache.beam.sdk.metrics.Metrics;
-import org.apache.beam.sdk.transforms.Create;
-import org.apache.beam.sdk.transforms.DoFn;
-import org.apache.beam.sdk.transforms.PTransform;
-import org.apache.beam.sdk.transforms.ParDo;
-import org.apache.beam.sdk.transforms.Reshuffle;
-import org.apache.beam.sdk.transforms.SerializableFunction;
-import org.apache.beam.sdk.util.BackOff;
-import org.apache.beam.sdk.util.BackOffUtils;
-import org.apache.beam.sdk.util.FluentBackoff;
-import org.apache.beam.sdk.util.Sleeper;
-import org.apache.beam.sdk.values.KV;
-import org.apache.beam.sdk.values.PBegin;
-import org.apache.beam.sdk.values.PCollection;
-import org.apache.beam.sdk.values.TypeDescriptor;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.annotations.VisibleForTesting;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableSet;
-import org.apache.http.HttpStatus;
-import org.checkerframework.checker.nullness.qual.Nullable;
-import org.joda.time.Duration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * {@link PTransform}s to read/write from/to <a href="https://aws.amazon.com/dynamodb/">Amazon
- * DynamoDB</a>.
- *
- * <h3>Writing to DynamoDB</h3>
- *
- * <p>Example usage:
- *
- * <pre>{@code
- * PCollection<T> data = ...;
- * data.apply(
- *           DynamoDBIO.<WriteRequest>write()
- *               .withWriteRequestMapperFn(
- *                   (SerializableFunction<T, KV<String, WriteRequest>>)
- *                       //Transforming your T data into KV<String, WriteRequest>
- *                       t -> KV.of(tableName, writeRequest))
- *               .withRetryConfiguration(
- *                    DynamoDBIO.RetryConfiguration.create(5, Duration.standardMinutes(1)))
- *               .withAwsClientsProvider(new BasicDynamoDbProvider(accessKey, secretKey, region));
- * }</pre>
- *
- * <p>As a client, you need to provide at least the following things:
- *
- * <ul>
- *   <li>Retry configuration
- *   <li>Specify AwsClientsProvider. You can pass on the default one BasicDynamoDbProvider
- *   <li>Mapper function with a table name to map or transform your object into KV<tableName,
- *       writeRequest>
- * </ul>
- *
- * <b>Note:</b> AWS does not allow writing duplicate keys within a single batch operation. If
- * primary keys possibly repeat in your stream (i.e. an upsert stream), you may encounter a
- * `ValidationError`. To address this you have to provide the key names corresponding to your
- * primary key using {@link Write#withDeduplicateKeys(List)}. Based on these keys only the last
- * observed element is kept. Nevertheless, if no deduplication keys are provided, identical elements
- * are still deduplicated.
- *
- * <h3>Reading from DynamoDB</h3>
- *
- * <p>Example usage:
- *
- * <pre>{@code
- * PCollection<List<Map<String, AttributeValue>>> output =
- *     pipeline.apply(
- *             DynamoDBIO.<List<Map<String, AttributeValue>>>read()
- *                 .withAwsClientsProvider(new BasicDynamoDBProvider(accessKey, secretKey, region))
- *                 .withScanRequestFn(
- *                     (SerializableFunction<Void, ScanRequest>)
- *                         input -> new ScanRequest(tableName).withTotalSegments(1))
- *                 .items());
- * }</pre>
- *
- * <p>As a client, you need to provide at least the following things:
- *
- * <ul>
- *   <li>Specify AwsClientsProvider. You can pass on the default one BasicDynamoDBProvider
- *   <li>ScanRequestFn, which you build a ScanRequest object with at least table name and total
- *       number of segment. Note This number should base on the number of your workers
- * </ul>
- *
- * @deprecated Module <code>beam-sdks-java-io-amazon-web-services</code> is deprecated and will be
- *     eventually removed. Please migrate to {@link org.apache.beam.sdk.io.aws2.dynamodb.DynamoDBIO}
- *     in module <code>beam-sdks-java-io-amazon-web-services2</code>.
- */
-@Deprecated
-@SuppressWarnings({
-  "nullness" // TODO(https://github.com/apache/beam/issues/20497)
-})
-public final class DynamoDBIO {
-  public static <T> Read<T> read() {
-    return new AutoValue_DynamoDBIO_Read.Builder<T>().build();
-  }
-
-  public static <T> Write<T> write() {
-    return new AutoValue_DynamoDBIO_Write.Builder<T>()
-        .setDeduplicateKeys(new ArrayList<>())
-        .build();
-  }
-
-  /** Read data from DynamoDB and return ScanResult. */
-  @AutoValue
-  public abstract static class Read<T> extends PTransform<PBegin, PCollection<T>> {
-
-    abstract @Nullable AwsClientsProvider getAwsClientsProvider();
-
-    abstract @Nullable SerializableFunction<Void, ScanRequest> getScanRequestFn();
-
-    abstract @Nullable Integer getSegmentId();
-
-    abstract @Nullable SerializableFunction<ScanResult, T> getScanResultMapperFn();
-
-    abstract @Nullable Coder<T> getCoder();
-
-    abstract Builder<T> toBuilder();
-
-    @AutoValue.Builder
-    abstract static class Builder<T> {
-
-      abstract Builder<T> setAwsClientsProvider(AwsClientsProvider awsClientsProvider);
-
-      abstract Builder<T> setScanRequestFn(SerializableFunction<Void, ScanRequest> fn);
-
-      abstract Builder<T> setSegmentId(Integer segmentId);
-
-      abstract Builder<T> setScanResultMapperFn(
-          SerializableFunction<ScanResult, T> scanResultMapperFn);
-
-      abstract Builder<T> setCoder(Coder<T> coder);
-
-      abstract Read<T> build();
-    }
-
-    public Read<T> withAwsClientsProvider(AwsClientsProvider awsClientsProvider) {
-      return toBuilder().setAwsClientsProvider(awsClientsProvider).build();
-    }
-
-    public Read<T> withAwsClientsProvider(
-        String awsAccessKey, String awsSecretKey, Regions region, String serviceEndpoint) {
-      return withAwsClientsProvider(
-          new BasicDynamoDBProvider(awsAccessKey, awsSecretKey, region, serviceEndpoint));
-    }
-
-    public Read<T> withAwsClientsProvider(
-        String awsAccessKey, String awsSecretKey, Regions region) {
-      return withAwsClientsProvider(awsAccessKey, awsSecretKey, region, null);
-    }
-
-    /**
-     * Can't pass ScanRequest object directly from client since this object is not full
-     * serializable.
-     */
-    public Read<T> withScanRequestFn(SerializableFunction<Void, ScanRequest> fn) {
-      return toBuilder().setScanRequestFn(fn).build();
-    }
-
-    private Read<T> withSegmentId(Integer segmentId) {
-      checkArgument(segmentId != null, "segmentId can not be null");
-      return toBuilder().setSegmentId(segmentId).build();
-    }
-
-    public Read<T> withScanResultMapperFn(SerializableFunction<ScanResult, T> scanResultMapperFn) {
-      checkArgument(scanResultMapperFn != null, "scanResultMapper can not be null");
-      return toBuilder().setScanResultMapperFn(scanResultMapperFn).build();
-    }
-
-    public Read<List<Map<String, AttributeValue>>> items() {
-      // safe cast as both mapper and coder are updated accordingly
-      Read<List<Map<String, AttributeValue>>> self = (Read<List<Map<String, AttributeValue>>>) this;
-      return self.withScanResultMapperFn(new DynamoDBIO.Read.ItemsMapper())
-          .withCoder(ListCoder.of(MapCoder.of(StringUtf8Coder.of(), AttributeValueCoder.of())));
-    }
-
-    public Read<T> withCoder(Coder<T> coder) {
-      checkArgument(coder != null, "coder can not be null");
-      return toBuilder().setCoder(coder).build();
-    }
-
-    @Override
-    public PCollection<T> expand(PBegin input) {
-      LoggerFactory.getLogger(DynamoDBIO.class)
-          .warn(
-              "You are using a deprecated IO for DynamoDB. Please migrate to module "
-                  + "'org.apache.beam:beam-sdks-java-io-amazon-web-services2'.");
-
-      checkArgument((getScanRequestFn() != null), "withScanRequestFn() is required");
-      checkArgument((getAwsClientsProvider() != null), "withAwsClientsProvider() is required");
-      ScanRequest scanRequest = getScanRequestFn().apply(null);
-      checkArgument(
-          (scanRequest.getTotalSegments() != null && scanRequest.getTotalSegments() > 0),
-          "TotalSegments is required with withScanRequestFn() and greater zero");
-
-      PCollection<Read<T>> splits =
-          input.apply("Create", Create.of(this)).apply("Split", ParDo.of(new SplitFn<>()));
-      splits.setCoder(SerializableCoder.of(new TypeDescriptor<Read<T>>() {}));
-
-      PCollection<T> output =
-          splits
-              .apply("Reshuffle", Reshuffle.viaRandomKey())
-              .apply("Read", ParDo.of(new ReadFn<>()));
-      output.setCoder(getCoder());
-      return output;
-    }
-
-    /** A {@link DoFn} to split {@link Read} elements by segment id. */
-    private static class SplitFn<T> extends DoFn<Read<T>, Read<T>> {
-      @ProcessElement
-      public void processElement(@Element Read<T> spec, OutputReceiver<Read<T>> out) {
-        ScanRequest scanRequest = spec.getScanRequestFn().apply(null);
-        for (int i = 0; i < scanRequest.getTotalSegments(); i++) {
-          out.output(spec.withSegmentId(i));
-        }
-      }
-    }
-
-    /** A {@link DoFn} executing the ScanRequest to read from DynamoDB. */
-    private static class ReadFn<T> extends DoFn<Read<T>, T> {
-      @ProcessElement
-      public void processElement(@Element Read<T> spec, OutputReceiver<T> out) {
-        AmazonDynamoDB client = spec.getAwsClientsProvider().createDynamoDB();
-        Map<String, AttributeValue> lastEvaluatedKey = null;
-
-        do {
-          ScanRequest scanRequest = spec.getScanRequestFn().apply(null);
-          scanRequest.setSegment(spec.getSegmentId());
-          if (lastEvaluatedKey != null) {
-            scanRequest.withExclusiveStartKey(lastEvaluatedKey);
-          }
-
-          ScanResult scanResult = client.scan(scanRequest);
-          out.output(spec.getScanResultMapperFn().apply(scanResult));
-          lastEvaluatedKey = scanResult.getLastEvaluatedKey();
-        } while (lastEvaluatedKey != null); // iterate until all records are fetched
-      }
-    }
-
-    static final class ItemsMapper
-        implements SerializableFunction<ScanResult, List<Map<String, AttributeValue>>> {
-      @Override
-      public List<Map<String, AttributeValue>> apply(@Nullable ScanResult scanResult) {
-        if (scanResult == null) {
-          return Collections.emptyList();
-        }
-        return scanResult.getItems();
-      }
-    }
-  }
-
-  /**
-   * A POJO encapsulating a configuration for retry behavior when issuing requests to DynamoDB. A
-   * retry will be attempted until the maxAttempts or maxDuration is exceeded, whichever comes
-   * first, for any of the following exceptions:
-   *
-   * <ul>
-   *   <li>{@link IOException}
-   * </ul>
-   */
-  @AutoValue
-  public abstract static class RetryConfiguration implements Serializable {
-    private static final Duration DEFAULT_INITIAL_DURATION = Duration.standardSeconds(5);
-
-    @VisibleForTesting
-    static final RetryPredicate DEFAULT_RETRY_PREDICATE = new DefaultRetryPredicate();
-
-    abstract int getMaxAttempts();
-
-    abstract Duration getMaxDuration();
-
-    abstract Duration getInitialDuration();
-
-    abstract DynamoDBIO.RetryConfiguration.RetryPredicate getRetryPredicate();
-
-    abstract DynamoDBIO.RetryConfiguration.Builder builder();
-
-    public static DynamoDBIO.RetryConfiguration create(int maxAttempts, Duration maxDuration) {
-      return create(maxAttempts, maxDuration, DEFAULT_INITIAL_DURATION);
-    }
-
-    static DynamoDBIO.RetryConfiguration create(
-        int maxAttempts, Duration maxDuration, Duration initialDuration) {
-      checkArgument(maxAttempts > 0, "maxAttempts should be greater than 0");
-      checkArgument(
-          maxDuration != null && maxDuration.isLongerThan(Duration.ZERO),
-          "maxDuration should be greater than 0");
-      checkArgument(
-          initialDuration != null && initialDuration.isLongerThan(Duration.ZERO),
-          "initialDuration should be greater than 0");
-
-      return new AutoValue_DynamoDBIO_RetryConfiguration.Builder()
-          .setMaxAttempts(maxAttempts)
-          .setMaxDuration(maxDuration)
-          .setInitialDuration(initialDuration)
-          .setRetryPredicate(DEFAULT_RETRY_PREDICATE)
-          .build();
-    }
-
-    @AutoValue.Builder
-    abstract static class Builder {
-      abstract DynamoDBIO.RetryConfiguration.Builder setMaxAttempts(int maxAttempts);
-
-      abstract DynamoDBIO.RetryConfiguration.Builder setMaxDuration(Duration maxDuration);
-
-      abstract DynamoDBIO.RetryConfiguration.Builder setInitialDuration(Duration initialDuration);
-
-      abstract DynamoDBIO.RetryConfiguration.Builder setRetryPredicate(
-          RetryPredicate retryPredicate);
-
-      abstract DynamoDBIO.RetryConfiguration build();
-    }
-
-    /**
-     * An interface used to control if we retry the BatchWriteItemRequest call when a {@link
-     * Throwable} occurs. If {@link RetryPredicate#test(Object)} returns true, {@link Write} tries
-     * to resend the requests to the DynamoDB server if the {@link RetryConfiguration} permits it.
-     */
-    @FunctionalInterface
-    interface RetryPredicate extends Predicate<Throwable>, Serializable {}
-
-    private static class DefaultRetryPredicate implements RetryPredicate {
-      private static final ImmutableSet<Integer> ELIGIBLE_CODES =
-          ImmutableSet.of(HttpStatus.SC_SERVICE_UNAVAILABLE);
-
-      @Override
-      public boolean test(Throwable throwable) {
-        return (throwable instanceof IOException
-            || (throwable instanceof AmazonDynamoDBException)
-            || (throwable instanceof AmazonDynamoDBException
-                && ELIGIBLE_CODES.contains(((AmazonDynamoDBException) throwable).getStatusCode())));
-      }
-    }
-  }
-
-  /** Write a PCollection<T> data into DynamoDB. */
-  @AutoValue
-  public abstract static class Write<T> extends PTransform<PCollection<T>, PCollection<Void>> {
-
-    abstract @Nullable AwsClientsProvider getAwsClientsProvider();
-
-    abstract @Nullable RetryConfiguration getRetryConfiguration();
-
-    abstract @Nullable SerializableFunction<T, KV<String, WriteRequest>> getWriteItemMapperFn();
-
-    abstract List<String> getDeduplicateKeys();
-
-    abstract Builder<T> builder();
-
-    @AutoValue.Builder
-    abstract static class Builder<T> {
-
-      abstract Builder<T> setAwsClientsProvider(AwsClientsProvider awsClientsProvider);
-
-      abstract Builder<T> setRetryConfiguration(RetryConfiguration retryConfiguration);
-
-      abstract Builder<T> setWriteItemMapperFn(
-          SerializableFunction<T, KV<String, WriteRequest>> writeItemMapperFn);
-
-      abstract Builder<T> setDeduplicateKeys(List<String> deduplicateKeys);
-
-      abstract Write<T> build();
-    }
-
-    public Write<T> withAwsClientsProvider(AwsClientsProvider awsClientsProvider) {
-      return builder().setAwsClientsProvider(awsClientsProvider).build();
-    }
-
-    public Write<T> withAwsClientsProvider(
-        String awsAccessKey, String awsSecretKey, Regions region, String serviceEndpoint) {
-      return withAwsClientsProvider(
-          new BasicDynamoDBProvider(awsAccessKey, awsSecretKey, region, serviceEndpoint));
-    }
-
-    public Write<T> withAwsClientsProvider(
-        String awsAccessKey, String awsSecretKey, Regions region) {
-      return withAwsClientsProvider(awsAccessKey, awsSecretKey, region, null);
-    }
-
-    /**
-     * Provides configuration to retry a failed request to publish a set of records to DynamoDB.
-     * Users should consider that retrying might compound the underlying problem which caused the
-     * initial failure. Users should also be aware that once retrying is exhausted the error is
-     * surfaced to the runner which <em>may</em> then opt to retry the current partition in entirety
-     * or abort if the max number of retries of the runner is completed. Retrying uses an
-     * exponential backoff algorithm, with minimum backoff of 5 seconds and then surfacing the error
-     * once the maximum number of retries or maximum configuration duration is exceeded.
-     *
-     * <p>Example use:
-     *
-     * <pre>{@code
-     * DynamoDBIO.write()
-     *   .withRetryConfiguration(DynamoDBIO.RetryConfiguration.create(5, Duration.standardMinutes(1))
-     *   ...
-     * }</pre>
-     *
-     * @param retryConfiguration the rules which govern the retry behavior
-     * @return the {@link DynamoDBIO.Write} with retrying configured
-     */
-    public Write<T> withRetryConfiguration(RetryConfiguration retryConfiguration) {
-      checkArgument(retryConfiguration != null, "retryConfiguration is required");
-      return builder().setRetryConfiguration(retryConfiguration).build();
-    }
-
-    public Write<T> withWriteRequestMapperFn(
-        SerializableFunction<T, KV<String, WriteRequest>> writeItemMapperFn) {
-      return builder().setWriteItemMapperFn(writeItemMapperFn).build();
-    }
-
-    public Write<T> withDeduplicateKeys(List<String> deduplicateKeys) {
-      return builder().setDeduplicateKeys(deduplicateKeys).build();
-    }
-
-    @Override
-    public PCollection<Void> expand(PCollection<T> input) {
-      LoggerFactory.getLogger(DynamoDBIO.class)
-          .warn(
-              "You are using a deprecated IO for DynamoDB. Please migrate to module "
-                  + "'org.apache.beam:beam-sdks-java-io-amazon-web-services2'.");
-
-      return input.apply(ParDo.of(new WriteFn<>(this)));
-    }
-
-    static class WriteFn<T> extends DoFn<T, Void> {
-      @VisibleForTesting
-      static final String RETRY_ERROR_LOG = "Error writing items to DynamoDB [attempts:{}]: {}";
-
-      private static final String RESUME_ERROR_LOG =
-          "Error writing remaining unprocessed items to DynamoDB: {}";
-
-      private static final String ERROR_NO_RETRY =
-          "Error writing to DynamoDB. No attempt made to retry";
-      private static final String ERROR_RETRIES_EXCEEDED =
-          "Error writing to DynamoDB after %d attempt(s). No more attempts allowed";
-      private static final String ERROR_UNPROCESSED_ITEMS =
-          "Error writing to DynamoDB. Unprocessed items remaining";
-
-      private transient FluentBackoff resumeBackoff; // resume from partial failures (unlimited)
-      private transient FluentBackoff retryBackoff; // retry erroneous calls (default: none)
-
-      private static final Logger LOG = LoggerFactory.getLogger(WriteFn.class);
-      private static final Counter DYNAMO_DB_WRITE_FAILURES =
-          Metrics.counter(WriteFn.class, "DynamoDB_Write_Failures");
-
-      private static final int BATCH_SIZE = 25;
-      private transient AmazonDynamoDB client;
-      private final DynamoDBIO.Write<T> spec;
-      private Map<KV<String, Map<String, AttributeValue>>, KV<String, WriteRequest>> batch;
-
-      WriteFn(DynamoDBIO.Write<T> spec) {
-        this.spec = spec;
-      }
-
-      @Setup
-      public void setup() {
-        client = spec.getAwsClientsProvider().createDynamoDB();
-        resumeBackoff = FluentBackoff.DEFAULT; // resume from partial failures (unlimited)
-        retryBackoff = FluentBackoff.DEFAULT.withMaxRetries(0); // retry on errors (default: none)
-
-        RetryConfiguration retryConfig = spec.getRetryConfiguration();
-        if (retryConfig != null) {
-          resumeBackoff = resumeBackoff.withInitialBackoff(retryConfig.getInitialDuration());
-          retryBackoff =
-              retryBackoff
-                  .withMaxRetries(retryConfig.getMaxAttempts() - 1)
-                  .withInitialBackoff(retryConfig.getInitialDuration())
-                  .withMaxCumulativeBackoff(retryConfig.getMaxDuration());
-        }
-      }
-
-      @StartBundle
-      public void startBundle(StartBundleContext context) {
-        batch = new HashMap<>();
-      }
-
-      @ProcessElement
-      public void processElement(ProcessContext context) throws Exception {
-        final KV<String, WriteRequest> writeRequest =
-            spec.getWriteItemMapperFn().apply(context.element());
-        batch.put(
-            KV.of(writeRequest.getKey(), extractDeduplicateKeyValues(writeRequest.getValue())),
-            writeRequest);
-        if (batch.size() >= BATCH_SIZE) {
-          flushBatch();
-        }
-      }
-
-      private Map<String, AttributeValue> extractDeduplicateKeyValues(WriteRequest request) {
-        List<String> deduplicationKeys = spec.getDeduplicateKeys();
-        Map<String, AttributeValue> attributes = Collections.emptyMap();
-
-        if (request.getPutRequest() != null) {
-          attributes = request.getPutRequest().getItem();
-        } else if (request.getDeleteRequest() != null) {
-          attributes = request.getDeleteRequest().getKey();
-        }
-
-        if (attributes.isEmpty() || deduplicationKeys.isEmpty()) {
-          return attributes;
-        }
-
-        return attributes.entrySet().stream()
-            .filter(entry -> deduplicationKeys.contains(entry.getKey()))
-            .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
-      }
-
-      @FinishBundle
-      public void finishBundle(FinishBundleContext context) throws Exception {
-        flushBatch();
-      }
-
-      private void flushBatch() throws IOException, InterruptedException {
-        if (batch.isEmpty()) {
-          return;
-        }
-        try {
-          // Group values KV<tableName, writeRequest> by tableName
-          // Note: The original order of arrival is lost reading the map entries.
-          Map<String, List<WriteRequest>> writesPerTable =
-              batch.values().stream()
-                  .collect(groupingBy(KV::getKey, mapping(KV::getValue, toList())));
-
-          // Backoff used to resume from partial failures
-          BackOff resume = resumeBackoff.backoff();
-          do {
-            BatchWriteItemRequest batchRequest = new BatchWriteItemRequest(writesPerTable);
-            // If unprocessed items remain, we have to resume the operation (with backoff)
-            writesPerTable = writeWithRetries(batchRequest).getUnprocessedItems();
-          } while (!writesPerTable.isEmpty() && BackOffUtils.next(Sleeper.DEFAULT, resume));
-
-          if (!writesPerTable.isEmpty()) {
-            DYNAMO_DB_WRITE_FAILURES.inc();
-            LOG.error(RESUME_ERROR_LOG, writesPerTable);
-            throw new IOException(ERROR_UNPROCESSED_ITEMS);
-          }
-        } finally {
-          batch.clear();
-        }
-      }
-
-      /**
-       * Write batch of items to DynamoDB and potentially retry in case of exceptions. Though, in
-       * case of a partial failure, unprocessed items remain but the request succeeds. This has to
-       * be handled by the caller.
-       */
-      private BatchWriteItemResult writeWithRetries(BatchWriteItemRequest request)
-          throws IOException, InterruptedException {
-        BackOff backoff = retryBackoff.backoff();
-        Exception lastThrown;
-
-        int attempt = 0;
-        do {
-          attempt++;
-          try {
-            return client.batchWriteItem(request);
-          } catch (Exception ex) {
-            lastThrown = ex;
-          }
-        } while (canRetry(lastThrown) && BackOffUtils.next(Sleeper.DEFAULT, backoff));
-
-        DYNAMO_DB_WRITE_FAILURES.inc();
-        LOG.warn(RETRY_ERROR_LOG, attempt, request.getRequestItems());
-        throw new IOException(
-            canRetry(lastThrown) ? String.format(ERROR_RETRIES_EXCEEDED, attempt) : ERROR_NO_RETRY,
-            lastThrown);
-      }
-
-      private boolean canRetry(Exception ex) {
-        return spec.getRetryConfiguration() != null
-            && spec.getRetryConfiguration().getRetryPredicate().test(ex);
-      }
-
-      @Teardown
-      public void tearDown() {
-        if (client != null) {
-          client.shutdown();
-          client = null;
-        }
-      }
-    }
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/dynamodb/package-info.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/dynamodb/package-info.java
deleted file mode 100644
index 0a7ea559fb9..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/dynamodb/package-info.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/** Defines IO connectors for Amazon Web Services DynamoDB. */
-package org.apache.beam.sdk.io.aws.dynamodb;
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/options/AwsModule.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/options/AwsModule.java
deleted file mode 100644
index 326758f1d1b..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/options/AwsModule.java
+++ /dev/null
@@ -1,390 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.options;
-
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkNotNull;
-
-import com.amazonaws.ClientConfiguration;
-import com.amazonaws.auth.AWSCredentials;
-import com.amazonaws.auth.AWSCredentialsProvider;
-import com.amazonaws.auth.AWSStaticCredentialsProvider;
-import com.amazonaws.auth.BasicAWSCredentials;
-import com.amazonaws.auth.BasicSessionCredentials;
-import com.amazonaws.auth.ClasspathPropertiesFileCredentialsProvider;
-import com.amazonaws.auth.DefaultAWSCredentialsProviderChain;
-import com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper;
-import com.amazonaws.auth.EnvironmentVariableCredentialsProvider;
-import com.amazonaws.auth.PropertiesFileCredentialsProvider;
-import com.amazonaws.auth.STSAssumeRoleSessionCredentialsProvider;
-import com.amazonaws.auth.SystemPropertiesCredentialsProvider;
-import com.amazonaws.auth.profile.ProfileCredentialsProvider;
-import com.amazonaws.services.s3.model.SSEAwsKeyManagementParams;
-import com.amazonaws.services.s3.model.SSECustomerKey;
-import com.fasterxml.jackson.annotation.JsonTypeInfo;
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.DeserializationContext;
-import com.fasterxml.jackson.databind.JsonDeserializer;
-import com.fasterxml.jackson.databind.JsonSerializer;
-import com.fasterxml.jackson.databind.Module;
-import com.fasterxml.jackson.databind.SerializerProvider;
-import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.jsontype.TypeDeserializer;
-import com.fasterxml.jackson.databind.jsontype.TypeSerializer;
-import com.fasterxml.jackson.databind.module.SimpleModule;
-import com.google.auto.service.AutoService;
-import java.io.IOException;
-import java.util.Map;
-import org.apache.beam.repackaged.core.org.apache.commons.lang3.reflect.FieldUtils;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableSet;
-
-/**
- * A Jackson {@link Module} that registers a {@link JsonSerializer} and {@link JsonDeserializer} for
- * {@link AWSCredentialsProvider} and some subclasses. The serialized form is a JSON map.
- *
- * <p>It also adds serializers for S3 encryption objects {@link SSECustomerKey} and {@link
- * SSEAwsKeyManagementParams}.
- */
-@AutoService(Module.class)
-public class AwsModule extends SimpleModule {
-
-  private static final String AWS_ACCESS_KEY_ID = "awsAccessKeyId";
-  private static final String AWS_SECRET_KEY = "awsSecretKey";
-  private static final String SESSION_TOKEN = "sessionToken";
-  private static final String CREDENTIALS_FILE_PATH = "credentialsFilePath";
-  public static final String CLIENT_EXECUTION_TIMEOUT = "clientExecutionTimeout";
-  public static final String CONNECTION_MAX_IDLE_TIME = "connectionMaxIdleTime";
-  public static final String CONNECTION_TIMEOUT = "connectionTimeout";
-  public static final String CONNECTION_TIME_TO_LIVE = "connectionTimeToLive";
-  public static final String MAX_CONNECTIONS = "maxConnections";
-  public static final String REQUEST_TIMEOUT = "requestTimeout";
-  public static final String SOCKET_TIMEOUT = "socketTimeout";
-  public static final String PROXY_HOST = "proxyHost";
-  public static final String PROXY_PORT = "proxyPort";
-  public static final String PROXY_USERNAME = "proxyUsername";
-  public static final String PROXY_PASSWORD = "proxyPassword";
-  private static final String ROLE_ARN = "roleArn";
-  private static final String ROLE_SESSION_NAME = "roleSessionName";
-
-  @SuppressWarnings({"nullness"})
-  public AwsModule() {
-    super("AwsModule");
-    setMixInAnnotation(AWSCredentialsProvider.class, AWSCredentialsProviderMixin.class);
-    setMixInAnnotation(SSECustomerKey.class, SSECustomerKeyMixin.class);
-    setMixInAnnotation(SSEAwsKeyManagementParams.class, SSEAwsKeyManagementParamsMixin.class);
-    setMixInAnnotation(ClientConfiguration.class, AwsHttpClientConfigurationMixin.class);
-  }
-
-  /** A mixin to add Jackson annotations to {@link AWSCredentialsProvider}. */
-  @JsonDeserialize(using = AWSCredentialsProviderDeserializer.class)
-  @JsonSerialize(using = AWSCredentialsProviderSerializer.class)
-  @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY)
-  private static class AWSCredentialsProviderMixin {}
-
-  private static class AWSCredentialsProviderDeserializer
-      extends JsonDeserializer<AWSCredentialsProvider> {
-
-    @Override
-    public AWSCredentialsProvider deserialize(JsonParser jsonParser, DeserializationContext context)
-        throws IOException {
-      return context.readValue(jsonParser, AWSCredentialsProvider.class);
-    }
-
-    @Override
-    public AWSCredentialsProvider deserializeWithType(
-        JsonParser jsonParser, DeserializationContext context, TypeDeserializer typeDeserializer)
-        throws IOException {
-      Map<String, String> asMap =
-          checkNotNull(
-              jsonParser.readValueAs(new TypeReference<Map<String, String>>() {}),
-              "Serialized AWS credentials provider is null");
-
-      String typeNameKey = typeDeserializer.getPropertyName();
-      String typeName = getNotNull(asMap, typeNameKey, "unknown");
-
-      if (hasName(AWSStaticCredentialsProvider.class, typeName)) {
-        boolean isSession = asMap.containsKey(SESSION_TOKEN);
-        if (isSession) {
-          return new AWSStaticCredentialsProvider(
-              new BasicSessionCredentials(
-                  getNotNull(asMap, AWS_ACCESS_KEY_ID, typeName),
-                  getNotNull(asMap, AWS_SECRET_KEY, typeName),
-                  getNotNull(asMap, SESSION_TOKEN, typeName)));
-        } else {
-          return new AWSStaticCredentialsProvider(
-              new BasicAWSCredentials(
-                  getNotNull(asMap, AWS_ACCESS_KEY_ID, typeName),
-                  getNotNull(asMap, AWS_SECRET_KEY, typeName)));
-        }
-      } else if (hasName(PropertiesFileCredentialsProvider.class, typeName)) {
-        return new PropertiesFileCredentialsProvider(
-            getNotNull(asMap, CREDENTIALS_FILE_PATH, typeName));
-      } else if (hasName(ClasspathPropertiesFileCredentialsProvider.class, typeName)) {
-        return new ClasspathPropertiesFileCredentialsProvider(
-            getNotNull(asMap, CREDENTIALS_FILE_PATH, typeName));
-      } else if (hasName(DefaultAWSCredentialsProviderChain.class, typeName)) {
-        return new DefaultAWSCredentialsProviderChain();
-      } else if (hasName(EnvironmentVariableCredentialsProvider.class, typeName)) {
-        return new EnvironmentVariableCredentialsProvider();
-      } else if (hasName(SystemPropertiesCredentialsProvider.class, typeName)) {
-        return new SystemPropertiesCredentialsProvider();
-      } else if (hasName(ProfileCredentialsProvider.class, typeName)) {
-        return new ProfileCredentialsProvider();
-      } else if (hasName(EC2ContainerCredentialsProviderWrapper.class, typeName)) {
-        return new EC2ContainerCredentialsProviderWrapper();
-      } else if (hasName(STSAssumeRoleSessionCredentialsProvider.class, typeName)) {
-        return new STSAssumeRoleSessionCredentialsProvider.Builder(
-                getNotNull(asMap, ROLE_ARN, typeName),
-                getNotNull(asMap, ROLE_SESSION_NAME, typeName))
-            .build();
-      } else {
-        throw new IOException(
-            String.format("AWS credential provider type '%s' is not supported", typeName));
-      }
-    }
-
-    @SuppressWarnings({"nullness"})
-    private String getNotNull(Map<String, String> map, String key, String typeName) {
-      return checkNotNull(
-          map.get(key), "AWS credentials provider type '%s' is missing '%s'", typeName, key);
-    }
-
-    private boolean hasName(Class<? extends AWSCredentialsProvider> clazz, String typeName) {
-      return clazz.getSimpleName().equals(typeName);
-    }
-  }
-
-  private static class AWSCredentialsProviderSerializer
-      extends JsonSerializer<AWSCredentialsProvider> {
-    // These providers are singletons, so don't require any serialization, other than type.
-    private static final ImmutableSet<Object> SINGLETON_CREDENTIAL_PROVIDERS =
-        ImmutableSet.of(
-            DefaultAWSCredentialsProviderChain.class,
-            EnvironmentVariableCredentialsProvider.class,
-            SystemPropertiesCredentialsProvider.class,
-            ProfileCredentialsProvider.class,
-            EC2ContainerCredentialsProviderWrapper.class);
-
-    @Override
-    public void serialize(
-        AWSCredentialsProvider credentialsProvider,
-        JsonGenerator jsonGenerator,
-        SerializerProvider serializers)
-        throws IOException {
-      serializers.defaultSerializeValue(credentialsProvider, jsonGenerator);
-    }
-
-    @Override
-    public void serializeWithType(
-        AWSCredentialsProvider credentialsProvider,
-        JsonGenerator jsonGenerator,
-        SerializerProvider serializers,
-        TypeSerializer typeSerializer)
-        throws IOException {
-      // BEAM-11958 Use deprecated Jackson APIs to be compatible with older versions of jackson
-      typeSerializer.writeTypePrefixForObject(credentialsProvider, jsonGenerator);
-
-      Class<?> providerClass = credentialsProvider.getClass();
-      if (providerClass.equals(AWSStaticCredentialsProvider.class)) {
-        AWSCredentials credentials = credentialsProvider.getCredentials();
-        if (credentials.getClass().equals(BasicSessionCredentials.class)) {
-          BasicSessionCredentials sessionCredentials = (BasicSessionCredentials) credentials;
-          jsonGenerator.writeStringField(AWS_ACCESS_KEY_ID, sessionCredentials.getAWSAccessKeyId());
-          jsonGenerator.writeStringField(AWS_SECRET_KEY, sessionCredentials.getAWSSecretKey());
-          jsonGenerator.writeStringField(SESSION_TOKEN, sessionCredentials.getSessionToken());
-        } else {
-          jsonGenerator.writeStringField(AWS_ACCESS_KEY_ID, credentials.getAWSAccessKeyId());
-          jsonGenerator.writeStringField(AWS_SECRET_KEY, credentials.getAWSSecretKey());
-        }
-      } else if (providerClass.equals(PropertiesFileCredentialsProvider.class)) {
-        String filePath = (String) readField(credentialsProvider, CREDENTIALS_FILE_PATH);
-        jsonGenerator.writeStringField(CREDENTIALS_FILE_PATH, filePath);
-      } else if (providerClass.equals(ClasspathPropertiesFileCredentialsProvider.class)) {
-        String filePath = (String) readField(credentialsProvider, CREDENTIALS_FILE_PATH);
-        jsonGenerator.writeStringField(CREDENTIALS_FILE_PATH, filePath);
-      } else if (providerClass.equals(STSAssumeRoleSessionCredentialsProvider.class)) {
-        String arn = (String) readField(credentialsProvider, ROLE_ARN);
-        String sessionName = (String) readField(credentialsProvider, ROLE_SESSION_NAME);
-        jsonGenerator.writeStringField(ROLE_ARN, arn);
-        jsonGenerator.writeStringField(ROLE_SESSION_NAME, sessionName);
-      } else if (!SINGLETON_CREDENTIAL_PROVIDERS.contains(providerClass)) {
-        throw new IllegalArgumentException(
-            "Unsupported AWS credentials provider type " + providerClass);
-      }
-      // BEAM-11958 Use deprecated Jackson APIs to be compatible with older versions of jackson
-      typeSerializer.writeTypeSuffixForObject(credentialsProvider, jsonGenerator);
-    }
-
-    private Object readField(AWSCredentialsProvider provider, String fieldName) throws IOException {
-      try {
-        return FieldUtils.readField(provider, fieldName, true);
-      } catch (IllegalArgumentException | IllegalAccessException e) {
-        throw new IOException(
-            String.format(
-                "Failed to access private field '%s' of AWS credential provider type '%s' with reflection",
-                fieldName, provider.getClass().getSimpleName()),
-            e);
-      }
-    }
-  }
-
-  @SuppressWarnings({"nullness"})
-  private static String getNotNull(Map<String, String> map, String key, Class<?> clazz) {
-    return checkNotNull(map.get(key), "`%s` required in serialized %s", key, clazz.getSimpleName());
-  }
-
-  /** A mixin to add Jackson annotations to {@link SSECustomerKey}. */
-  @JsonDeserialize(using = SSECustomerKeyDeserializer.class)
-  private static class SSECustomerKeyMixin {}
-
-  private static class SSECustomerKeyDeserializer extends JsonDeserializer<SSECustomerKey> {
-    @Override
-    public SSECustomerKey deserialize(JsonParser parser, DeserializationContext context)
-        throws IOException {
-      Map<String, String> asMap =
-          checkNotNull(
-              parser.readValueAs(new TypeReference<Map<String, String>>() {}),
-              "Serialized SSECustomerKey is null");
-
-      SSECustomerKey sseCustomerKey =
-          new SSECustomerKey(getNotNull(asMap, "key", SSECustomerKey.class));
-      final String algorithm = asMap.get("algorithm");
-      final String md5 = asMap.get("md5");
-      if (algorithm != null) {
-        sseCustomerKey.setAlgorithm(algorithm);
-      }
-      if (md5 != null) {
-        sseCustomerKey.setMd5(md5);
-      }
-      return sseCustomerKey;
-    }
-  }
-
-  /** A mixin to add Jackson annotations to {@link SSEAwsKeyManagementParams}. */
-  @JsonDeserialize(using = SSEAwsKeyManagementParamsDeserializer.class)
-  private static class SSEAwsKeyManagementParamsMixin {}
-
-  private static class SSEAwsKeyManagementParamsDeserializer
-      extends JsonDeserializer<SSEAwsKeyManagementParams> {
-    @Override
-    public SSEAwsKeyManagementParams deserialize(JsonParser parser, DeserializationContext context)
-        throws IOException {
-      Map<String, String> asMap =
-          checkNotNull(
-              parser.readValueAs(new TypeReference<Map<String, String>>() {}),
-              "Serialized SSEAwsKeyManagementParams is null");
-
-      return new SSEAwsKeyManagementParams(
-          getNotNull(asMap, "awsKmsKeyId", SSEAwsKeyManagementParams.class));
-    }
-  }
-
-  /** A mixin to add Jackson annotations to {@link ClientConfiguration}. */
-  @JsonSerialize(using = AwsHttpClientConfigurationSerializer.class)
-  @JsonDeserialize(using = AwsHttpClientConfigurationDeserializer.class)
-  private static class AwsHttpClientConfigurationMixin {}
-
-  private static class AwsHttpClientConfigurationDeserializer
-      extends JsonDeserializer<ClientConfiguration> {
-    @Override
-    public ClientConfiguration deserialize(JsonParser jsonParser, DeserializationContext context)
-        throws IOException {
-      Map<String, Object> map =
-          checkNotNull(
-              jsonParser.readValueAs(new TypeReference<Map<String, Object>>() {}),
-              "Serialized ClientConfiguration is null");
-
-      ClientConfiguration clientConfiguration = new ClientConfiguration();
-
-      if (map.containsKey(PROXY_HOST)) {
-        clientConfiguration.setProxyHost((String) map.get(PROXY_HOST));
-      }
-      if (map.containsKey(PROXY_PORT)) {
-        clientConfiguration.setProxyPort(((Number) map.get(PROXY_PORT)).intValue());
-      }
-      if (map.containsKey(PROXY_USERNAME)) {
-        clientConfiguration.setProxyUsername((String) map.get(PROXY_USERNAME));
-      }
-      if (map.containsKey(PROXY_PASSWORD)) {
-        clientConfiguration.setProxyPassword((String) map.get(PROXY_PASSWORD));
-      }
-      if (map.containsKey(CLIENT_EXECUTION_TIMEOUT)) {
-        clientConfiguration.setClientExecutionTimeout(
-            ((Number) map.get(CLIENT_EXECUTION_TIMEOUT)).intValue());
-      }
-      if (map.containsKey(CONNECTION_MAX_IDLE_TIME)) {
-        clientConfiguration.setConnectionMaxIdleMillis(
-            ((Number) map.get(CONNECTION_MAX_IDLE_TIME)).longValue());
-      }
-      if (map.containsKey(CONNECTION_TIMEOUT)) {
-        clientConfiguration.setConnectionTimeout(((Number) map.get(CONNECTION_TIMEOUT)).intValue());
-      }
-      if (map.containsKey(CONNECTION_TIME_TO_LIVE)) {
-        clientConfiguration.setConnectionTTL(
-            ((Number) map.get(CONNECTION_TIME_TO_LIVE)).longValue());
-      }
-      if (map.containsKey(MAX_CONNECTIONS)) {
-        clientConfiguration.setMaxConnections(((Number) map.get(MAX_CONNECTIONS)).intValue());
-      }
-      if (map.containsKey(REQUEST_TIMEOUT)) {
-        clientConfiguration.setRequestTimeout(((Number) map.get(REQUEST_TIMEOUT)).intValue());
-      }
-      if (map.containsKey(SOCKET_TIMEOUT)) {
-        clientConfiguration.setSocketTimeout(((Number) map.get(SOCKET_TIMEOUT)).intValue());
-      }
-      return clientConfiguration;
-    }
-  }
-
-  private static class AwsHttpClientConfigurationSerializer
-      extends JsonSerializer<ClientConfiguration> {
-
-    @Override
-    public void serialize(
-        ClientConfiguration clientConfiguration,
-        JsonGenerator jsonGenerator,
-        SerializerProvider serializer)
-        throws IOException {
-
-      jsonGenerator.writeStartObject();
-      jsonGenerator.writeObjectField(PROXY_HOST /*string*/, clientConfiguration.getProxyHost());
-      jsonGenerator.writeObjectField(PROXY_PORT /*int*/, clientConfiguration.getProxyPort());
-      jsonGenerator.writeObjectField(
-          PROXY_USERNAME /*string*/, clientConfiguration.getProxyUsername());
-      jsonGenerator.writeObjectField(
-          PROXY_PASSWORD /*string*/, clientConfiguration.getProxyPassword());
-      jsonGenerator.writeObjectField(
-          CLIENT_EXECUTION_TIMEOUT /*int*/, clientConfiguration.getClientExecutionTimeout());
-      jsonGenerator.writeObjectField(
-          CONNECTION_MAX_IDLE_TIME /*long*/, clientConfiguration.getConnectionMaxIdleMillis());
-      jsonGenerator.writeObjectField(
-          CONNECTION_TIMEOUT /*int*/, clientConfiguration.getConnectionTimeout());
-      jsonGenerator.writeObjectField(
-          CONNECTION_TIME_TO_LIVE /*long*/, clientConfiguration.getConnectionTTL());
-      jsonGenerator.writeObjectField(
-          MAX_CONNECTIONS /*int*/, clientConfiguration.getMaxConnections());
-      jsonGenerator.writeObjectField(
-          REQUEST_TIMEOUT /*int*/, clientConfiguration.getRequestTimeout());
-      jsonGenerator.writeObjectField(
-          SOCKET_TIMEOUT /*int*/, clientConfiguration.getSocketTimeout());
-      jsonGenerator.writeEndObject();
-    }
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/options/AwsOptions.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/options/AwsOptions.java
deleted file mode 100644
index 42e3a5614b0..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/options/AwsOptions.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.options;
-
-import com.amazonaws.ClientConfiguration;
-import com.amazonaws.SdkClientException;
-import com.amazonaws.auth.AWSCredentialsProvider;
-import com.amazonaws.auth.DefaultAWSCredentialsProviderChain;
-import com.amazonaws.regions.DefaultAwsRegionProviderChain;
-import org.apache.beam.sdk.options.Default;
-import org.apache.beam.sdk.options.DefaultValueFactory;
-import org.apache.beam.sdk.options.Description;
-import org.apache.beam.sdk.options.PipelineOptions;
-import org.checkerframework.checker.nullness.qual.Nullable;
-
-/**
- * Options used to configure Amazon Web Services specific options such as credentials and region.
- */
-public interface AwsOptions extends PipelineOptions {
-
-  /** AWS region used by the AWS client. */
-  @Description("AWS region used by the AWS client")
-  @Default.InstanceFactory(AwsRegionFactory.class)
-  String getAwsRegion();
-
-  void setAwsRegion(String value);
-
-  /** Attempt to load default region. */
-  class AwsRegionFactory implements DefaultValueFactory<@Nullable String> {
-    @Override
-    @Nullable
-    public String create(PipelineOptions options) {
-      try {
-        return new DefaultAwsRegionProviderChain().getRegion();
-      } catch (SdkClientException e) {
-        return null;
-      }
-    }
-  }
-
-  /** The AWS service endpoint used by the AWS client. */
-  @Description("AWS service endpoint used by the AWS client")
-  String getAwsServiceEndpoint();
-
-  void setAwsServiceEndpoint(String value);
-
-  /**
-   * The credential instance that should be used to authenticate against AWS services. The option
-   * value must contain a "@type" field and an AWS Credentials Provider class as the field value.
-   * Refer to {@link DefaultAWSCredentialsProviderChain} Javadoc for usage help.
-   *
-   * <p>For example, to specify the AWS key ID and secret, specify the following: <code>
-   * {"@type" : "AWSStaticCredentialsProvider", "awsAccessKeyId" : "key_id_value",
-   * "awsSecretKey" : "secret_value"}
-   * </code>
-   */
-  @Description(
-      "The credential instance that should be used to authenticate "
-          + "against AWS services. The option value must contain \"@type\" field "
-          + "and an AWS Credentials Provider class name as the field value. "
-          + "Refer to DefaultAWSCredentialsProviderChain Javadoc for usage help. "
-          + "For example, to specify the AWS key ID and secret, specify the following: "
-          + "{\"@type\": \"AWSStaticCredentialsProvider\", "
-          + "\"awsAccessKeyId\":\"<key_id>\", \"awsSecretKey\":\"<secret_key>\"}")
-  @Default.InstanceFactory(AwsUserCredentialsFactory.class)
-  AWSCredentialsProvider getAwsCredentialsProvider();
-
-  void setAwsCredentialsProvider(AWSCredentialsProvider value);
-
-  /** Attempts to load AWS credentials. */
-  class AwsUserCredentialsFactory implements DefaultValueFactory<AWSCredentialsProvider> {
-
-    @Override
-    public AWSCredentialsProvider create(PipelineOptions options) {
-      return DefaultAWSCredentialsProviderChain.getInstance();
-    }
-  }
-
-  /**
-   * The client configuration instance that should be used to configure AWS service clients. Please
-   * note that the configuration deserialization only allows one to specify proxy settings. Please
-   * use AwsHttpClientConfiguration's client configuration to set a wider range of options.
-   *
-   * <p>For example, to specify the proxy host, port, username and password, specify the following:
-   * <code>
-   * --clientConfiguration={
-   *   "proxyHost":"hostname",
-   *   "proxyPort":1234,
-   *   "proxyUsername":"username",
-   *   "proxyPassword":"password"
-   * }
-   * </code>
-   *
-   * @return
-   */
-  @Description(
-      "The client configuration instance that should be used to configure AWS service "
-          + "clients. Please note that the configuration deserialization only allows one to specify "
-          + "proxy settings. For example, to specify the proxy host, port, username and password, "
-          + "specify the following: --clientConfiguration={\"proxyHost\":\"hostname\",\"proxyPort\":1234,"
-          + "\"proxyUsername\":\"username\",\"proxyPassword\":\"password\"}")
-  @Default.InstanceFactory(ClientConfigurationFactory.class)
-  ClientConfiguration getClientConfiguration();
-
-  void setClientConfiguration(ClientConfiguration clientConfiguration);
-
-  /** Default AWS client configuration. */
-  class ClientConfigurationFactory implements DefaultValueFactory<ClientConfiguration> {
-
-    @Override
-    public ClientConfiguration create(PipelineOptions options) {
-      return new ClientConfiguration();
-    }
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/options/AwsPipelineOptionsRegistrar.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/options/AwsPipelineOptionsRegistrar.java
deleted file mode 100644
index 3dad9fd611c..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/options/AwsPipelineOptionsRegistrar.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.options;
-
-import com.google.auto.service.AutoService;
-import org.apache.beam.sdk.options.PipelineOptions;
-import org.apache.beam.sdk.options.PipelineOptionsRegistrar;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableList;
-
-/** A registrar containing the default AWS options. */
-@AutoService(PipelineOptionsRegistrar.class)
-public class AwsPipelineOptionsRegistrar implements PipelineOptionsRegistrar {
-
-  @Override
-  public Iterable<Class<? extends PipelineOptions>> getPipelineOptions() {
-    return ImmutableList.<Class<? extends PipelineOptions>>builder()
-        .add(AwsOptions.class)
-        .add(S3Options.class)
-        .build();
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/options/S3ClientBuilderFactory.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/options/S3ClientBuilderFactory.java
deleted file mode 100644
index ce6eaa57cd8..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/options/S3ClientBuilderFactory.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.options;
-
-import com.amazonaws.services.s3.AmazonS3ClientBuilder;
-
-/** Construct AmazonS3ClientBuilder from S3 pipeline options. */
-public interface S3ClientBuilderFactory {
-  AmazonS3ClientBuilder createBuilder(S3Options s3Options);
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/options/S3Options.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/options/S3Options.java
deleted file mode 100644
index e9979b5c99e..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/options/S3Options.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.options;
-
-import com.amazonaws.services.s3.model.SSEAwsKeyManagementParams;
-import com.amazonaws.services.s3.model.SSECustomerKey;
-import org.apache.beam.sdk.io.aws.s3.DefaultS3ClientBuilderFactory;
-import org.apache.beam.sdk.options.Default;
-import org.apache.beam.sdk.options.DefaultValueFactory;
-import org.apache.beam.sdk.options.Description;
-import org.apache.beam.sdk.options.PipelineOptions;
-import org.checkerframework.checker.nullness.qual.Nullable;
-
-/** Options used to configure Amazon Web Services S3. */
-public interface S3Options extends AwsOptions {
-
-  @Description("AWS S3 storage class used for creating S3 objects")
-  @Default.String("STANDARD")
-  String getS3StorageClass();
-
-  void setS3StorageClass(String value);
-
-  @Description(
-      "Size of S3 upload chunks; max upload object size is this value multiplied by 10000;"
-          + "default is 64MB, or 5MB in memory-constrained environments. Must be at least 5MB.")
-  @Default.InstanceFactory(S3UploadBufferSizeBytesFactory.class)
-  Integer getS3UploadBufferSizeBytes();
-
-  void setS3UploadBufferSizeBytes(Integer value);
-
-  @Description("Thread pool size, limiting max concurrent S3 operations")
-  @Default.Integer(50)
-  int getS3ThreadPoolSize();
-
-  void setS3ThreadPoolSize(int value);
-
-  @Description("Algorithm for SSE-S3 encryption, e.g. AES256.")
-  @Nullable
-  String getSSEAlgorithm();
-
-  void setSSEAlgorithm(String value);
-
-  @Description(
-      "SSE key for SSE-C encryption, e.g. a base64 encoded key and the algorithm."
-          + "To specify on the command-line, represent the value as a JSON object. For example:"
-          + " --SSECustomerKey={\"key\": \"86glyTlCN...\", \"algorithm\": \"AES256\"}")
-  @Nullable
-  SSECustomerKey getSSECustomerKey();
-
-  void setSSECustomerKey(SSECustomerKey value);
-
-  @Description(
-      "KMS key id for SSE-KMS encryption, e.g. \"arn:aws:kms:...\"."
-          + "To specify on the command-line, represent the value as a JSON object. For example:"
-          + " --SSEAwsKeyManagementParams={\"awsKmsKeyId\": \"arn:aws:kms:...\"}")
-  @Nullable
-  SSEAwsKeyManagementParams getSSEAwsKeyManagementParams();
-
-  void setSSEAwsKeyManagementParams(SSEAwsKeyManagementParams value);
-
-  @Description(
-      "Set to true to use an S3 Bucket Key for object encryption with server-side "
-          + "encryption using AWS KMS (SSE-KMS)")
-  @Default.Boolean(false)
-  boolean getBucketKeyEnabled();
-
-  void setBucketKeyEnabled(boolean value);
-
-  @Description(
-      "Factory class that should be created and used to create a builder of AmazonS3 client."
-          + "Override the default value if you need a S3 client with custom properties, like path style access, etc.")
-  @Default.Class(DefaultS3ClientBuilderFactory.class)
-  Class<? extends S3ClientBuilderFactory> getS3ClientFactoryClass();
-
-  void setS3ClientFactoryClass(Class<? extends S3ClientBuilderFactory> s3ClientFactoryClass);
-
-  /**
-   * Provide the default s3 upload buffer size in bytes: 64MB if more than 512MB in RAM are
-   * available and 5MB otherwise.
-   */
-  class S3UploadBufferSizeBytesFactory implements DefaultValueFactory<Integer> {
-    public static final int MINIMUM_UPLOAD_BUFFER_SIZE_BYTES = 5_242_880;
-
-    @Override
-    public Integer create(PipelineOptions options) {
-      return Runtime.getRuntime().maxMemory() < 536_870_912
-          ? MINIMUM_UPLOAD_BUFFER_SIZE_BYTES
-          : 67_108_864;
-    }
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/options/package-info.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/options/package-info.java
deleted file mode 100644
index fc79c546706..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/options/package-info.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/**
- * Defines {@link org.apache.beam.sdk.options.PipelineOptions} for configuring pipeline execution
- * for Amazon Web Services components.
- */
-package org.apache.beam.sdk.io.aws.options;
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/DefaultS3ClientBuilderFactory.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/DefaultS3ClientBuilderFactory.java
deleted file mode 100644
index fa96d79b63a..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/DefaultS3ClientBuilderFactory.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.s3;
-
-import com.amazonaws.client.builder.AwsClientBuilder;
-import com.amazonaws.services.s3.AmazonS3ClientBuilder;
-import org.apache.beam.sdk.io.aws.options.S3ClientBuilderFactory;
-import org.apache.beam.sdk.io.aws.options.S3Options;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Strings;
-
-/**
- * Construct AmazonS3ClientBuilder with default values of S3 client properties like path style
- * access, accelerated mode, etc.
- */
-public class DefaultS3ClientBuilderFactory implements S3ClientBuilderFactory {
-
-  @Override
-  public AmazonS3ClientBuilder createBuilder(S3Options s3Options) {
-    AmazonS3ClientBuilder builder =
-        AmazonS3ClientBuilder.standard().withCredentials(s3Options.getAwsCredentialsProvider());
-
-    if (s3Options.getClientConfiguration() != null) {
-      builder = builder.withClientConfiguration(s3Options.getClientConfiguration());
-    }
-
-    if (!Strings.isNullOrEmpty(s3Options.getAwsServiceEndpoint())) {
-      builder =
-          builder.withEndpointConfiguration(
-              new AwsClientBuilder.EndpointConfiguration(
-                  s3Options.getAwsServiceEndpoint(), s3Options.getAwsRegion()));
-    } else if (!Strings.isNullOrEmpty(s3Options.getAwsRegion())) {
-      builder = builder.withRegion(s3Options.getAwsRegion());
-    }
-    return builder;
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/DefaultS3FileSystemSchemeRegistrar.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/DefaultS3FileSystemSchemeRegistrar.java
deleted file mode 100644
index 0988309cb0e..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/DefaultS3FileSystemSchemeRegistrar.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.s3;
-
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkNotNull;
-
-import com.google.auto.service.AutoService;
-import javax.annotation.Nonnull;
-import org.apache.beam.sdk.io.aws.options.S3Options;
-import org.apache.beam.sdk.options.PipelineOptions;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableList;
-
-/** Registers the "s3" uri schema to be handled by {@link S3FileSystem}. */
-@AutoService(S3FileSystemSchemeRegistrar.class)
-public class DefaultS3FileSystemSchemeRegistrar implements S3FileSystemSchemeRegistrar {
-
-  @Override
-  public Iterable<S3FileSystemConfiguration> fromOptions(@Nonnull PipelineOptions options) {
-    checkNotNull(options, "Expect the runner have called FileSystems.setDefaultPipelineOptions().");
-    return ImmutableList.of(
-        S3FileSystemConfiguration.fromS3Options(options.as(S3Options.class)).build());
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/S3FileSystem.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/S3FileSystem.java
deleted file mode 100644
index 75d66c46478..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/S3FileSystem.java
+++ /dev/null
@@ -1,671 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.s3;
-
-import static org.apache.beam.sdk.io.FileSystemUtils.wildcardToRegexp;
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkArgument;
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkNotNull;
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkState;
-
-import com.amazonaws.AmazonClientException;
-import com.amazonaws.services.s3.AmazonS3;
-import com.amazonaws.services.s3.model.AmazonS3Exception;
-import com.amazonaws.services.s3.model.CompleteMultipartUploadRequest;
-import com.amazonaws.services.s3.model.CompleteMultipartUploadResult;
-import com.amazonaws.services.s3.model.CopyObjectRequest;
-import com.amazonaws.services.s3.model.CopyObjectResult;
-import com.amazonaws.services.s3.model.CopyPartRequest;
-import com.amazonaws.services.s3.model.CopyPartResult;
-import com.amazonaws.services.s3.model.DeleteObjectsRequest;
-import com.amazonaws.services.s3.model.DeleteObjectsRequest.KeyVersion;
-import com.amazonaws.services.s3.model.GetObjectMetadataRequest;
-import com.amazonaws.services.s3.model.InitiateMultipartUploadRequest;
-import com.amazonaws.services.s3.model.InitiateMultipartUploadResult;
-import com.amazonaws.services.s3.model.ListObjectsV2Request;
-import com.amazonaws.services.s3.model.ListObjectsV2Result;
-import com.amazonaws.services.s3.model.ObjectMetadata;
-import com.amazonaws.services.s3.model.PartETag;
-import com.amazonaws.services.s3.model.S3ObjectSummary;
-import com.google.auto.value.AutoValue;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.nio.channels.ReadableByteChannel;
-import java.nio.channels.WritableByteChannel;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.Callable;
-import java.util.concurrent.CompletionStage;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.regex.Pattern;
-import java.util.stream.Collectors;
-import org.apache.beam.sdk.io.FileSystem;
-import org.apache.beam.sdk.io.aws.options.S3Options;
-import org.apache.beam.sdk.io.fs.CreateOptions;
-import org.apache.beam.sdk.io.fs.MatchResult;
-import org.apache.beam.sdk.io.fs.MoveOptions;
-import org.apache.beam.sdk.metrics.Lineage;
-import org.apache.beam.sdk.util.MoreFutures;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.annotations.VisibleForTesting;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Strings;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Supplier;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Suppliers;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ArrayListMultimap;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableList;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableSet;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.Iterables;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.Multimap;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.util.concurrent.ListeningExecutorService;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.util.concurrent.MoreExecutors;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.util.concurrent.ThreadFactoryBuilder;
-import org.checkerframework.checker.nullness.qual.Nullable;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * {@link FileSystem} implementation for storage systems that use the S3 protocol.
- *
- * @see S3FileSystemSchemeRegistrar
- * @deprecated Module <code>beam-sdks-java-io-amazon-web-services</code> is deprecated and will be
- *     eventually removed. Please migrate to module <code>beam-sdks-java-io-amazon-web-services2
- *     </code>.
- */
-@Deprecated
-@SuppressWarnings({
-  "nullness" // TODO(https://github.com/apache/beam/issues/20497)
-})
-class S3FileSystem extends FileSystem<S3ResourceId> {
-
-  private static final Logger LOG = LoggerFactory.getLogger(S3FileSystem.class);
-
-  // Amazon S3 API: You can create a copy of your object up to 5 GB in a single atomic operation
-  // Ref. https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html
-  private static final long MAX_COPY_OBJECT_SIZE_BYTES = 5_368_709_120L;
-
-  // S3 API, delete-objects: "You may specify up to 1000 keys."
-  private static final int MAX_DELETE_OBJECTS_PER_REQUEST = 1000;
-
-  private static final ImmutableSet<String> NON_READ_SEEK_EFFICIENT_ENCODINGS =
-      ImmutableSet.of("gzip");
-
-  // Non-final for testing.
-  private Supplier<AmazonS3> amazonS3;
-  private final S3FileSystemConfiguration config;
-  private final ListeningExecutorService executorService;
-
-  S3FileSystem(S3FileSystemConfiguration config) {
-    this.config = checkNotNull(config, "config");
-    // The Supplier is to make sure we don't call .build() unless we are actually using S3.
-    amazonS3 = Suppliers.memoize(config.getS3ClientBuilder()::build);
-
-    checkNotNull(config.getS3StorageClass(), "storageClass");
-    checkArgument(config.getS3ThreadPoolSize() > 0, "threadPoolSize");
-    executorService =
-        MoreExecutors.listeningDecorator(
-            Executors.newFixedThreadPool(
-                config.getS3ThreadPoolSize(), new ThreadFactoryBuilder().setDaemon(true).build()));
-
-    LOG.warn(
-        "You are using a deprecated file system for S3. Please migrate to module "
-            + "'org.apache.beam:beam-sdks-java-io-amazon-web-services2'.");
-  }
-
-  S3FileSystem(S3Options options) {
-    this(S3FileSystemConfiguration.fromS3Options(options).build());
-  }
-
-  @Override
-  protected String getScheme() {
-    return config.getScheme();
-  }
-
-  @VisibleForTesting
-  void setAmazonS3Client(AmazonS3 amazonS3) {
-    this.amazonS3 = Suppliers.ofInstance(amazonS3);
-  }
-
-  @VisibleForTesting
-  AmazonS3 getAmazonS3Client() {
-    return this.amazonS3.get();
-  }
-
-  @Override
-  protected List<MatchResult> match(List<String> specs) throws IOException {
-    List<S3ResourceId> paths =
-        specs.stream().map(S3ResourceId::fromUri).collect(Collectors.toList());
-    List<S3ResourceId> globs = new ArrayList<>();
-    List<S3ResourceId> nonGlobs = new ArrayList<>();
-    List<Boolean> isGlobBooleans = new ArrayList<>();
-
-    for (S3ResourceId path : paths) {
-      if (path.isWildcard()) {
-        globs.add(path);
-        isGlobBooleans.add(true);
-      } else {
-        nonGlobs.add(path);
-        isGlobBooleans.add(false);
-      }
-    }
-
-    Iterator<MatchResult> globMatches = matchGlobPaths(globs).iterator();
-    Iterator<MatchResult> nonGlobMatches = matchNonGlobPaths(nonGlobs).iterator();
-
-    ImmutableList.Builder<MatchResult> matchResults = ImmutableList.builder();
-    for (Boolean isGlob : isGlobBooleans) {
-      if (isGlob) {
-        checkState(
-            globMatches.hasNext(),
-            "Internal error encountered in S3Filesystem: expected more elements in globMatches.");
-        matchResults.add(globMatches.next());
-      } else {
-        checkState(
-            nonGlobMatches.hasNext(),
-            "Internal error encountered in S3Filesystem: expected more elements in nonGlobMatches.");
-        matchResults.add(nonGlobMatches.next());
-      }
-    }
-    checkState(
-        !globMatches.hasNext(),
-        "Internal error encountered in S3Filesystem: expected no more elements in globMatches.");
-    checkState(
-        !nonGlobMatches.hasNext(),
-        "Internal error encountered in S3Filesystem: expected no more elements in nonGlobMatches.");
-
-    return matchResults.build();
-  }
-
-  /** Gets {@link MatchResult} representing all objects that match wildcard-containing paths. */
-  @VisibleForTesting
-  List<MatchResult> matchGlobPaths(Collection<S3ResourceId> globPaths) throws IOException {
-    List<Callable<ExpandedGlob>> expandTasks = new ArrayList<>(globPaths.size());
-    for (final S3ResourceId path : globPaths) {
-      expandTasks.add(() -> expandGlob(path));
-    }
-
-    Map<S3ResourceId, ExpandedGlob> expandedGlobByGlobPath = new HashMap<>();
-    List<Callable<PathWithEncoding>> contentTypeTasks = new ArrayList<>(globPaths.size());
-    for (ExpandedGlob expandedGlob : callTasks(expandTasks)) {
-      expandedGlobByGlobPath.put(expandedGlob.getGlobPath(), expandedGlob);
-      if (expandedGlob.getExpandedPaths() != null) {
-        for (final S3ResourceId path : expandedGlob.getExpandedPaths()) {
-          contentTypeTasks.add(() -> getPathContentEncoding(path));
-        }
-      }
-    }
-
-    Map<S3ResourceId, PathWithEncoding> exceptionByPath = new HashMap<>();
-    for (PathWithEncoding pathWithException : callTasks(contentTypeTasks)) {
-      exceptionByPath.put(pathWithException.getPath(), pathWithException);
-    }
-
-    List<MatchResult> results = new ArrayList<>(globPaths.size());
-    for (S3ResourceId globPath : globPaths) {
-      ExpandedGlob expandedGlob = expandedGlobByGlobPath.get(globPath);
-
-      if (expandedGlob.getException() != null) {
-        results.add(MatchResult.create(MatchResult.Status.ERROR, expandedGlob.getException()));
-
-      } else {
-        List<MatchResult.Metadata> metadatas = new ArrayList<>();
-        IOException exception = null;
-        for (S3ResourceId expandedPath : expandedGlob.getExpandedPaths()) {
-          PathWithEncoding pathWithEncoding = exceptionByPath.get(expandedPath);
-
-          if (pathWithEncoding.getException() != null) {
-            exception = pathWithEncoding.getException();
-            break;
-          } else {
-            // TODO(https://github.com/apache/beam/issues/20755): Support file checksum in this
-            // method.
-            metadatas.add(
-                createBeamMetadata(
-                    pathWithEncoding.getPath(), pathWithEncoding.getContentEncoding(), null));
-          }
-        }
-
-        if (exception != null) {
-          if (exception instanceof FileNotFoundException) {
-            results.add(MatchResult.create(MatchResult.Status.NOT_FOUND, exception));
-          } else {
-            results.add(MatchResult.create(MatchResult.Status.ERROR, exception));
-          }
-        } else {
-          results.add(MatchResult.create(MatchResult.Status.OK, metadatas));
-        }
-      }
-    }
-
-    return ImmutableList.copyOf(results);
-  }
-
-  @AutoValue
-  abstract static class ExpandedGlob {
-
-    abstract S3ResourceId getGlobPath();
-
-    abstract @Nullable List<S3ResourceId> getExpandedPaths();
-
-    abstract @Nullable IOException getException();
-
-    static ExpandedGlob create(S3ResourceId globPath, List<S3ResourceId> expandedPaths) {
-      checkNotNull(globPath, "globPath");
-      checkNotNull(expandedPaths, "expandedPaths");
-      return new AutoValue_S3FileSystem_ExpandedGlob(globPath, expandedPaths, null);
-    }
-
-    static ExpandedGlob create(S3ResourceId globPath, IOException exception) {
-      checkNotNull(globPath, "globPath");
-      checkNotNull(exception, "exception");
-      return new AutoValue_S3FileSystem_ExpandedGlob(globPath, null, exception);
-    }
-  }
-
-  @AutoValue
-  abstract static class PathWithEncoding {
-
-    abstract S3ResourceId getPath();
-
-    abstract @Nullable String getContentEncoding();
-
-    abstract @Nullable IOException getException();
-
-    static PathWithEncoding create(S3ResourceId path, String contentEncoding) {
-      checkNotNull(path, "path");
-      checkNotNull(contentEncoding, "contentEncoding");
-      return new AutoValue_S3FileSystem_PathWithEncoding(path, contentEncoding, null);
-    }
-
-    static PathWithEncoding create(S3ResourceId path, IOException exception) {
-      checkNotNull(path, "path");
-      checkNotNull(exception, "exception");
-      return new AutoValue_S3FileSystem_PathWithEncoding(path, null, exception);
-    }
-  }
-
-  private ExpandedGlob expandGlob(S3ResourceId glob) {
-    // The S3 API can list objects, filtered by prefix, but not by wildcard.
-    // Here, we find the longest prefix without wildcard "*",
-    // then filter the results with a regex.
-    checkArgument(glob.isWildcard(), "isWildcard");
-    String keyPrefix = glob.getKeyNonWildcardPrefix();
-    Pattern wildcardRegexp = Pattern.compile(wildcardToRegexp(glob.getKey()));
-
-    LOG.debug(
-        "expanding bucket {}, prefix {}, against pattern {}",
-        glob.getBucket(),
-        keyPrefix,
-        wildcardRegexp.toString());
-
-    ImmutableList.Builder<S3ResourceId> expandedPaths = ImmutableList.builder();
-    String continuationToken = null;
-
-    do {
-      ListObjectsV2Request request =
-          new ListObjectsV2Request()
-              .withBucketName(glob.getBucket())
-              .withPrefix(keyPrefix)
-              .withContinuationToken(continuationToken);
-      ListObjectsV2Result result;
-      try {
-        result = amazonS3.get().listObjectsV2(request);
-      } catch (AmazonClientException e) {
-        return ExpandedGlob.create(glob, new IOException(e));
-      }
-      continuationToken = result.getNextContinuationToken();
-
-      for (S3ObjectSummary objectSummary : result.getObjectSummaries()) {
-        // Filter against regex.
-        if (wildcardRegexp.matcher(objectSummary.getKey()).matches()) {
-          S3ResourceId expandedPath =
-              S3ResourceId.fromComponents(
-                      glob.getScheme(), objectSummary.getBucketName(), objectSummary.getKey())
-                  .withSize(objectSummary.getSize())
-                  .withLastModified(objectSummary.getLastModified());
-          LOG.debug("Expanded S3 object path {}", expandedPath);
-          expandedPaths.add(expandedPath);
-        }
-      }
-    } while (continuationToken != null);
-
-    return ExpandedGlob.create(glob, expandedPaths.build());
-  }
-
-  private PathWithEncoding getPathContentEncoding(S3ResourceId path) {
-    ObjectMetadata s3Metadata;
-    try {
-      s3Metadata = getObjectMetadata(path);
-    } catch (AmazonClientException e) {
-      if (e instanceof AmazonS3Exception && ((AmazonS3Exception) e).getStatusCode() == 404) {
-        return PathWithEncoding.create(path, new FileNotFoundException());
-      }
-      return PathWithEncoding.create(path, new IOException(e));
-    }
-    return PathWithEncoding.create(path, Strings.nullToEmpty(s3Metadata.getContentEncoding()));
-  }
-
-  private List<MatchResult> matchNonGlobPaths(Collection<S3ResourceId> paths) throws IOException {
-    List<Callable<MatchResult>> tasks = new ArrayList<>(paths.size());
-    for (final S3ResourceId path : paths) {
-      tasks.add(() -> matchNonGlobPath(path));
-    }
-
-    return callTasks(tasks);
-  }
-
-  private ObjectMetadata getObjectMetadata(S3ResourceId s3ResourceId) throws AmazonClientException {
-    GetObjectMetadataRequest request =
-        new GetObjectMetadataRequest(s3ResourceId.getBucket(), s3ResourceId.getKey());
-    request.setSSECustomerKey(config.getSSECustomerKey());
-    return amazonS3.get().getObjectMetadata(request);
-  }
-
-  @VisibleForTesting
-  MatchResult matchNonGlobPath(S3ResourceId path) {
-    ObjectMetadata s3Metadata;
-    try {
-      s3Metadata = getObjectMetadata(path);
-    } catch (AmazonClientException e) {
-      if (e instanceof AmazonS3Exception && ((AmazonS3Exception) e).getStatusCode() == 404) {
-        return MatchResult.create(MatchResult.Status.NOT_FOUND, new FileNotFoundException());
-      }
-      return MatchResult.create(MatchResult.Status.ERROR, new IOException(e));
-    }
-
-    return MatchResult.create(
-        MatchResult.Status.OK,
-        ImmutableList.of(
-            createBeamMetadata(
-                path.withSize(s3Metadata.getContentLength())
-                    .withLastModified(s3Metadata.getLastModified()),
-                Strings.nullToEmpty(s3Metadata.getContentEncoding()),
-                s3Metadata.getETag())));
-  }
-
-  private static MatchResult.Metadata createBeamMetadata(
-      S3ResourceId path, String contentEncoding, String eTag) {
-    checkArgument(path.getSize().isPresent(), "The resource id should have a size.");
-    checkNotNull(contentEncoding, "contentEncoding");
-    boolean isReadSeekEfficient = !NON_READ_SEEK_EFFICIENT_ENCODINGS.contains(contentEncoding);
-
-    MatchResult.Metadata.Builder ret =
-        MatchResult.Metadata.builder()
-            .setIsReadSeekEfficient(isReadSeekEfficient)
-            .setResourceId(path)
-            .setSizeBytes(path.getSize().get())
-            .setLastModifiedMillis(path.getLastModified().transform(Date::getTime).or(0L));
-    if (eTag != null) {
-      ret.setChecksum(eTag);
-    }
-    return ret.build();
-  }
-
-  @Override
-  protected WritableByteChannel create(S3ResourceId resourceId, CreateOptions createOptions)
-      throws IOException {
-    return new S3WritableByteChannel(amazonS3.get(), resourceId, createOptions.mimeType(), config);
-  }
-
-  @Override
-  protected ReadableByteChannel open(S3ResourceId resourceId) throws IOException {
-    return new S3ReadableSeekableByteChannel(amazonS3.get(), resourceId, config);
-  }
-
-  @Override
-  protected void copy(List<S3ResourceId> sourcePaths, List<S3ResourceId> destinationPaths)
-      throws IOException {
-    checkArgument(
-        sourcePaths.size() == destinationPaths.size(),
-        "sizes of sourcePaths and destinationPaths do not match");
-
-    List<Callable<Void>> tasks = new ArrayList<>(sourcePaths.size());
-
-    Iterator<S3ResourceId> sourcePathsIterator = sourcePaths.iterator();
-    Iterator<S3ResourceId> destinationPathsIterator = destinationPaths.iterator();
-    while (sourcePathsIterator.hasNext()) {
-      final S3ResourceId sourcePath = sourcePathsIterator.next();
-      final S3ResourceId destinationPath = destinationPathsIterator.next();
-
-      tasks.add(
-          () -> {
-            copy(sourcePath, destinationPath);
-            return null;
-          });
-    }
-
-    callTasks(tasks);
-  }
-
-  @VisibleForTesting
-  void copy(S3ResourceId sourcePath, S3ResourceId destinationPath) throws IOException {
-    try {
-      ObjectMetadata sourceObjectMetadata = getObjectMetadata(sourcePath);
-      if (sourceObjectMetadata.getContentLength() < MAX_COPY_OBJECT_SIZE_BYTES) {
-        atomicCopy(sourcePath, destinationPath, sourceObjectMetadata);
-      } else {
-        multipartCopy(sourcePath, destinationPath, sourceObjectMetadata);
-      }
-    } catch (AmazonClientException e) {
-      throw new IOException(e);
-    }
-  }
-
-  @VisibleForTesting
-  CopyObjectResult atomicCopy(
-      S3ResourceId sourcePath, S3ResourceId destinationPath, ObjectMetadata sourceObjectMetadata)
-      throws AmazonClientException {
-    CopyObjectRequest copyObjectRequest =
-        new CopyObjectRequest(
-            sourcePath.getBucket(),
-            sourcePath.getKey(),
-            destinationPath.getBucket(),
-            destinationPath.getKey());
-    copyObjectRequest.setNewObjectMetadata(sourceObjectMetadata);
-    copyObjectRequest.setStorageClass(config.getS3StorageClass());
-    copyObjectRequest.setSourceSSECustomerKey(config.getSSECustomerKey());
-    copyObjectRequest.setDestinationSSECustomerKey(config.getSSECustomerKey());
-    return amazonS3.get().copyObject(copyObjectRequest);
-  }
-
-  @VisibleForTesting
-  CompleteMultipartUploadResult multipartCopy(
-      S3ResourceId sourcePath, S3ResourceId destinationPath, ObjectMetadata sourceObjectMetadata)
-      throws AmazonClientException {
-    InitiateMultipartUploadRequest initiateUploadRequest =
-        new InitiateMultipartUploadRequest(destinationPath.getBucket(), destinationPath.getKey())
-            .withStorageClass(config.getS3StorageClass())
-            .withObjectMetadata(sourceObjectMetadata)
-            .withSSECustomerKey(config.getSSECustomerKey());
-
-    InitiateMultipartUploadResult initiateUploadResult =
-        amazonS3.get().initiateMultipartUpload(initiateUploadRequest);
-    final String uploadId = initiateUploadResult.getUploadId();
-
-    List<PartETag> eTags = new ArrayList<>();
-
-    final long objectSize = sourceObjectMetadata.getContentLength();
-    // extra validation in case a caller calls directly S3FileSystem.multipartCopy
-    // without using S3FileSystem.copy in the future
-    if (objectSize == 0) {
-      final CopyPartRequest copyPartRequest =
-          new CopyPartRequest()
-              .withSourceBucketName(sourcePath.getBucket())
-              .withSourceKey(sourcePath.getKey())
-              .withDestinationBucketName(destinationPath.getBucket())
-              .withDestinationKey(destinationPath.getKey())
-              .withUploadId(uploadId)
-              .withPartNumber(1);
-      copyPartRequest.setSourceSSECustomerKey(config.getSSECustomerKey());
-      copyPartRequest.setDestinationSSECustomerKey(config.getSSECustomerKey());
-
-      CopyPartResult copyPartResult = amazonS3.get().copyPart(copyPartRequest);
-      eTags.add(copyPartResult.getPartETag());
-    } else {
-      long bytePosition = 0;
-      // Amazon parts are 1-indexed, not zero-indexed.
-      for (int partNumber = 1; bytePosition < objectSize; partNumber++) {
-        final CopyPartRequest copyPartRequest =
-            new CopyPartRequest()
-                .withSourceBucketName(sourcePath.getBucket())
-                .withSourceKey(sourcePath.getKey())
-                .withDestinationBucketName(destinationPath.getBucket())
-                .withDestinationKey(destinationPath.getKey())
-                .withUploadId(uploadId)
-                .withPartNumber(partNumber)
-                .withFirstByte(bytePosition)
-                .withLastByte(
-                    Math.min(objectSize - 1, bytePosition + MAX_COPY_OBJECT_SIZE_BYTES - 1));
-        copyPartRequest.setSourceSSECustomerKey(config.getSSECustomerKey());
-        copyPartRequest.setDestinationSSECustomerKey(config.getSSECustomerKey());
-
-        CopyPartResult copyPartResult = amazonS3.get().copyPart(copyPartRequest);
-        eTags.add(copyPartResult.getPartETag());
-
-        bytePosition += MAX_COPY_OBJECT_SIZE_BYTES;
-      }
-    }
-
-    CompleteMultipartUploadRequest completeUploadRequest =
-        new CompleteMultipartUploadRequest()
-            .withBucketName(destinationPath.getBucket())
-            .withKey(destinationPath.getKey())
-            .withUploadId(uploadId)
-            .withPartETags(eTags);
-    return amazonS3.get().completeMultipartUpload(completeUploadRequest);
-  }
-
-  @Override
-  protected void rename(
-      List<S3ResourceId> sourceResourceIds,
-      List<S3ResourceId> destinationResourceIds,
-      MoveOptions... moveOptions)
-      throws IOException {
-    if (moveOptions.length > 0) {
-      throw new UnsupportedOperationException("Support for move options is not yet implemented.");
-    }
-    copy(sourceResourceIds, destinationResourceIds);
-    delete(sourceResourceIds);
-  }
-
-  @Override
-  protected void delete(Collection<S3ResourceId> resourceIds) throws IOException {
-    List<S3ResourceId> nonDirectoryPaths =
-        resourceIds.stream()
-            .filter(s3ResourceId -> !s3ResourceId.isDirectory())
-            .collect(Collectors.toList());
-    Multimap<String, String> keysByBucket = ArrayListMultimap.create();
-    for (S3ResourceId path : nonDirectoryPaths) {
-      keysByBucket.put(path.getBucket(), path.getKey());
-    }
-
-    List<Callable<Void>> tasks = new ArrayList<>();
-    for (final String bucket : keysByBucket.keySet()) {
-      for (final List<String> keysPartition :
-          Iterables.partition(keysByBucket.get(bucket), MAX_DELETE_OBJECTS_PER_REQUEST)) {
-        tasks.add(
-            () -> {
-              delete(bucket, keysPartition);
-              return null;
-            });
-      }
-    }
-
-    callTasks(tasks);
-  }
-
-  private void delete(String bucket, Collection<String> keys) throws IOException {
-    checkArgument(
-        keys.size() <= MAX_DELETE_OBJECTS_PER_REQUEST,
-        "only %s keys can be deleted per request, but got %s",
-        MAX_DELETE_OBJECTS_PER_REQUEST,
-        keys.size());
-    List<KeyVersion> deleteKeyVersions =
-        keys.stream().map(KeyVersion::new).collect(Collectors.toList());
-    DeleteObjectsRequest request =
-        new DeleteObjectsRequest(bucket).withKeys(deleteKeyVersions).withQuiet(true);
-    try {
-      amazonS3.get().deleteObjects(request);
-    } catch (AmazonClientException e) {
-      throw new IOException(e);
-    }
-  }
-
-  @Override
-  protected S3ResourceId matchNewResource(String singleResourceSpec, boolean isDirectory) {
-    if (isDirectory) {
-      if (!singleResourceSpec.endsWith("/")) {
-        singleResourceSpec += "/";
-      }
-    } else {
-      checkArgument(
-          !singleResourceSpec.endsWith("/"),
-          "Expected a file path, but [%s] ends with '/'. This is unsupported in S3FileSystem.",
-          singleResourceSpec);
-    }
-    return S3ResourceId.fromUri(singleResourceSpec);
-  }
-
-  @Override
-  protected void reportLineage(S3ResourceId resourceId, Lineage lineage) {
-    reportLineage(resourceId, lineage, LineageLevel.FILE);
-  }
-
-  @Override
-  protected void reportLineage(S3ResourceId resourceId, Lineage lineage, LineageLevel level) {
-    ImmutableList.Builder<String> segments =
-        ImmutableList.<String>builder().add(resourceId.getBucket());
-    if (level != LineageLevel.TOP_LEVEL && !resourceId.getKey().isEmpty()) {
-      segments.add(resourceId.getKey());
-    }
-    lineage.add("s3", segments.build());
-  }
-
-  /**
-   * Invokes tasks in a thread pool, then unwraps the resulting {@link Future Futures}.
-   *
-   * <p>Any task exception is wrapped in {@link IOException}.
-   */
-  private <T> List<T> callTasks(Collection<Callable<T>> tasks) throws IOException {
-
-    try {
-      List<CompletionStage<T>> futures = new ArrayList<>(tasks.size());
-      for (Callable<T> task : tasks) {
-        futures.add(MoreFutures.supplyAsync(task::call, executorService));
-      }
-      return MoreFutures.get(MoreFutures.allAsList(futures));
-
-    } catch (ExecutionException e) {
-      if (e.getCause() != null) {
-        if (e.getCause() instanceof IOException) {
-          throw (IOException) e.getCause();
-        }
-        throw new IOException(e.getCause());
-      }
-      throw new IOException(e);
-
-    } catch (InterruptedException e) {
-      Thread.currentThread().interrupt();
-      throw new IOException("executor service was interrupted");
-    }
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/S3FileSystemConfiguration.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/S3FileSystemConfiguration.java
deleted file mode 100644
index 248f99aa065..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/S3FileSystemConfiguration.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.s3;
-
-import com.amazonaws.services.s3.AmazonS3ClientBuilder;
-import com.amazonaws.services.s3.model.SSEAwsKeyManagementParams;
-import com.amazonaws.services.s3.model.SSECustomerKey;
-import com.google.auto.value.AutoValue;
-import javax.annotation.Nullable;
-import org.apache.beam.sdk.io.aws.options.S3ClientBuilderFactory;
-import org.apache.beam.sdk.io.aws.options.S3Options;
-import org.apache.beam.sdk.util.InstanceBuilder;
-
-/**
- * Object used to configure {@link S3FileSystem}.
- *
- * @see S3Options
- * @see S3FileSystemSchemeRegistrar
- */
-@AutoValue
-public abstract class S3FileSystemConfiguration {
-  public static final int MINIMUM_UPLOAD_BUFFER_SIZE_BYTES =
-      S3Options.S3UploadBufferSizeBytesFactory.MINIMUM_UPLOAD_BUFFER_SIZE_BYTES;
-
-  /** The uri scheme used by resources on this filesystem. */
-  public abstract String getScheme();
-
-  /** The AWS S3 storage class used for creating S3 objects. */
-  public abstract String getS3StorageClass();
-
-  /** Size of S3 upload chunks. */
-  public abstract int getS3UploadBufferSizeBytes();
-
-  /** Thread pool size, limiting the max concurrent S3 operations. */
-  public abstract int getS3ThreadPoolSize();
-
-  /** Algorithm for SSE-S3 encryption, e.g. AES256. */
-  public abstract @Nullable String getSSEAlgorithm();
-
-  /** SSE key for SSE-C encryption, e.g. a base64 encoded key and the algorithm. */
-  public abstract @Nullable SSECustomerKey getSSECustomerKey();
-
-  /** KMS key id for SSE-KMS encryption, e.g. "arn:aws:kms:...". */
-  public abstract @Nullable SSEAwsKeyManagementParams getSSEAwsKeyManagementParams();
-
-  /**
-   * Whether to ose an S3 Bucket Key for object encryption with server-side encryption using AWS KMS
-   * (SSE-KMS) or not.
-   */
-  public abstract boolean getBucketKeyEnabled();
-
-  /** Builder used to create the {@code AmazonS3Client}. */
-  public abstract AmazonS3ClientBuilder getS3ClientBuilder();
-
-  /** Creates a new uninitialized {@link Builder}. */
-  public static Builder builder() {
-    return new AutoValue_S3FileSystemConfiguration.Builder();
-  }
-
-  /** Creates a new {@link Builder} with values initialized by this instance's properties. */
-  public abstract Builder toBuilder();
-
-  /**
-   * Creates a new {@link Builder} with values initialized by the properties of {@code s3Options}.
-   */
-  public static Builder fromS3Options(S3Options s3Options) {
-    return builder()
-        .setScheme("s3")
-        .setS3StorageClass(s3Options.getS3StorageClass())
-        .setS3UploadBufferSizeBytes(s3Options.getS3UploadBufferSizeBytes())
-        .setS3ThreadPoolSize(s3Options.getS3ThreadPoolSize())
-        .setSSEAlgorithm(s3Options.getSSEAlgorithm())
-        .setSSECustomerKey(s3Options.getSSECustomerKey())
-        .setSSEAwsKeyManagementParams(s3Options.getSSEAwsKeyManagementParams())
-        .setBucketKeyEnabled(s3Options.getBucketKeyEnabled())
-        .setS3ClientBuilder(getBuilder(s3Options));
-  }
-
-  /** Creates a new {@link AmazonS3ClientBuilder} as specified by {@code s3Options}. */
-  public static AmazonS3ClientBuilder getBuilder(S3Options s3Options) {
-    return InstanceBuilder.ofType(S3ClientBuilderFactory.class)
-        .fromClass(s3Options.getS3ClientFactoryClass())
-        .build()
-        .createBuilder(s3Options);
-  }
-
-  @AutoValue.Builder
-  public abstract static class Builder {
-    public abstract Builder setScheme(String value);
-
-    public abstract Builder setS3StorageClass(String value);
-
-    public abstract Builder setS3UploadBufferSizeBytes(int value);
-
-    public abstract Builder setS3ThreadPoolSize(int value);
-
-    public abstract Builder setSSEAlgorithm(@Nullable String value);
-
-    public abstract Builder setSSECustomerKey(@Nullable SSECustomerKey value);
-
-    public abstract Builder setSSEAwsKeyManagementParams(@Nullable SSEAwsKeyManagementParams value);
-
-    public abstract Builder setBucketKeyEnabled(boolean value);
-
-    public abstract Builder setS3ClientBuilder(AmazonS3ClientBuilder value);
-
-    public abstract S3FileSystemConfiguration build();
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/S3FileSystemRegistrar.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/S3FileSystemRegistrar.java
deleted file mode 100644
index af153de4262..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/S3FileSystemRegistrar.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.s3;
-
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkNotNull;
-
-import com.google.auto.service.AutoService;
-import java.util.Map;
-import java.util.ServiceLoader;
-import java.util.stream.Collectors;
-import javax.annotation.Nonnull;
-import org.apache.beam.sdk.io.FileSystem;
-import org.apache.beam.sdk.io.FileSystemRegistrar;
-import org.apache.beam.sdk.options.PipelineOptions;
-import org.apache.beam.sdk.util.common.ReflectHelpers;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.Streams;
-
-/**
- * {@link AutoService} registrar for the {@link S3FileSystem}.
- *
- * <p>Creates instances of {@link S3FileSystem} for each scheme registered with a {@link
- * S3FileSystemSchemeRegistrar}.
- */
-@AutoService(FileSystemRegistrar.class)
-public class S3FileSystemRegistrar implements FileSystemRegistrar {
-
-  @Override
-  public Iterable<FileSystem<?>> fromOptions(@Nonnull PipelineOptions options) {
-    checkNotNull(options, "Expect the runner have called FileSystems.setDefaultPipelineOptions().");
-    Map<String, FileSystem<?>> fileSystems =
-        Streams.stream(
-                ServiceLoader.load(
-                    S3FileSystemSchemeRegistrar.class, ReflectHelpers.findClassLoader()))
-            .flatMap(r -> Streams.stream(r.fromOptions(options)))
-            .map(S3FileSystem::new)
-            // Throws IllegalStateException if any duplicate schemes exist.
-            .collect(Collectors.toMap(S3FileSystem::getScheme, f -> (FileSystem<?>) f));
-    return fileSystems.values();
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/S3FileSystemSchemeRegistrar.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/S3FileSystemSchemeRegistrar.java
deleted file mode 100644
index 191b6f2cd24..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/S3FileSystemSchemeRegistrar.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.s3;
-
-import com.google.auto.service.AutoService;
-import java.util.ServiceLoader;
-import javax.annotation.Nonnull;
-import org.apache.beam.sdk.io.FileSystem;
-import org.apache.beam.sdk.io.FileSystemRegistrar;
-import org.apache.beam.sdk.options.PipelineOptions;
-
-/**
- * A registrar that creates {@link S3FileSystemConfiguration} instances from {@link
- * PipelineOptions}.
- *
- * <p>Users of storage systems that use the S3 protocol have the ability to register a URI scheme by
- * creating a {@link ServiceLoader} entry and a concrete implementation of this interface.
- *
- * <p>It is optional but recommended to use one of the many build time tools such as {@link
- * AutoService} to generate the necessary META-INF files automatically.
- */
-public interface S3FileSystemSchemeRegistrar {
-  /**
-   * Create zero or more {@link S3FileSystemConfiguration} instances from the given {@link
-   * PipelineOptions}.
-   *
-   * <p>Each {@link S3FileSystemConfiguration#getScheme() scheme} is required to be unique among all
-   * schemes registered by all {@link S3FileSystemSchemeRegistrar}s, as well as among all {@link
-   * FileSystem}s registered by all {@link FileSystemRegistrar}s.
-   */
-  Iterable<S3FileSystemConfiguration> fromOptions(@Nonnull PipelineOptions options);
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/S3ReadableSeekableByteChannel.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/S3ReadableSeekableByteChannel.java
deleted file mode 100644
index bef1fc34088..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/S3ReadableSeekableByteChannel.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.s3;
-
-import static com.amazonaws.util.IOUtils.drainInputStream;
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkArgument;
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkNotNull;
-
-import com.amazonaws.AmazonClientException;
-import com.amazonaws.services.s3.AmazonS3;
-import com.amazonaws.services.s3.model.GetObjectRequest;
-import com.amazonaws.services.s3.model.S3Object;
-import com.amazonaws.services.s3.model.S3ObjectInputStream;
-import java.io.BufferedInputStream;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.channels.Channels;
-import java.nio.channels.ClosedChannelException;
-import java.nio.channels.NonWritableChannelException;
-import java.nio.channels.ReadableByteChannel;
-import java.nio.channels.SeekableByteChannel;
-
-/** A readable S3 object, as a {@link SeekableByteChannel}. */
-@SuppressWarnings({
-  "nullness" // TODO(https://github.com/apache/beam/issues/20497)
-})
-class S3ReadableSeekableByteChannel implements SeekableByteChannel {
-
-  private final AmazonS3 amazonS3;
-  private final S3ResourceId path;
-  private final long contentLength;
-  private long position = 0;
-  private boolean open = true;
-  private S3Object s3Object;
-  private final S3FileSystemConfiguration config;
-  private ReadableByteChannel s3ObjectContentChannel;
-
-  S3ReadableSeekableByteChannel(
-      AmazonS3 amazonS3, S3ResourceId path, S3FileSystemConfiguration config) throws IOException {
-    this.amazonS3 = checkNotNull(amazonS3, "amazonS3");
-    checkNotNull(path, "path");
-    this.config = checkNotNull(config, "config");
-
-    if (path.getSize().isPresent()) {
-      contentLength = path.getSize().get();
-      this.path = path;
-
-    } else {
-      try {
-        contentLength =
-            amazonS3.getObjectMetadata(path.getBucket(), path.getKey()).getContentLength();
-      } catch (AmazonClientException e) {
-        throw new IOException(e);
-      }
-      this.path = path.withSize(contentLength);
-    }
-  }
-
-  @Override
-  public int read(ByteBuffer destinationBuffer) throws IOException {
-    if (!isOpen()) {
-      throw new ClosedChannelException();
-    }
-    if (!destinationBuffer.hasRemaining()) {
-      return 0;
-    }
-    if (position == contentLength) {
-      return -1;
-    }
-
-    if (s3Object == null) {
-      GetObjectRequest request = new GetObjectRequest(path.getBucket(), path.getKey());
-      request.setSSECustomerKey(config.getSSECustomerKey());
-      if (position > 0) {
-        request.setRange(position, contentLength);
-      }
-      try {
-        s3Object = amazonS3.getObject(request);
-      } catch (AmazonClientException e) {
-        throw new IOException(e);
-      }
-      s3ObjectContentChannel =
-          Channels.newChannel(new BufferedInputStream(s3Object.getObjectContent(), 1024 * 1024));
-    }
-
-    int totalBytesRead = 0;
-    int bytesRead = 0;
-
-    do {
-      totalBytesRead += bytesRead;
-      try {
-        bytesRead = s3ObjectContentChannel.read(destinationBuffer);
-      } catch (AmazonClientException e) {
-        // TODO replace all catch AmazonServiceException with client exception
-        throw new IOException(e);
-      }
-    } while (bytesRead > 0);
-
-    position += totalBytesRead;
-    return totalBytesRead;
-  }
-
-  @Override
-  public long position() throws ClosedChannelException {
-    if (!isOpen()) {
-      throw new ClosedChannelException();
-    }
-    return position;
-  }
-
-  @Override
-  public SeekableByteChannel position(long newPosition) throws IOException {
-    if (!isOpen()) {
-      throw new ClosedChannelException();
-    }
-    checkArgument(newPosition >= 0, "newPosition too low");
-    checkArgument(newPosition < contentLength, "new position too high");
-
-    if (newPosition == position) {
-      return this;
-    }
-
-    // The position has changed, so close and destroy the object to induce a re-creation on the next
-    // call to read()
-    if (s3Object != null) {
-      s3Object.close();
-      s3Object = null;
-    }
-    position = newPosition;
-    return this;
-  }
-
-  @Override
-  public long size() throws ClosedChannelException {
-    if (!isOpen()) {
-      throw new ClosedChannelException();
-    }
-    return contentLength;
-  }
-
-  @Override
-  public void close() throws IOException {
-    if (s3Object != null) {
-      S3ObjectInputStream s3ObjectInputStream = s3Object.getObjectContent();
-      drainInputStream(s3ObjectInputStream);
-      s3Object.close();
-    }
-    open = false;
-  }
-
-  @Override
-  public boolean isOpen() {
-    return open;
-  }
-
-  @Override
-  public int write(ByteBuffer src) {
-    throw new NonWritableChannelException();
-  }
-
-  @Override
-  public SeekableByteChannel truncate(long size) {
-    throw new NonWritableChannelException();
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/S3ResourceId.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/S3ResourceId.java
deleted file mode 100644
index 2751f98d7f6..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/S3ResourceId.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.s3;
-
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkArgument;
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkNotNull;
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkState;
-
-import java.io.ObjectStreamException;
-import java.util.Date;
-import java.util.Objects;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import org.apache.beam.sdk.io.fs.ResolveOptions;
-import org.apache.beam.sdk.io.fs.ResolveOptions.StandardResolveOptions;
-import org.apache.beam.sdk.io.fs.ResourceId;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Optional;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Strings;
-import org.checkerframework.checker.nullness.qual.Nullable;
-
-@SuppressWarnings({
-  "nullness" // TODO(https://github.com/apache/beam/issues/20497)
-})
-class S3ResourceId implements ResourceId {
-
-  private static final long serialVersionUID = -8218379666994031337L;
-
-  static final String DEFAULT_SCHEME = "s3";
-
-  private static final Pattern S3_URI =
-      Pattern.compile("(?<SCHEME>[^:]+)://(?<BUCKET>[^/]+)(/(?<KEY>.*))?");
-
-  /** Matches a glob containing a wildcard, capturing the portion before the first wildcard. */
-  private static final Pattern GLOB_PREFIX = Pattern.compile("(?<PREFIX>[^\\[*?]*)[\\[*?].*");
-
-  private final String bucket;
-  private final String key;
-  private final Long size;
-  private final Date lastModified;
-  private final String scheme;
-
-  private S3ResourceId(
-      String scheme, String bucket, String key, @Nullable Long size, @Nullable Date lastModified) {
-    checkArgument(!Strings.isNullOrEmpty(scheme), "scheme");
-    checkArgument(!Strings.isNullOrEmpty(bucket), "bucket");
-    checkArgument(!bucket.contains("/"), "bucket must not contain '/': [%s]", bucket);
-    this.scheme = scheme;
-    this.bucket = bucket;
-    this.key = checkNotNull(key, "key");
-    this.size = size;
-    this.lastModified = lastModified;
-  }
-
-  private Object readResolve() throws ObjectStreamException {
-    if (scheme == null) {
-      return new S3ResourceId(DEFAULT_SCHEME, bucket, key, size, lastModified);
-    }
-    return this;
-  }
-
-  static S3ResourceId fromComponents(String scheme, String bucket, String key) {
-    if (!key.startsWith("/")) {
-      key = "/" + key;
-    }
-    return new S3ResourceId(scheme, bucket, key, null, null);
-  }
-
-  static S3ResourceId fromUri(String uri) {
-    Matcher m = S3_URI.matcher(uri);
-    checkArgument(m.matches(), "Invalid S3 URI: [%s]", uri);
-    String scheme = m.group("SCHEME");
-    String bucket = m.group("BUCKET");
-    String key = Strings.nullToEmpty(m.group("KEY"));
-    if (!key.startsWith("/")) {
-      key = "/" + key;
-    }
-    return fromComponents(scheme, bucket, key);
-  }
-
-  String getBucket() {
-    return bucket;
-  }
-
-  String getKey() {
-    // Skip leading slash
-    return key.substring(1);
-  }
-
-  Optional<Long> getSize() {
-    return Optional.fromNullable(size);
-  }
-
-  S3ResourceId withSize(long size) {
-    return new S3ResourceId(scheme, bucket, key, size, lastModified);
-  }
-
-  Optional<Date> getLastModified() {
-    return Optional.fromNullable(lastModified);
-  }
-
-  S3ResourceId withLastModified(Date lastModified) {
-    return new S3ResourceId(scheme, bucket, key, size, lastModified);
-  }
-
-  @Override
-  public ResourceId resolve(String other, ResolveOptions resolveOptions) {
-    checkState(isDirectory(), "Expected this resource to be a directory, but was [%s]", toString());
-
-    if (resolveOptions == StandardResolveOptions.RESOLVE_DIRECTORY) {
-      if ("..".equals(other)) {
-        if ("/".equals(key)) {
-          return this;
-        }
-        int parentStopsAt = key.substring(0, key.length() - 1).lastIndexOf('/');
-        return fromComponents(scheme, bucket, key.substring(0, parentStopsAt + 1));
-      }
-
-      if ("".equals(other)) {
-        return this;
-      }
-
-      if (!other.endsWith("/")) {
-        other += "/";
-      }
-      if (S3_URI.matcher(other).matches()) {
-        return resolveFromUri(other);
-      }
-      return fromComponents(scheme, bucket, key + other);
-    }
-
-    if (resolveOptions == StandardResolveOptions.RESOLVE_FILE) {
-      checkArgument(
-          !other.endsWith("/"), "Cannot resolve a file with a directory path: [%s]", other);
-      checkArgument(!"..".equals(other), "Cannot resolve parent as file: [%s]", other);
-      if (S3_URI.matcher(other).matches()) {
-        return resolveFromUri(other);
-      }
-      return fromComponents(scheme, bucket, key + other);
-    }
-
-    throw new UnsupportedOperationException(
-        String.format("Unexpected StandardResolveOptions [%s]", resolveOptions));
-  }
-
-  private S3ResourceId resolveFromUri(String uri) {
-    S3ResourceId id = fromUri(uri);
-    checkArgument(
-        id.getScheme().equals(scheme),
-        "Cannot resolve a URI as a child resource unless its scheme is [%s]; instead it was [%s]",
-        scheme,
-        id.getScheme());
-    return id;
-  }
-
-  @Override
-  public ResourceId getCurrentDirectory() {
-    if (isDirectory()) {
-      return this;
-    }
-    return fromComponents(scheme, getBucket(), key.substring(0, key.lastIndexOf('/') + 1));
-  }
-
-  @Override
-  public String getScheme() {
-    return scheme;
-  }
-
-  @Override
-  public @Nullable String getFilename() {
-    if (!isDirectory()) {
-      return key.substring(key.lastIndexOf('/') + 1);
-    }
-    if ("/".equals(key)) {
-      return null;
-    }
-    String keyWithoutTrailingSlash = key.substring(0, key.length() - 1);
-    return keyWithoutTrailingSlash.substring(keyWithoutTrailingSlash.lastIndexOf('/') + 1);
-  }
-
-  @Override
-  public boolean isDirectory() {
-    return key.endsWith("/");
-  }
-
-  boolean isWildcard() {
-    return GLOB_PREFIX.matcher(getKey()).matches();
-  }
-
-  String getKeyNonWildcardPrefix() {
-    Matcher m = GLOB_PREFIX.matcher(getKey());
-    checkArgument(m.matches(), String.format("Glob expression: [%s] is not expandable.", getKey()));
-    return m.group("PREFIX");
-  }
-
-  @Override
-  public String toString() {
-    return String.format("%s://%s%s", scheme, bucket, key);
-  }
-
-  @Override
-  public boolean equals(@Nullable Object obj) {
-    if (!(obj instanceof S3ResourceId)) {
-      return false;
-    }
-    S3ResourceId o = (S3ResourceId) obj;
-
-    return scheme.equals(o.scheme) && bucket.equals(o.bucket) && key.equals(o.key);
-  }
-
-  @Override
-  public int hashCode() {
-    return Objects.hash(scheme, bucket, key);
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/S3WritableByteChannel.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/S3WritableByteChannel.java
deleted file mode 100644
index 3594ca5b0aa..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/S3WritableByteChannel.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.s3;
-
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkArgument;
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkNotNull;
-
-import com.amazonaws.AmazonClientException;
-import com.amazonaws.services.s3.AmazonS3;
-import com.amazonaws.services.s3.model.CompleteMultipartUploadRequest;
-import com.amazonaws.services.s3.model.InitiateMultipartUploadRequest;
-import com.amazonaws.services.s3.model.InitiateMultipartUploadResult;
-import com.amazonaws.services.s3.model.ObjectMetadata;
-import com.amazonaws.services.s3.model.PartETag;
-import com.amazonaws.services.s3.model.UploadPartRequest;
-import com.amazonaws.services.s3.model.UploadPartResult;
-import com.amazonaws.util.Base64;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.channels.ClosedChannelException;
-import java.nio.channels.WritableByteChannel;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.util.ArrayList;
-import java.util.List;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.annotations.VisibleForTesting;
-
-/** A writable S3 object, as a {@link WritableByteChannel}. */
-@SuppressWarnings({
-  "nullness" // TODO(https://github.com/apache/beam/issues/20497)
-})
-class S3WritableByteChannel implements WritableByteChannel {
-  private final AmazonS3 amazonS3;
-  private final S3FileSystemConfiguration config;
-  private final S3ResourceId path;
-
-  private final String uploadId;
-  private final ByteBuffer uploadBuffer;
-  private final List<PartETag> eTags;
-
-  // AWS S3 parts are 1-indexed, not zero-indexed.
-  private int partNumber = 1;
-  private boolean open = true;
-  private final MessageDigest md5 = md5();
-
-  S3WritableByteChannel(
-      AmazonS3 amazonS3, S3ResourceId path, String contentType, S3FileSystemConfiguration config)
-      throws IOException {
-    this.amazonS3 = checkNotNull(amazonS3, "amazonS3");
-    this.config = checkNotNull(config);
-    this.path = checkNotNull(path, "path");
-    checkArgument(
-        atMostOne(
-            config.getSSECustomerKey() != null,
-            config.getSSEAlgorithm() != null,
-            config.getSSEAwsKeyManagementParams() != null),
-        "Either SSECustomerKey (SSE-C) or SSEAlgorithm (SSE-S3)"
-            + " or SSEAwsKeyManagementParams (SSE-KMS) must not be set at the same time.");
-    // Amazon S3 API docs: Each part must be at least 5 MB in size, except the last part.
-    checkArgument(
-        config.getS3UploadBufferSizeBytes()
-            >= S3FileSystemConfiguration.MINIMUM_UPLOAD_BUFFER_SIZE_BYTES,
-        "S3UploadBufferSizeBytes must be at least %s bytes",
-        S3FileSystemConfiguration.MINIMUM_UPLOAD_BUFFER_SIZE_BYTES);
-    this.uploadBuffer = ByteBuffer.allocate(config.getS3UploadBufferSizeBytes());
-    eTags = new ArrayList<>();
-
-    ObjectMetadata objectMetadata = new ObjectMetadata();
-    objectMetadata.setContentType(contentType);
-    if (config.getSSEAlgorithm() != null) {
-      objectMetadata.setSSEAlgorithm(config.getSSEAlgorithm());
-    }
-    InitiateMultipartUploadRequest request =
-        new InitiateMultipartUploadRequest(path.getBucket(), path.getKey())
-            .withStorageClass(config.getS3StorageClass())
-            .withObjectMetadata(objectMetadata);
-    request.setSSECustomerKey(config.getSSECustomerKey());
-    request.setSSEAwsKeyManagementParams(config.getSSEAwsKeyManagementParams());
-    request.setBucketKeyEnabled(config.getBucketKeyEnabled());
-    InitiateMultipartUploadResult result;
-    try {
-      result = amazonS3.initiateMultipartUpload(request);
-    } catch (AmazonClientException e) {
-      throw new IOException(e);
-    }
-    uploadId = result.getUploadId();
-  }
-
-  private static MessageDigest md5() {
-    try {
-      return MessageDigest.getInstance("MD5");
-    } catch (NoSuchAlgorithmException e) {
-      throw new IllegalStateException(e);
-    }
-  }
-
-  @Override
-  public int write(ByteBuffer sourceBuffer) throws IOException {
-    if (!isOpen()) {
-      throw new ClosedChannelException();
-    }
-
-    int totalBytesWritten = 0;
-    while (sourceBuffer.hasRemaining()) {
-      int position = sourceBuffer.position();
-      int bytesWritten = Math.min(sourceBuffer.remaining(), uploadBuffer.remaining());
-      totalBytesWritten += bytesWritten;
-
-      if (sourceBuffer.hasArray()) {
-        // If the underlying array is accessible, direct access is the most efficient approach.
-        int start = sourceBuffer.arrayOffset() + position;
-        uploadBuffer.put(sourceBuffer.array(), start, bytesWritten);
-        md5.update(sourceBuffer.array(), start, bytesWritten);
-      } else {
-        // Otherwise, use a readonly copy with an appropriate mark to read the current range of the
-        // buffer twice.
-        ByteBuffer copyBuffer = sourceBuffer.asReadOnlyBuffer();
-        copyBuffer.mark().limit(position + bytesWritten);
-        uploadBuffer.put(copyBuffer);
-        copyBuffer.reset();
-        md5.update(copyBuffer);
-      }
-      sourceBuffer.position(position + bytesWritten); // move position forward by the bytes written
-
-      if (!uploadBuffer.hasRemaining() || sourceBuffer.hasRemaining()) {
-        flush();
-      }
-    }
-
-    return totalBytesWritten;
-  }
-
-  private void flush() throws IOException {
-    uploadBuffer.flip();
-    ByteArrayInputStream inputStream =
-        new ByteArrayInputStream(uploadBuffer.array(), 0, uploadBuffer.limit());
-
-    UploadPartRequest request =
-        new UploadPartRequest()
-            .withBucketName(path.getBucket())
-            .withKey(path.getKey())
-            .withUploadId(uploadId)
-            .withPartNumber(partNumber++)
-            .withPartSize(uploadBuffer.limit())
-            .withMD5Digest(Base64.encodeAsString(md5.digest()))
-            .withInputStream(inputStream);
-    request.setSSECustomerKey(config.getSSECustomerKey());
-
-    UploadPartResult result;
-    try {
-      result = amazonS3.uploadPart(request);
-    } catch (AmazonClientException e) {
-      throw new IOException(e);
-    }
-    uploadBuffer.clear();
-    md5.reset();
-    eTags.add(result.getPartETag());
-  }
-
-  @Override
-  public boolean isOpen() {
-    return open;
-  }
-
-  @Override
-  public void close() throws IOException {
-    open = false;
-    if (uploadBuffer.remaining() > 0) {
-      flush();
-    }
-    CompleteMultipartUploadRequest request =
-        new CompleteMultipartUploadRequest()
-            .withBucketName(path.getBucket())
-            .withKey(path.getKey())
-            .withUploadId(uploadId)
-            .withPartETags(eTags);
-    try {
-      amazonS3.completeMultipartUpload(request);
-    } catch (AmazonClientException e) {
-      throw new IOException(e);
-    }
-  }
-
-  @VisibleForTesting
-  static boolean atMostOne(boolean... values) {
-    boolean one = false;
-    for (boolean value : values) {
-      if (!one && value) {
-        one = true;
-      } else if (value) {
-        return false;
-      }
-    }
-    return true;
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/package-info.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/package-info.java
deleted file mode 100644
index ebbf1d8db5a..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/package-info.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/** Defines IO connectors for Amazon Web Services S3. */
-package org.apache.beam.sdk.io.aws.s3;
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sns/AwsClientsProvider.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sns/AwsClientsProvider.java
deleted file mode 100644
index 6a90c0285f2..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sns/AwsClientsProvider.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.sns;
-
-import com.amazonaws.services.cloudwatch.AmazonCloudWatch;
-import com.amazonaws.services.sns.AmazonSNS;
-import java.io.Serializable;
-
-/**
- * Provides instances of AWS clients.
- *
- * <p>Please note, that any instance of {@link AwsClientsProvider} must be {@link Serializable} to
- * ensure it can be sent to worker machines.
- */
-public interface AwsClientsProvider extends Serializable {
-
-  /** @deprecated SnsIO doesn't require a CloudWatch client */
-  @Deprecated
-  @SuppressWarnings("return")
-  default AmazonCloudWatch getCloudWatchClient() {
-    return null;
-  }
-
-  AmazonSNS createSnsPublisher();
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sns/BasicSnsProvider.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sns/BasicSnsProvider.java
deleted file mode 100644
index aba3a74ccb2..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sns/BasicSnsProvider.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.sns;
-
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkArgument;
-
-import com.amazonaws.auth.AWSCredentialsProvider;
-import com.amazonaws.auth.AWSStaticCredentialsProvider;
-import com.amazonaws.auth.BasicAWSCredentials;
-import com.amazonaws.client.builder.AwsClientBuilder;
-import com.amazonaws.regions.Regions;
-import com.amazonaws.services.sns.AmazonSNS;
-import com.amazonaws.services.sns.AmazonSNSClientBuilder;
-import org.checkerframework.checker.nullness.qual.Nullable;
-
-/** Basic implementation of {@link AwsClientsProvider} used by default in {@link SnsIO}. */
-class BasicSnsProvider implements AwsClientsProvider {
-
-  private final String accessKey;
-  private final String secretKey;
-  private final Regions region;
-  private final @Nullable String serviceEndpoint;
-
-  BasicSnsProvider(
-      String accessKey, String secretKey, Regions region, @Nullable String serviceEndpoint) {
-    checkArgument(accessKey != null, "accessKey can not be null");
-    checkArgument(secretKey != null, "secretKey can not be null");
-    checkArgument(region != null, "region can not be null");
-    this.accessKey = accessKey;
-    this.secretKey = secretKey;
-    this.region = region;
-    this.serviceEndpoint = serviceEndpoint;
-  }
-
-  private AWSCredentialsProvider getCredentialsProvider() {
-    return new AWSStaticCredentialsProvider(new BasicAWSCredentials(accessKey, secretKey));
-  }
-
-  @Override
-  public AmazonSNS createSnsPublisher() {
-    AmazonSNSClientBuilder clientBuilder =
-        AmazonSNSClientBuilder.standard().withCredentials(getCredentialsProvider());
-    if (serviceEndpoint == null) {
-      clientBuilder.withRegion(region);
-    } else {
-      clientBuilder.withEndpointConfiguration(
-          new AwsClientBuilder.EndpointConfiguration(serviceEndpoint, region.getName()));
-    }
-    return clientBuilder.build();
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sns/PublishResultCoders.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sns/PublishResultCoders.java
deleted file mode 100644
index 6d546204d61..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sns/PublishResultCoders.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.sns;
-
-import com.amazonaws.ResponseMetadata;
-import com.amazonaws.http.SdkHttpMetadata;
-import com.amazonaws.services.sns.model.PublishResult;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import org.apache.beam.sdk.coders.Coder;
-import org.apache.beam.sdk.coders.CoderException;
-import org.apache.beam.sdk.coders.CustomCoder;
-import org.apache.beam.sdk.coders.NullableCoder;
-import org.apache.beam.sdk.coders.StringUtf8Coder;
-import org.apache.beam.sdk.io.aws.coders.AwsCoders;
-
-/** Coders for SNS {@link PublishResult}. */
-@SuppressWarnings({
-  "nullness" // TODO(https://github.com/apache/beam/issues/20497)
-})
-public final class PublishResultCoders {
-
-  private static final Coder<String> MESSAGE_ID_CODER = StringUtf8Coder.of();
-  private static final Coder<ResponseMetadata> RESPONSE_METADATA_CODER =
-      NullableCoder.of(AwsCoders.responseMetadata());
-
-  private PublishResultCoders() {}
-
-  /**
-   * Returns a new PublishResult coder which by default serializes only the messageId.
-   *
-   * @return the PublishResult coder
-   */
-  public static Coder<PublishResult> defaultPublishResult() {
-    return new PublishResultCoder(null, null);
-  }
-
-  /**
-   * Returns a new PublishResult coder which serializes the sdkResponseMetadata and sdkHttpMetadata,
-   * including the HTTP response headers.
-   *
-   * @return the PublishResult coder
-   */
-  public static Coder<PublishResult> fullPublishResult() {
-    return new PublishResultCoder(
-        RESPONSE_METADATA_CODER, NullableCoder.of(AwsCoders.sdkHttpMetadata()));
-  }
-
-  /**
-   * Returns a new PublishResult coder which serializes the sdkResponseMetadata and sdkHttpMetadata,
-   * but does not include the HTTP response headers.
-   *
-   * @return the PublishResult coder
-   */
-  public static Coder<PublishResult> fullPublishResultWithoutHeaders() {
-    return new PublishResultCoder(
-        RESPONSE_METADATA_CODER, NullableCoder.of(AwsCoders.sdkHttpMetadataWithoutHeaders()));
-  }
-
-  static class PublishResultCoder extends CustomCoder<PublishResult> {
-
-    private final Coder<ResponseMetadata> responseMetadataEncoder;
-    private final Coder<SdkHttpMetadata> sdkHttpMetadataCoder;
-
-    private PublishResultCoder(
-        Coder<ResponseMetadata> responseMetadataEncoder,
-        Coder<SdkHttpMetadata> sdkHttpMetadataCoder) {
-      this.responseMetadataEncoder = responseMetadataEncoder;
-      this.sdkHttpMetadataCoder = sdkHttpMetadataCoder;
-    }
-
-    @Override
-    public void encode(PublishResult value, OutputStream outStream)
-        throws CoderException, IOException {
-      MESSAGE_ID_CODER.encode(value.getMessageId(), outStream);
-      if (responseMetadataEncoder != null) {
-        responseMetadataEncoder.encode(value.getSdkResponseMetadata(), outStream);
-      }
-      if (sdkHttpMetadataCoder != null) {
-        sdkHttpMetadataCoder.encode(value.getSdkHttpMetadata(), outStream);
-      }
-    }
-
-    @Override
-    public PublishResult decode(InputStream inStream) throws CoderException, IOException {
-      String messageId = MESSAGE_ID_CODER.decode(inStream);
-      PublishResult publishResult = new PublishResult().withMessageId(messageId);
-      if (responseMetadataEncoder != null) {
-        publishResult.setSdkResponseMetadata(responseMetadataEncoder.decode(inStream));
-      }
-      if (sdkHttpMetadataCoder != null) {
-        publishResult.setSdkHttpMetadata(sdkHttpMetadataCoder.decode(inStream));
-      }
-      return publishResult;
-    }
-
-    @Override
-    public void verifyDeterministic() throws NonDeterministicException {
-      MESSAGE_ID_CODER.verifyDeterministic();
-      if (responseMetadataEncoder != null) {
-        responseMetadataEncoder.verifyDeterministic();
-      }
-      if (sdkHttpMetadataCoder != null) {
-        sdkHttpMetadataCoder.verifyDeterministic();
-      }
-    }
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sns/SnsCoderProviderRegistrar.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sns/SnsCoderProviderRegistrar.java
deleted file mode 100644
index 31543586141..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sns/SnsCoderProviderRegistrar.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.sns;
-
-import com.amazonaws.services.sns.model.PublishResult;
-import com.google.auto.service.AutoService;
-import java.util.List;
-import org.apache.beam.sdk.coders.CoderProvider;
-import org.apache.beam.sdk.coders.CoderProviderRegistrar;
-import org.apache.beam.sdk.coders.CoderProviders;
-import org.apache.beam.sdk.values.TypeDescriptor;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableList;
-
-/** A {@link CoderProviderRegistrar} for standard types used with {@link SnsIO}. */
-@AutoService(CoderProviderRegistrar.class)
-public class SnsCoderProviderRegistrar implements CoderProviderRegistrar {
-  @Override
-  public List<CoderProvider> getCoderProviders() {
-    return ImmutableList.of(
-        CoderProviders.forCoder(
-            TypeDescriptor.of(PublishResult.class), PublishResultCoders.defaultPublishResult()));
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sns/SnsIO.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sns/SnsIO.java
deleted file mode 100644
index 291026f82f7..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sns/SnsIO.java
+++ /dev/null
@@ -1,420 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.sns;
-
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkArgument;
-
-import com.amazonaws.regions.Regions;
-import com.amazonaws.services.sns.AmazonSNS;
-import com.amazonaws.services.sns.model.GetTopicAttributesResult;
-import com.amazonaws.services.sns.model.InternalErrorException;
-import com.amazonaws.services.sns.model.PublishRequest;
-import com.amazonaws.services.sns.model.PublishResult;
-import com.google.auto.value.AutoValue;
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.function.Predicate;
-import org.apache.beam.sdk.coders.Coder;
-import org.apache.beam.sdk.metrics.Counter;
-import org.apache.beam.sdk.metrics.Metrics;
-import org.apache.beam.sdk.transforms.DoFn;
-import org.apache.beam.sdk.transforms.PTransform;
-import org.apache.beam.sdk.transforms.ParDo;
-import org.apache.beam.sdk.util.BackOff;
-import org.apache.beam.sdk.util.BackOffUtils;
-import org.apache.beam.sdk.util.FluentBackoff;
-import org.apache.beam.sdk.util.Sleeper;
-import org.apache.beam.sdk.values.PCollection;
-import org.apache.beam.sdk.values.PCollectionTuple;
-import org.apache.beam.sdk.values.TupleTag;
-import org.apache.beam.sdk.values.TupleTagList;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.annotations.VisibleForTesting;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableSet;
-import org.apache.http.HttpStatus;
-import org.checkerframework.checker.nullness.qual.Nullable;
-import org.joda.time.Duration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * {@link PTransform}s for writing to <a href="https://aws.amazon.com/sns/">SNS</a>.
- *
- * <h3>Writing to SNS</h3>
- *
- * <p>Example usage:
- *
- * <pre>{@code
- * PCollection<PublishRequest> data = ...;
- *
- * data.apply(SnsIO.write()
- *     .withTopicName("topicName")
- *     .withRetryConfiguration(
- *        SnsIO.RetryConfiguration.create(
- *          4, org.joda.time.Duration.standardSeconds(10)))
- *     .withAWSClientsProvider(new BasicSnsProvider(accessKey, secretKey, region))
- *     .withResultOutputTag(results));
- * }</pre>
- *
- * <p>As a client, you need to provide at least the following things:
- *
- * <ul>
- *   <li>name of the SNS topic you're going to write to
- *   <li>retry configuration
- *   <li>need to specify AwsClientsProvider. You can pass on the default one BasicSnsProvider
- *   <li>an output tag where you can get results. Example in SnsIOTest
- * </ul>
- *
- * <p>By default, the output PublishResult contains only the messageId, all other fields are null.
- * If you need the full ResponseMetadata and SdkHttpMetadata you can call {@link
- * Write#withFullPublishResult}. If you need the HTTP status code but not the response headers you
- * can call {@link Write#withFullPublishResultWithoutHeaders}.
- *
- * @deprecated Module <code>beam-sdks-java-io-amazon-web-services</code> is deprecated and will be
- *     eventually removed. Please migrate to {@link org.apache.beam.sdk.io.aws2.sns.SnsIO} in module
- *     <code>beam-sdks-java-io-amazon-web-services2</code>.
- */
-@Deprecated
-@SuppressWarnings({
-  "nullness" // TODO(https://github.com/apache/beam/issues/20497)
-})
-public final class SnsIO {
-
-  // Write data tp SNS
-  public static Write write() {
-    return new AutoValue_SnsIO_Write.Builder().build();
-  }
-
-  /**
-   * A POJO encapsulating a configuration for retry behavior when issuing requests to SNS. A retry
-   * will be attempted until the maxAttempts or maxDuration is exceeded, whichever comes first, for
-   * any of the following exceptions:
-   *
-   * <ul>
-   *   <li>{@link IOException}
-   * </ul>
-   */
-  @AutoValue
-  @AutoValue.CopyAnnotations
-  public abstract static class RetryConfiguration implements Serializable {
-    private static final Duration DEFAULT_INITIAL_DURATION = Duration.standardSeconds(5);
-
-    @VisibleForTesting
-    static final RetryPredicate DEFAULT_RETRY_PREDICATE = new DefaultRetryPredicate();
-
-    abstract int getMaxAttempts();
-
-    abstract Duration getMaxDuration();
-
-    abstract Duration getInitialDuration();
-
-    abstract RetryPredicate getRetryPredicate();
-
-    abstract Builder builder();
-
-    public static RetryConfiguration create(int maxAttempts, Duration maxDuration) {
-      return create(maxAttempts, maxDuration, DEFAULT_INITIAL_DURATION);
-    }
-
-    @VisibleForTesting
-    static RetryConfiguration create(
-        int maxAttempts, Duration maxDuration, Duration initialDuration) {
-      checkArgument(maxAttempts > 0, "maxAttempts should be greater than 0");
-      checkArgument(
-          maxDuration != null && maxDuration.isLongerThan(Duration.ZERO),
-          "maxDuration should be greater than 0");
-      checkArgument(
-          initialDuration != null && initialDuration.isLongerThan(Duration.ZERO),
-          "initialDuration should be greater than 0");
-      return new AutoValue_SnsIO_RetryConfiguration.Builder()
-          .setMaxAttempts(maxAttempts)
-          .setMaxDuration(maxDuration)
-          .setInitialDuration(initialDuration)
-          .setRetryPredicate(DEFAULT_RETRY_PREDICATE)
-          .build();
-    }
-
-    @AutoValue.Builder
-    abstract static class Builder {
-      abstract SnsIO.RetryConfiguration.Builder setMaxAttempts(int maxAttempts);
-
-      abstract SnsIO.RetryConfiguration.Builder setMaxDuration(Duration maxDuration);
-
-      abstract SnsIO.RetryConfiguration.Builder setInitialDuration(Duration initialDuration);
-
-      abstract SnsIO.RetryConfiguration.Builder setRetryPredicate(RetryPredicate retryPredicate);
-
-      abstract SnsIO.RetryConfiguration build();
-    }
-
-    /**
-     * An interface used to control if we retry the SNS Publish call when a {@link Throwable}
-     * occurs. If {@link RetryPredicate#test(Object)} returns true, {@link Write} tries to resend
-     * the requests to SNS if the {@link RetryConfiguration} permits it.
-     */
-    @FunctionalInterface
-    interface RetryPredicate extends Predicate<Throwable>, Serializable {}
-
-    private static class DefaultRetryPredicate implements RetryPredicate {
-      private static final ImmutableSet<Integer> ELIGIBLE_CODES =
-          ImmutableSet.of(HttpStatus.SC_SERVICE_UNAVAILABLE);
-
-      @Override
-      public boolean test(Throwable throwable) {
-        return (throwable instanceof IOException
-            || (throwable instanceof InternalErrorException)
-            || (throwable instanceof InternalErrorException
-                && ELIGIBLE_CODES.contains(((InternalErrorException) throwable).getStatusCode())));
-      }
-    }
-  }
-
-  /** Implementation of {@link #write}. */
-  @AutoValue
-  @AutoValue.CopyAnnotations
-  public abstract static class Write
-      extends PTransform<PCollection<PublishRequest>, PCollectionTuple> {
-
-    abstract @Nullable String getTopicName();
-
-    abstract @Nullable AwsClientsProvider getAWSClientsProvider();
-
-    abstract @Nullable RetryConfiguration getRetryConfiguration();
-
-    abstract @Nullable TupleTag<PublishResult> getResultOutputTag();
-
-    abstract @Nullable Coder<PublishResult> getCoder();
-
-    abstract Builder builder();
-
-    @AutoValue.Builder
-    abstract static class Builder {
-
-      abstract Builder setTopicName(String topicName);
-
-      abstract Builder setAWSClientsProvider(AwsClientsProvider clientProvider);
-
-      abstract Builder setRetryConfiguration(RetryConfiguration retryConfiguration);
-
-      abstract Builder setResultOutputTag(TupleTag<PublishResult> results);
-
-      abstract Builder setCoder(Coder<PublishResult> coder);
-
-      abstract Write build();
-    }
-
-    /**
-     * Specify the SNS topic which will be used for writing, this name is mandatory.
-     *
-     * @param topicName topicName
-     */
-    public Write withTopicName(String topicName) {
-      return builder().setTopicName(topicName).build();
-    }
-
-    /**
-     * Allows to specify custom {@link AwsClientsProvider}. {@link AwsClientsProvider} creates new
-     * {@link AmazonSNS} which is later used for writing to a SNS topic.
-     */
-    public Write withAWSClientsProvider(AwsClientsProvider awsClientsProvider) {
-      return builder().setAWSClientsProvider(awsClientsProvider).build();
-    }
-
-    /**
-     * Specify credential details and region to be used to write to SNS. If you need more
-     * sophisticated credential protocol, then you should look at {@link
-     * Write#withAWSClientsProvider(AwsClientsProvider)}.
-     */
-    public Write withAWSClientsProvider(String awsAccessKey, String awsSecretKey, Regions region) {
-      return withAWSClientsProvider(awsAccessKey, awsSecretKey, region, null);
-    }
-
-    /**
-     * Specify credential details and region to be used to write to SNS. If you need more
-     * sophisticated credential protocol, then you should look at {@link
-     * Write#withAWSClientsProvider(AwsClientsProvider)}.
-     *
-     * <p>The {@code serviceEndpoint} sets an alternative service host. This is useful to execute
-     * the tests with Kinesis service emulator.
-     */
-    public Write withAWSClientsProvider(
-        String awsAccessKey, String awsSecretKey, Regions region, String serviceEndpoint) {
-      return withAWSClientsProvider(
-          new BasicSnsProvider(awsAccessKey, awsSecretKey, region, serviceEndpoint));
-    }
-
-    /**
-     * Provides configuration to retry a failed request to publish a message to SNS. Users should
-     * consider that retrying might compound the underlying problem which caused the initial
-     * failure. Users should also be aware that once retrying is exhausted the error is surfaced to
-     * the runner which <em>may</em> then opt to retry the current partition in entirety or abort if
-     * the max number of retries of the runner is completed. Retrying uses an exponential backoff
-     * algorithm, with minimum backoff of 5 seconds and then surfacing the error once the maximum
-     * number of retries or maximum configuration duration is exceeded.
-     *
-     * <p>Example use:
-     *
-     * <pre>{@code
-     * SnsIO.write()
-     *   .withRetryConfiguration(SnsIO.RetryConfiguration.create(5, Duration.standardMinutes(1))
-     *   ...
-     * }</pre>
-     *
-     * @param retryConfiguration the rules which govern the retry behavior
-     * @return the {@link Write} with retrying configured
-     */
-    public Write withRetryConfiguration(RetryConfiguration retryConfiguration) {
-      checkArgument(retryConfiguration != null, "retryConfiguration is required");
-      return builder().setRetryConfiguration(retryConfiguration).build();
-    }
-
-    /** Tuple tag to store results. Mandatory field. */
-    public Write withResultOutputTag(TupleTag<PublishResult> results) {
-      return builder().setResultOutputTag(results).build();
-    }
-
-    /**
-     * Encode the full {@code PublishResult} object, including sdkResponseMetadata and
-     * sdkHttpMetadata with the HTTP response headers.
-     */
-    public Write withFullPublishResult() {
-      return withCoder(PublishResultCoders.fullPublishResult());
-    }
-
-    /**
-     * Encode the full {@code PublishResult} object, including sdkResponseMetadata and
-     * sdkHttpMetadata but excluding the HTTP response headers.
-     */
-    public Write withFullPublishResultWithoutHeaders() {
-      return withCoder(PublishResultCoders.fullPublishResultWithoutHeaders());
-    }
-
-    /** Encode the {@code PublishResult} with the given coder. */
-    public Write withCoder(Coder<PublishResult> coder) {
-      return builder().setCoder(coder).build();
-    }
-
-    @Override
-    public PCollectionTuple expand(PCollection<PublishRequest> input) {
-      LoggerFactory.getLogger(SnsIO.class)
-          .warn(
-              "You are using a deprecated IO for Sns. Please migrate to module "
-                  + "'org.apache.beam:beam-sdks-java-io-amazon-web-services2'.");
-
-      checkArgument(getTopicName() != null, "withTopicName() is required");
-      PCollectionTuple result =
-          input.apply(
-              ParDo.of(new SnsWriterFn(this))
-                  .withOutputTags(getResultOutputTag(), TupleTagList.empty()));
-      if (getCoder() != null) {
-        result.get(getResultOutputTag()).setCoder(getCoder());
-      }
-      return result;
-    }
-
-    static class SnsWriterFn extends DoFn<PublishRequest, PublishResult> {
-      @VisibleForTesting
-      static final String RETRY_ATTEMPT_LOG = "Error writing to SNS. Retry attempt[{}]";
-
-      private transient FluentBackoff retryBackoff; // defaults to no retries
-      private static final Logger LOG = LoggerFactory.getLogger(SnsWriterFn.class);
-      private static final Counter SNS_WRITE_FAILURES =
-          Metrics.counter(SnsWriterFn.class, "SNS_Write_Failures");
-
-      private final SnsIO.Write spec;
-      private transient AmazonSNS producer;
-
-      SnsWriterFn(SnsIO.Write spec) {
-        this.spec = spec;
-      }
-
-      @Setup
-      public void setup() throws Exception {
-        // Initialize SnsPublisher
-        producer = spec.getAWSClientsProvider().createSnsPublisher();
-        checkArgument(
-            topicExists(producer, spec.getTopicName()),
-            "Topic %s does not exist",
-            spec.getTopicName());
-
-        retryBackoff = FluentBackoff.DEFAULT.withMaxRetries(0); // default to no retrying
-        if (spec.getRetryConfiguration() != null) {
-          retryBackoff =
-              retryBackoff
-                  .withMaxRetries(spec.getRetryConfiguration().getMaxAttempts() - 1)
-                  .withInitialBackoff(spec.getRetryConfiguration().getInitialDuration())
-                  .withMaxCumulativeBackoff(spec.getRetryConfiguration().getMaxDuration());
-        }
-      }
-
-      @ProcessElement
-      public void processElement(ProcessContext context) throws Exception {
-        PublishRequest request = context.element();
-        Sleeper sleeper = Sleeper.DEFAULT;
-        BackOff backoff = retryBackoff.backoff();
-        int attempt = 0;
-        while (true) {
-          attempt++;
-          try {
-            PublishResult pr = producer.publish(request);
-            context.output(pr);
-            break;
-          } catch (Exception ex) {
-            // Fail right away if there is no retry configuration
-            if (spec.getRetryConfiguration() == null
-                || !spec.getRetryConfiguration().getRetryPredicate().test(ex)) {
-              SNS_WRITE_FAILURES.inc();
-              LOG.info("Unable to publish message {}.", request.getMessage(), ex);
-              throw new IOException("Error writing to SNS (no attempt made to retry)", ex);
-            }
-
-            if (!BackOffUtils.next(sleeper, backoff)) {
-              throw new IOException(
-                  String.format(
-                      "Error writing to SNS after %d attempt(s). No more attempts allowed",
-                      attempt),
-                  ex);
-            } else {
-              // Note: this used in test cases to verify behavior
-              LOG.warn(RETRY_ATTEMPT_LOG, attempt, ex);
-            }
-          }
-        }
-      }
-
-      @Teardown
-      public void tearDown() {
-        if (producer != null) {
-          producer.shutdown();
-          producer = null;
-        }
-      }
-
-      @SuppressWarnings({"checkstyle:illegalCatch"})
-      private static boolean topicExists(AmazonSNS client, String topicName) {
-        try {
-          GetTopicAttributesResult topicAttributesResult = client.getTopicAttributes(topicName);
-          return topicAttributesResult != null
-              && topicAttributesResult.getSdkHttpMetadata().getHttpStatusCode() == 200;
-        } catch (Exception e) {
-          LOG.warn("Error checking whether topic {} exists.", topicName, e);
-          throw e;
-        }
-      }
-    }
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sns/package-info.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sns/package-info.java
deleted file mode 100644
index a1895cf4ce6..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sns/package-info.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/** Defines IO connectors for Amazon Web Services SNS. */
-package org.apache.beam.sdk.io.aws.sns;
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sqs/SqsCheckpointMark.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sqs/SqsCheckpointMark.java
deleted file mode 100644
index b3e23bff555..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sqs/SqsCheckpointMark.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.sqs;
-
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkState;
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.List;
-import org.apache.beam.sdk.io.UnboundedSource;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.annotations.VisibleForTesting;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Objects;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableList;
-import org.checkerframework.checker.nullness.qual.Nullable;
-
-@SuppressWarnings({
-  "nullness" // TODO(https://github.com/apache/beam/issues/20497)
-})
-class SqsCheckpointMark implements UnboundedSource.CheckpointMark, Serializable {
-
-  /**
-   * If the checkpoint is for persisting: the reader who's snapshotted state we are persisting. If
-   * the checkpoint is for restoring: {@literal null}. Not persisted in durable checkpoint. CAUTION:
-   * Between a checkpoint being taken and {@link #finalizeCheckpoint()} being called the 'true'
-   * active reader may have changed.
-   */
-  private transient @Nullable SqsUnboundedReader reader;
-
-  /**
-   * If the checkpoint is for persisting: The ids of messages which have been passed downstream
-   * since the last checkpoint. If the checkpoint is for restoring: {@literal null}. Not persisted
-   * in durable checkpoint.
-   */
-  private @Nullable List<String> safeToDeleteIds;
-
-  /**
-   * If the checkpoint is for persisting: The receipt handles of messages which have been received
-   * from SQS but not yet passed downstream at the time of the snapshot. If the checkpoint is for
-   * restoring: Same, but recovered from durable storage.
-   */
-  @VisibleForTesting final List<String> notYetReadReceipts;
-
-  public SqsCheckpointMark(
-      SqsUnboundedReader reader, List<String> messagesToDelete, List<String> notYetReadReceipts) {
-    this.reader = reader;
-    this.safeToDeleteIds = ImmutableList.copyOf(messagesToDelete);
-    this.notYetReadReceipts = ImmutableList.copyOf(notYetReadReceipts);
-  }
-
-  @Override
-  public void finalizeCheckpoint() throws IOException {
-    checkState(reader != null && safeToDeleteIds != null, "Cannot finalize a restored checkpoint");
-    // Even if the 'true' active reader has changed since the checkpoint was taken we are
-    // fine:
-    // - The underlying SQS topic will not have changed, so the following deletes will still
-    // go to the right place.
-    // - We'll delete the ACK ids from the readers in-flight state, but that only affect
-    // flow control and stats, neither of which are relevant anymore.
-    try {
-      reader.delete(safeToDeleteIds);
-    } finally {
-      int remainingInFlight = reader.numInFlightCheckpoints.decrementAndGet();
-      checkState(remainingInFlight >= 0, "Miscounted in-flight checkpoints");
-      reader.maybeCloseClient();
-      reader = null;
-      safeToDeleteIds = null;
-    }
-  }
-
-  @Override
-  public boolean equals(@Nullable Object o) {
-    if (this == o) {
-      return true;
-    }
-    if (o == null || getClass() != o.getClass()) {
-      return false;
-    }
-    SqsCheckpointMark that = (SqsCheckpointMark) o;
-    return Objects.equal(safeToDeleteIds, that.safeToDeleteIds);
-  }
-
-  @Override
-  public int hashCode() {
-    return Objects.hashCode(safeToDeleteIds);
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sqs/SqsConfiguration.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sqs/SqsConfiguration.java
deleted file mode 100644
index 3c798112325..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sqs/SqsConfiguration.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.sqs;
-
-import com.amazonaws.ClientConfiguration;
-import com.amazonaws.auth.AWSCredentialsProvider;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import java.io.IOException;
-import java.io.Serializable;
-import org.apache.beam.sdk.io.aws.options.AwsModule;
-import org.apache.beam.sdk.io.aws.options.AwsOptions;
-
-@SuppressWarnings({
-  "nullness" // TODO(https://github.com/apache/beam/issues/20497)
-})
-class SqsConfiguration implements Serializable {
-
-  private String awsRegion;
-  private String awsCredentialsProviderString;
-  private String awsClientConfigurationString;
-
-  public SqsConfiguration(AwsOptions awsOptions) {
-    ObjectMapper om = new ObjectMapper();
-    om.registerModule(new AwsModule());
-    try {
-      this.awsCredentialsProviderString =
-          om.writeValueAsString(awsOptions.getAwsCredentialsProvider());
-    } catch (JsonProcessingException e) {
-      this.awsCredentialsProviderString = null;
-    }
-
-    try {
-      this.awsClientConfigurationString =
-          om.writeValueAsString(awsOptions.getClientConfiguration());
-    } catch (JsonProcessingException e) {
-      this.awsClientConfigurationString = null;
-    }
-
-    this.awsRegion = awsOptions.getAwsRegion();
-  }
-
-  public AWSCredentialsProvider getAwsCredentialsProvider() {
-    ObjectMapper om = new ObjectMapper();
-    om.registerModule(new AwsModule());
-    try {
-      return om.readValue(awsCredentialsProviderString, AWSCredentialsProvider.class);
-    } catch (IOException e) {
-      return null;
-    }
-  }
-
-  public ClientConfiguration getClientConfiguration() {
-    ObjectMapper om = new ObjectMapper();
-    om.registerModule(new AwsModule());
-    try {
-      return om.readValue(awsClientConfigurationString, ClientConfiguration.class);
-    } catch (IOException e) {
-      return null;
-    }
-  }
-
-  public String getAwsRegion() {
-    return awsRegion;
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sqs/SqsIO.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sqs/SqsIO.java
deleted file mode 100644
index 26ca03c95c3..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sqs/SqsIO.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.sqs;
-
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkArgument;
-
-import com.amazonaws.services.sqs.AmazonSQS;
-import com.amazonaws.services.sqs.AmazonSQSClientBuilder;
-import com.amazonaws.services.sqs.model.Message;
-import com.amazonaws.services.sqs.model.SendMessageRequest;
-import com.google.auto.value.AutoValue;
-import org.apache.beam.sdk.coders.Coder;
-import org.apache.beam.sdk.io.aws.options.AwsOptions;
-import org.apache.beam.sdk.transforms.DoFn;
-import org.apache.beam.sdk.transforms.PTransform;
-import org.apache.beam.sdk.transforms.ParDo;
-import org.apache.beam.sdk.values.PBegin;
-import org.apache.beam.sdk.values.PCollection;
-import org.apache.beam.sdk.values.PDone;
-import org.checkerframework.checker.nullness.qual.Nullable;
-import org.joda.time.Duration;
-import org.slf4j.LoggerFactory;
-
-/**
- * An unbounded source for Amazon Simple Queue Service (SQS).
- *
- * <h3>Reading from an SQS queue</h3>
- *
- * <p>The {@link SqsIO} {@link Read} returns an unbounded {@link PCollection} of {@link
- * com.amazonaws.services.sqs.model.Message} containing the received messages. Note: This source
- * does not currently advance the watermark when no new messages are received.
- *
- * <p>To configure an SQS source, you have to provide the queueUrl to connect to. The following
- * example illustrates how to configure the source:
- *
- * <pre>{@code
- * pipeline.apply(SqsIO.read().withQueueUrl(queueUrl))
- * }</pre>
- *
- * <h3>Writing to an SQS queue</h3>
- *
- * <p>The following example illustrates how to use the sink:
- *
- * <pre>{@code
- * pipeline
- *   .apply(...) // returns PCollection<SendMessageRequest>
- *   .apply(SqsIO.write())
- * }</pre>
- *
- * <h3>Additional Configuration</h3>
- *
- * <p>Additional configuration can be provided via {@link AwsOptions} from command line args or in
- * code. For example, if you wanted to provide a secret access key via code:
- *
- * <pre>{@code
- * PipelineOptions pipelineOptions = PipelineOptionsFactory.fromArgs(args).withValidation().create();
- * AwsOptions awsOptions = pipelineOptions.as(AwsOptions.class);
- * BasicAWSCredentials awsCreds = new BasicAWSCredentials("accesskey", "secretkey");
- * awsOptions.setAwsCredentialsProvider(new AWSStaticCredentialsProvider(awsCreds));
- * Pipeline pipeline = Pipeline.create(options);
- * }</pre>
- *
- * <p>For more information on the available options see {@link AwsOptions}.
- *
- * @deprecated Module <code>beam-sdks-java-io-amazon-web-services</code> is deprecated and will be
- *     eventually removed. Please migrate to {@link org.apache.beam.sdk.io.aws2.sqs.SqsIO} in module
- *     <code>beam-sdks-java-io-amazon-web-services2</code>.
- */
-@Deprecated
-@SuppressWarnings({
-  "nullness" // TODO(https://github.com/apache/beam/issues/20497)
-})
-public class SqsIO {
-
-  public static Read read() {
-    return new AutoValue_SqsIO_Read.Builder()
-        .setCoder(SqsMessageCoder.of())
-        .setMaxNumRecords(Long.MAX_VALUE)
-        .build();
-  }
-
-  public static Write write() {
-    return new AutoValue_SqsIO_Write.Builder().build();
-  }
-
-  private SqsIO() {}
-
-  /**
-   * A {@link PTransform} to read/receive messages from SQS. See {@link SqsIO} for more information
-   * on usage and configuration.
-   */
-  @AutoValue
-  public abstract static class Read extends PTransform<PBegin, PCollection<Message>> {
-
-    abstract Coder<Message> coder();
-
-    abstract @Nullable String queueUrl();
-
-    abstract long maxNumRecords();
-
-    abstract @Nullable Duration maxReadTime();
-
-    abstract Builder toBuilder();
-
-    @AutoValue.Builder
-    abstract static class Builder {
-      abstract Builder setCoder(Coder<Message> coder);
-
-      abstract Builder setQueueUrl(String queueUrl);
-
-      abstract Builder setMaxNumRecords(long maxNumRecords);
-
-      abstract Builder setMaxReadTime(Duration maxReadTime);
-
-      abstract Read build();
-    }
-
-    /**
-     * Optionally set a custom {@link Message} output coder if you need to access further (message)
-     * attributes.
-     *
-     * <p>The default {@link SqsMessageCoder} only supports `SentTimestamp` and
-     * `requestTimeMsSinceEpoch`.
-     */
-    public Read withCoder(Coder<Message> coder) {
-      return toBuilder().setCoder(coder).build();
-    }
-
-    /**
-     * Define the max number of records received by the {@link Read}. When the max number of records
-     * is lower than {@code Long.MAX_VALUE}, the {@link Read} will provide a bounded {@link
-     * PCollection}.
-     */
-    public Read withMaxNumRecords(long maxNumRecords) {
-      return toBuilder().setMaxNumRecords(maxNumRecords).build();
-    }
-
-    /**
-     * Define the max read time (duration) while the {@link Read} will receive messages. When this
-     * max read time is not null, the {@link Read} will provide a bounded {@link PCollection}.
-     */
-    public Read withMaxReadTime(Duration maxReadTime) {
-      return toBuilder().setMaxReadTime(maxReadTime).build();
-    }
-
-    /** Define the queueUrl used by the {@link Read} to receive messages from SQS. */
-    public Read withQueueUrl(String queueUrl) {
-      checkArgument(queueUrl != null, "queueUrl can not be null");
-      checkArgument(!queueUrl.isEmpty(), "queueUrl can not be empty");
-      return toBuilder().setQueueUrl(queueUrl).build();
-    }
-
-    @Override
-    public PCollection<Message> expand(PBegin input) {
-      LoggerFactory.getLogger(SqsIO.class)
-          .warn(
-              "You are using a deprecated IO for Sqs. Please migrate to module "
-                  + "'org.apache.beam:beam-sdks-java-io-amazon-web-services2'.");
-
-      org.apache.beam.sdk.io.Read.Unbounded<Message> unbounded =
-          org.apache.beam.sdk.io.Read.from(
-              new SqsUnboundedSource(
-                  this,
-                  new SqsConfiguration(input.getPipeline().getOptions().as(AwsOptions.class)),
-                  coder()));
-
-      PTransform<PBegin, PCollection<Message>> transform = unbounded;
-
-      if (maxNumRecords() < Long.MAX_VALUE || maxReadTime() != null) {
-        transform = unbounded.withMaxReadTime(maxReadTime()).withMaxNumRecords(maxNumRecords());
-      }
-
-      return input.getPipeline().apply(transform);
-    }
-  }
-
-  /**
-   * A {@link PTransform} to send messages to SQS. See {@link SqsIO} for more information on usage
-   * and configuration.
-   */
-  @AutoValue
-  public abstract static class Write extends PTransform<PCollection<SendMessageRequest>, PDone> {
-    abstract Builder toBuilder();
-
-    @AutoValue.Builder
-    abstract static class Builder {
-      abstract Write build();
-    }
-
-    @Override
-    public PDone expand(PCollection<SendMessageRequest> input) {
-      LoggerFactory.getLogger(SqsIO.class)
-          .warn(
-              "You are using a deprecated IO for Sqs. Please migrate to module "
-                  + "'org.apache.beam:beam-sdks-java-io-amazon-web-services2'.");
-
-      input.apply(
-          ParDo.of(
-              new SqsWriteFn(
-                  new SqsConfiguration(input.getPipeline().getOptions().as(AwsOptions.class)))));
-      return PDone.in(input.getPipeline());
-    }
-  }
-
-  private static class SqsWriteFn extends DoFn<SendMessageRequest, Void> {
-    private final SqsConfiguration sqsConfiguration;
-    private transient AmazonSQS sqs;
-
-    SqsWriteFn(SqsConfiguration sqsConfiguration) {
-      this.sqsConfiguration = sqsConfiguration;
-    }
-
-    @Setup
-    public void setup() {
-      sqs =
-          AmazonSQSClientBuilder.standard()
-              .withClientConfiguration(sqsConfiguration.getClientConfiguration())
-              .withCredentials(sqsConfiguration.getAwsCredentialsProvider())
-              .withRegion(sqsConfiguration.getAwsRegion())
-              .build();
-    }
-
-    @ProcessElement
-    public void processElement(ProcessContext processContext) throws Exception {
-      sqs.sendMessage(processContext.element());
-    }
-
-    @Teardown
-    public void teardown() throws Exception {
-      if (sqs != null) {
-        sqs.shutdown();
-      }
-    }
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sqs/SqsMessageCoder.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sqs/SqsMessageCoder.java
deleted file mode 100644
index 792642c1760..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sqs/SqsMessageCoder.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.sqs;
-
-import static com.amazonaws.services.sqs.model.MessageSystemAttributeName.SentTimestamp;
-import static org.apache.beam.sdk.io.aws.sqs.SqsUnboundedReader.REQUEST_TIME;
-
-import com.amazonaws.services.sqs.model.Message;
-import com.amazonaws.services.sqs.model.MessageAttributeValue;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import org.apache.beam.sdk.coders.AtomicCoder;
-import org.apache.beam.sdk.coders.Coder;
-import org.apache.beam.sdk.coders.NullableCoder;
-import org.apache.beam.sdk.coders.StringUtf8Coder;
-import org.checkerframework.checker.nullness.qual.NonNull;
-
-/**
- * Deterministic coder for an AWS Sdk SQS message.
- *
- * <p>This encoder only keeps the `SentTimestamp` attribute as well as the `requestTimeMsSinceEpoch`
- * message attribute, other attributes are dropped. You may provide your own coder in case you need
- * to access further attributes.
- */
-class SqsMessageCoder extends AtomicCoder<Message> {
-  private static final Coder<String> STRING_CODER = StringUtf8Coder.of();
-  private static final NullableCoder<String> OPT_STRING_CODER =
-      NullableCoder.of(StringUtf8Coder.of());
-
-  private static final Coder<Message> INSTANCE = new SqsMessageCoder();
-
-  static Coder<Message> of() {
-    return INSTANCE;
-  }
-
-  private SqsMessageCoder() {}
-
-  @Override
-  public void encode(Message value, OutputStream out) throws IOException {
-    STRING_CODER.encode(value.getMessageId(), out);
-    STRING_CODER.encode(value.getReceiptHandle(), out);
-    OPT_STRING_CODER.encode(value.getBody(), out);
-    OPT_STRING_CODER.encode(value.getAttributes().get(SentTimestamp.toString()), out);
-    MessageAttributeValue reqTime = value.getMessageAttributes().get(REQUEST_TIME);
-    OPT_STRING_CODER.encode(reqTime != null ? reqTime.getStringValue() : null, out);
-  }
-
-  @Override
-  public Message decode(InputStream in) throws IOException {
-    Message msg = new Message();
-    msg.setMessageId(STRING_CODER.decode(in));
-    msg.setReceiptHandle(STRING_CODER.decode(in));
-
-    // SQS library not annotated, but this coder assumes null is allowed (documentation does not
-    // specify)
-    @SuppressWarnings("nullness")
-    @NonNull
-    String body = OPT_STRING_CODER.decode(in);
-    msg.setBody(body);
-
-    String sentAt = OPT_STRING_CODER.decode(in);
-    if (sentAt != null) {
-      msg.addAttributesEntry(SentTimestamp.toString(), sentAt);
-    }
-
-    String reqTime = OPT_STRING_CODER.decode(in);
-    if (reqTime != null) {
-      msg.addMessageAttributesEntry(
-          REQUEST_TIME, new MessageAttributeValue().withStringValue(reqTime));
-    }
-    return msg;
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sqs/SqsUnboundedReader.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sqs/SqsUnboundedReader.java
deleted file mode 100644
index 1fd5e38f546..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sqs/SqsUnboundedReader.java
+++ /dev/null
@@ -1,944 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.sqs;
-
-import static java.nio.charset.StandardCharsets.UTF_8;
-import static java.util.stream.Collectors.groupingBy;
-import static java.util.stream.Collectors.toMap;
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkState;
-
-import com.amazonaws.services.sqs.AmazonSQS;
-import com.amazonaws.services.sqs.AmazonSQSClientBuilder;
-import com.amazonaws.services.sqs.model.BatchResultErrorEntry;
-import com.amazonaws.services.sqs.model.ChangeMessageVisibilityBatchRequestEntry;
-import com.amazonaws.services.sqs.model.ChangeMessageVisibilityBatchResult;
-import com.amazonaws.services.sqs.model.DeleteMessageBatchRequestEntry;
-import com.amazonaws.services.sqs.model.DeleteMessageBatchResult;
-import com.amazonaws.services.sqs.model.GetQueueAttributesRequest;
-import com.amazonaws.services.sqs.model.Message;
-import com.amazonaws.services.sqs.model.MessageAttributeValue;
-import com.amazonaws.services.sqs.model.MessageSystemAttributeName;
-import com.amazonaws.services.sqs.model.QueueAttributeName;
-import com.amazonaws.services.sqs.model.ReceiveMessageRequest;
-import com.amazonaws.services.sqs.model.ReceiveMessageResult;
-import java.io.IOException;
-import java.util.ArrayDeque;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.Objects;
-import java.util.Queue;
-import java.util.Set;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.stream.Collectors;
-import java.util.stream.IntStream;
-import org.apache.beam.sdk.io.UnboundedSource;
-import org.apache.beam.sdk.io.UnboundedSource.CheckpointMark;
-import org.apache.beam.sdk.transforms.Combine;
-import org.apache.beam.sdk.transforms.Max;
-import org.apache.beam.sdk.transforms.Min;
-import org.apache.beam.sdk.transforms.Sum;
-import org.apache.beam.sdk.transforms.windowing.BoundedWindow;
-import org.apache.beam.sdk.util.BucketingFunction;
-import org.apache.beam.sdk.util.MovingFunction;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.EvictingQueue;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableMap;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.Iterables;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.Lists;
-import org.joda.time.Duration;
-import org.joda.time.Instant;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings({
-  "nullness" // TODO(https://github.com/apache/beam/issues/20497)
-})
-class SqsUnboundedReader extends UnboundedSource.UnboundedReader<Message> {
-  private static final Logger LOG = LoggerFactory.getLogger(SqsUnboundedReader.class);
-
-  /** Request time attribute in {@link Message#getMessageAttributes()}. */
-  static final String REQUEST_TIME = "requestTimeMsSinceEpoch";
-
-  /** Maximum number of messages to pull from SQS per request. */
-  public static final int MAX_NUMBER_OF_MESSAGES = 10;
-
-  /** Maximum times to retry batch SQS operations upon partial success. */
-  private static final int BATCH_OPERATION_MAX_RETIRES = 5;
-
-  /** Timeout for round trip from receiving a message to finally deleting it from SQS. */
-  private static final Duration PROCESSING_TIMEOUT = Duration.standardMinutes(2);
-
-  /**
-   * Percentage of visibility timeout by which to extend visibility timeout when they are near
-   * timeout.
-   */
-  private static final int VISIBILITY_EXTENSION_PCT = 50;
-
-  /**
-   * Percentage of ack timeout we should use as a safety margin. We'll try to extend visibility
-   * timeout by this margin before the visibility timeout actually expires.
-   */
-  private static final int VISIBILITY_SAFETY_PCT = 20;
-
-  /**
-   * For stats only: How close we can get to an visibility deadline before we risk it being already
-   * considered passed by SQS.
-   */
-  private static final Duration VISIBILITY_TOO_LATE = Duration.standardSeconds(2);
-
-  /** Maximum number of message ids per delete or visibility extension call. */
-  private static final int DELETE_BATCH_SIZE = 10;
-
-  /** Maximum number of messages in flight. */
-  private static final int MAX_IN_FLIGHT = 20000;
-
-  /** Maximum number of recent messages for calculating average message size. */
-  private static final int MAX_AVG_BYTE_MESSAGES = 20;
-
-  /** Period of samples to determine watermark and other stats. */
-  private static final Duration SAMPLE_PERIOD = Duration.standardMinutes(1);
-
-  /** Period of updates to determine watermark and other stats. */
-  private static final Duration SAMPLE_UPDATE = Duration.standardSeconds(5);
-
-  /** Period for logging stats. */
-  private static final Duration LOG_PERIOD = Duration.standardSeconds(30);
-
-  /** Minimum number of unread messages required before considering updating watermark. */
-  private static final int MIN_WATERMARK_MESSAGES = 10;
-
-  /**
-   * Minimum number of SAMPLE_UPDATE periods over which unread messages should be spread before
-   * considering updating watermark.
-   */
-  private static final int MIN_WATERMARK_SPREAD = 2;
-
-  private static final Combine.BinaryCombineLongFn MIN = Min.ofLongs();
-
-  private static final Combine.BinaryCombineLongFn MAX = Max.ofLongs();
-
-  private static final Combine.BinaryCombineLongFn SUM = Sum.ofLongs();
-
-  /** For access to topic and SQS client. */
-  private final SqsUnboundedSource source;
-
-  /**
-   * The closed state of this {@link SqsUnboundedReader}. If true, the reader has not yet been
-   * closed, and it will have a non-null value within {@link #SqsUnboundedReader}.
-   */
-  private AtomicBoolean active = new AtomicBoolean(true);
-
-  /** SQS client of this reader instance. */
-  private AmazonSQS sqsClient = null;
-
-  /** The current message, or {@literal null} if none. */
-  private Message current;
-
-  /**
-   * Messages we have received from SQS and not yet delivered downstream. We preserve their order.
-   */
-  final Queue<Message> messagesNotYetRead;
-
-  /** Message ids of messages we have delivered downstream but not yet deleted. */
-  private Set<String> safeToDeleteIds;
-
-  /**
-   * Visibility timeout, in ms, as set on subscription when we first start reading. Not updated
-   * thereafter. -1 if not yet determined.
-   */
-  private long visibilityTimeoutMs;
-
-  /** Byte size of undecoded elements in {@link #messagesNotYetRead}. */
-  private long notYetReadBytes;
-
-  /** Byte size of recent messages. */
-  private EvictingQueue<Integer> recentMessageBytes;
-
-  /**
-   * Bucketed map from received time (as system time, ms since epoch) to message timestamps (mssince
-   * epoch) of all received but not-yet read messages. Used to estimate watermark.
-   */
-  private BucketingFunction minUnreadTimestampMsSinceEpoch;
-
-  /**
-   * Minimum of timestamps (ms since epoch) of all recently read messages. Used to estimate
-   * watermark.
-   */
-  private MovingFunction minReadTimestampMsSinceEpoch;
-
-  /** Number of recent empty receives. */
-  private MovingFunction numEmptyReceives;
-
-  private static class InFlightState {
-    /** Receipt handle of message. */
-    String receiptHandle;
-
-    /** When request which yielded message was issued. */
-    long requestTimeMsSinceEpoch;
-
-    /**
-     * When SQS will consider this message's visibility timeout to timeout and thus it needs to be
-     * extended.
-     */
-    long visibilityDeadlineMsSinceEpoch;
-
-    public InFlightState(
-        String receiptHandle, long requestTimeMsSinceEpoch, long visibilityDeadlineMsSinceEpoch) {
-      this.receiptHandle = receiptHandle;
-      this.requestTimeMsSinceEpoch = requestTimeMsSinceEpoch;
-      this.visibilityDeadlineMsSinceEpoch = visibilityDeadlineMsSinceEpoch;
-    }
-  }
-
-  /**
-   * Map from message ids of messages we have received from SQS but not yet deleted to their in
-   * flight state. Ordered from earliest to latest visibility deadline.
-   */
-  private final LinkedHashMap<String, InFlightState> inFlight;
-
-  /**
-   * Batches of successfully deleted message ids which need to be pruned from the above. CAUTION:
-   * Accessed by both reader and checkpointing threads.
-   */
-  private final Queue<List<String>> deletedIds;
-
-  /**
-   * System time (ms since epoch) we last received a message from SQS, or -1 if not yet received any
-   * messages.
-   */
-  private long lastReceivedMsSinceEpoch;
-
-  /** The last reported watermark (ms since epoch), or beginning of time if none yet reported. */
-  private long lastWatermarkMsSinceEpoch;
-
-  /** Stats only: System time (ms since epoch) we last logs stats, or -1 if never. */
-  private long lastLogTimestampMsSinceEpoch;
-
-  /** Stats only: Total number of messages received. */
-  private long numReceived;
-
-  /** Stats only: Number of messages which have recently been received. */
-  private MovingFunction numReceivedRecently;
-
-  /** Stats only: Number of messages which have recently had their deadline extended. */
-  private MovingFunction numExtendedDeadlines;
-
-  /**
-   * Stats only: Number of messages which have recently had their deadline extended even though it
-   * may be too late to do so.
-   */
-  private MovingFunction numLateDeadlines;
-
-  /** Stats only: Number of messages which have recently been deleted. */
-  private MovingFunction numDeleted;
-
-  /**
-   * Stats only: Number of messages which have recently expired (visibility timeout were extended
-   * for too long).
-   */
-  private MovingFunction numExpired;
-
-  /** Stats only: Number of messages which have recently been returned to visible on SQS. */
-  private MovingFunction numReleased;
-
-  /** Stats only: Number of message bytes which have recently been read by downstream consumer. */
-  private MovingFunction numReadBytes;
-
-  /**
-   * Stats only: Minimum of timestamp (ms since epoch) of all recently received messages. Used to
-   * estimate timestamp skew. Does not contribute to watermark estimator.
-   */
-  private MovingFunction minReceivedTimestampMsSinceEpoch;
-
-  /**
-   * Stats only: Maximum of timestamp (ms since epoch) of all recently received messages. Used to
-   * estimate timestamp skew.
-   */
-  private MovingFunction maxReceivedTimestampMsSinceEpoch;
-
-  /** Stats only: Minimum of recent estimated watermarks (ms since epoch). */
-  private MovingFunction minWatermarkMsSinceEpoch;
-
-  /** Stats ony: Maximum of recent estimated watermarks (ms since epoch). */
-  private MovingFunction maxWatermarkMsSinceEpoch;
-
-  /**
-   * Stats only: Number of messages with timestamps strictly behind the estimated watermark at the
-   * time they are received. These may be considered 'late' by downstream computations.
-   */
-  private MovingFunction numLateMessages;
-
-  /**
-   * Stats only: Current number of checkpoints in flight. CAUTION: Accessed by both checkpointing
-   * and reader threads.
-   */
-  AtomicInteger numInFlightCheckpoints;
-
-  /** Stats only: Maximum number of checkpoints in flight at any time. */
-  private int maxInFlightCheckpoints;
-
-  private static MovingFunction newFun(Combine.BinaryCombineLongFn function) {
-    return new MovingFunction(
-        SAMPLE_PERIOD.getMillis(),
-        SAMPLE_UPDATE.getMillis(),
-        MIN_WATERMARK_SPREAD,
-        MIN_WATERMARK_MESSAGES,
-        function);
-  }
-
-  public SqsUnboundedReader(SqsUnboundedSource source, SqsCheckpointMark sqsCheckpointMark)
-      throws IOException {
-    this.source = source;
-
-    messagesNotYetRead = new ArrayDeque<>();
-    safeToDeleteIds = new HashSet<>();
-    inFlight = new LinkedHashMap<>();
-    deletedIds = new ConcurrentLinkedQueue<>();
-    visibilityTimeoutMs = -1;
-    notYetReadBytes = 0;
-    recentMessageBytes = EvictingQueue.create(MAX_AVG_BYTE_MESSAGES);
-    minUnreadTimestampMsSinceEpoch =
-        new BucketingFunction(
-            SAMPLE_UPDATE.getMillis(), MIN_WATERMARK_SPREAD, MIN_WATERMARK_MESSAGES, MIN);
-    minReadTimestampMsSinceEpoch = newFun(MIN);
-    numEmptyReceives = newFun(SUM);
-    lastReceivedMsSinceEpoch = -1;
-    lastWatermarkMsSinceEpoch = BoundedWindow.TIMESTAMP_MIN_VALUE.getMillis();
-    current = null;
-    lastLogTimestampMsSinceEpoch = -1;
-    numReceived = 0L;
-    numReceivedRecently = newFun(SUM);
-    numExtendedDeadlines = newFun(SUM);
-    numLateDeadlines = newFun(SUM);
-    numDeleted = newFun(SUM);
-    numExpired = newFun(SUM);
-    numReleased = newFun(SUM);
-    numReadBytes = newFun(SUM);
-    minReceivedTimestampMsSinceEpoch = newFun(MIN);
-    maxReceivedTimestampMsSinceEpoch = newFun(MAX);
-    minWatermarkMsSinceEpoch = newFun(MIN);
-    maxWatermarkMsSinceEpoch = newFun(MAX);
-    numLateMessages = newFun(SUM);
-    numInFlightCheckpoints = new AtomicInteger();
-    maxInFlightCheckpoints = 0;
-
-    if (sqsCheckpointMark != null) {
-      long nowMsSinceEpoch = now();
-      initClient();
-      extendBatch(nowMsSinceEpoch, sqsCheckpointMark.notYetReadReceipts, 0);
-      numReleased.add(nowMsSinceEpoch, sqsCheckpointMark.notYetReadReceipts.size());
-    }
-  }
-
-  @Override
-  public Instant getWatermark() {
-
-    // NOTE: We'll allow the watermark to go backwards. The underlying runner is responsible
-    // for aggregating all reported watermarks and ensuring the aggregate is latched.
-    // If we attempt to latch locally then it is possible a temporary starvation of one reader
-    // could cause its estimated watermark to fast forward to current system time. Then when
-    // the reader resumes its watermark would be unable to resume tracking.
-    // By letting the underlying runner latch we avoid any problems due to localized starvation.
-    long nowMsSinceEpoch = now();
-    long readMin = minReadTimestampMsSinceEpoch.get(nowMsSinceEpoch);
-    long unreadMin = minUnreadTimestampMsSinceEpoch.get();
-    if (readMin == Long.MAX_VALUE
-        && unreadMin == Long.MAX_VALUE
-        && numEmptyReceives.get(nowMsSinceEpoch) > 0
-        && nowMsSinceEpoch > lastReceivedMsSinceEpoch + SAMPLE_PERIOD.getMillis()) {
-      // We don't currently have any unread messages pending, we have not had any messages
-      // read for a while, and we have not received any new messages from SQS for a while.
-      // Advance watermark to current time.
-      // TODO: Estimate a timestamp lag.
-      lastWatermarkMsSinceEpoch = nowMsSinceEpoch;
-    } else if (minReadTimestampMsSinceEpoch.isSignificant()
-        || minUnreadTimestampMsSinceEpoch.isSignificant()) {
-      // Take minimum of the timestamps in all unread messages and recently read messages.
-      lastWatermarkMsSinceEpoch = Math.min(readMin, unreadMin);
-    }
-    // else: We're not confident enough to estimate a new watermark. Stick with the old one.
-    minWatermarkMsSinceEpoch.add(nowMsSinceEpoch, lastWatermarkMsSinceEpoch);
-    maxWatermarkMsSinceEpoch.add(nowMsSinceEpoch, lastWatermarkMsSinceEpoch);
-    return new Instant(lastWatermarkMsSinceEpoch);
-  }
-
-  @Override
-  public Message getCurrent() throws NoSuchElementException {
-    if (current == null) {
-      throw new NoSuchElementException();
-    }
-    return current;
-  }
-
-  @Override
-  public Instant getCurrentTimestamp() throws NoSuchElementException {
-    if (current == null) {
-      throw new NoSuchElementException();
-    }
-
-    return getTimestamp(current);
-  }
-
-  @Override
-  public byte[] getCurrentRecordId() throws NoSuchElementException {
-    if (current == null) {
-      throw new NoSuchElementException();
-    }
-    return current.getMessageId().getBytes(UTF_8);
-  }
-
-  @Override
-  public CheckpointMark getCheckpointMark() {
-    int cur = numInFlightCheckpoints.incrementAndGet();
-    maxInFlightCheckpoints = Math.max(maxInFlightCheckpoints, cur);
-    List<String> snapshotSafeToDeleteIds = Lists.newArrayList(safeToDeleteIds);
-    List<String> snapshotNotYetReadReceipts = new ArrayList<>(messagesNotYetRead.size());
-    for (Message message : messagesNotYetRead) {
-      snapshotNotYetReadReceipts.add(message.getReceiptHandle());
-    }
-    return new SqsCheckpointMark(this, snapshotSafeToDeleteIds, snapshotNotYetReadReceipts);
-  }
-
-  @Override
-  public SqsUnboundedSource getCurrentSource() {
-    return source;
-  }
-
-  @Override
-  public long getTotalBacklogBytes() {
-    long avgBytes = avgMessageBytes();
-    List<String> requestAttributes =
-        Collections.singletonList(QueueAttributeName.ApproximateNumberOfMessages.toString());
-    Map<String, String> queueAttributes =
-        sqsClient
-            .getQueueAttributes(source.getRead().queueUrl(), requestAttributes)
-            .getAttributes();
-    long numMessages =
-        Long.parseLong(
-            queueAttributes.get(QueueAttributeName.ApproximateNumberOfMessages.toString()));
-
-    // No messages consumed for estimating average message size
-    if (avgBytes == -1 && numMessages > 0) {
-      return BACKLOG_UNKNOWN;
-    } else {
-      return numMessages * avgBytes;
-    }
-  }
-
-  @Override
-  public boolean start() throws IOException {
-    initClient();
-    visibilityTimeoutMs =
-        Integer.parseInt(
-                sqsClient
-                    .getQueueAttributes(
-                        new GetQueueAttributesRequest(source.getRead().queueUrl())
-                            .withAttributeNames("VisibilityTimeout"))
-                    .getAttributes()
-                    .get("VisibilityTimeout"))
-            * 1000L;
-    return advance();
-  }
-
-  private void initClient() {
-    if (sqsClient == null) {
-      sqsClient =
-          AmazonSQSClientBuilder.standard()
-              .withClientConfiguration(source.getSqsConfiguration().getClientConfiguration())
-              .withCredentials(source.getSqsConfiguration().getAwsCredentialsProvider())
-              .withRegion(source.getSqsConfiguration().getAwsRegion())
-              .build();
-    }
-  }
-
-  @Override
-  public boolean advance() throws IOException {
-    // Emit stats.
-    stats();
-
-    if (current != null) {
-      // Current is consumed. It can no longer contribute to holding back the watermark.
-      minUnreadTimestampMsSinceEpoch.remove(getRequestTimeMsSinceEpoch(current));
-      current = null;
-    }
-
-    // Retire state associated with deleted messages.
-    retire();
-
-    // Extend all pressing deadlines.
-    // Will BLOCK until done.
-    // If the system is pulling messages only to let them sit in a downstream queue then
-    // this will have the effect of slowing down the pull rate.
-    // However, if the system is genuinely taking longer to process each message then
-    // the work to extend visibility timeout would be better done in the background.
-    extend();
-
-    if (messagesNotYetRead.isEmpty()) {
-      // Pull another batch.
-      // Will BLOCK until fetch returns, but will not block until a message is available.
-      pull();
-    }
-
-    // Take one message from queue.
-    current = messagesNotYetRead.poll();
-    if (current == null) {
-      // Try again later.
-      return false;
-    }
-    notYetReadBytes -= current.getBody().getBytes(UTF_8).length;
-    checkState(notYetReadBytes >= 0);
-    long nowMsSinceEpoch = now();
-    numReadBytes.add(nowMsSinceEpoch, current.getBody().getBytes(UTF_8).length);
-    recentMessageBytes.add(current.getBody().getBytes(UTF_8).length);
-    minReadTimestampMsSinceEpoch.add(nowMsSinceEpoch, getCurrentTimestamp().getMillis());
-    if (getCurrentTimestamp().getMillis() < lastWatermarkMsSinceEpoch) {
-      numLateMessages.add(nowMsSinceEpoch, 1L);
-    }
-
-    // Current message can be considered 'read' and will be persisted by the next
-    // checkpoint. So it is now safe to delete from SQS.
-    safeToDeleteIds.add(current.getMessageId());
-
-    return true;
-  }
-
-  /**
-   * {@inheritDoc}.
-   *
-   * <p>Marks this {@link SqsUnboundedReader} as no longer active. The {@link AmazonSQS} continue to
-   * exist and be active beyond the life of this call if there are any in-flight checkpoints. When
-   * no in-flight checkpoints remain, the reader will be closed.
-   */
-  @Override
-  public void close() throws IOException {
-    active.set(false);
-    maybeCloseClient();
-  }
-
-  /**
-   * Close this reader's underlying {@link AmazonSQS} if the reader has been closed and there are no
-   * outstanding checkpoints.
-   */
-  void maybeCloseClient() throws IOException {
-    if (!active.get() && numInFlightCheckpoints.get() == 0) {
-      // The reader has been closed and it has no more outstanding checkpoints. The client
-      // must be closed so it doesn't leak
-      if (sqsClient != null) {
-        sqsClient.shutdown();
-      }
-    }
-  }
-
-  /** delete the provided {@code messageIds} from SQS. */
-  void delete(List<String> messageIds) throws IOException {
-    AtomicInteger counter = new AtomicInteger();
-    for (List<String> messageList :
-        messageIds.stream()
-            .collect(groupingBy(x -> counter.getAndIncrement() / DELETE_BATCH_SIZE))
-            .values()) {
-      deleteBatch(messageList);
-    }
-  }
-
-  /**
-   * delete the provided {@code messageIds} from SQS, blocking until all of the messages are
-   * deleted.
-   *
-   * <p>CAUTION: May be invoked from a separate thread.
-   *
-   * <p>CAUTION: Retains {@code messageIds}.
-   */
-  private void deleteBatch(List<String> messageIds) throws IOException {
-    int retries = 0;
-    List<String> errorMessages = new ArrayList<>();
-    Map<String, String> pendingReceipts =
-        IntStream.range(0, messageIds.size())
-            .boxed()
-            .filter(i -> inFlight.containsKey(messageIds.get(i)))
-            .collect(toMap(Object::toString, i -> inFlight.get(messageIds.get(i)).receiptHandle));
-
-    while (!pendingReceipts.isEmpty()) {
-
-      if (retries >= BATCH_OPERATION_MAX_RETIRES) {
-        throw new IOException(
-            "Failed to delete "
-                + pendingReceipts.size()
-                + " messages after "
-                + retries
-                + " retries: "
-                + String.join(", ", errorMessages));
-      }
-
-      List<DeleteMessageBatchRequestEntry> entries =
-          pendingReceipts.entrySet().stream()
-              .map(r -> new DeleteMessageBatchRequestEntry(r.getKey(), r.getValue()))
-              .collect(Collectors.toList());
-
-      DeleteMessageBatchResult result =
-          sqsClient.deleteMessageBatch(source.getRead().queueUrl(), entries);
-
-      // Retry errors except invalid handles
-      Set<BatchResultErrorEntry> retryErrors =
-          result.getFailed().stream()
-              .filter(e -> !e.getCode().equals("ReceiptHandleIsInvalid"))
-              .collect(Collectors.toSet());
-
-      pendingReceipts
-          .keySet()
-          .retainAll(
-              retryErrors.stream().map(BatchResultErrorEntry::getId).collect(Collectors.toSet()));
-
-      errorMessages =
-          retryErrors.stream().map(BatchResultErrorEntry::getMessage).collect(Collectors.toList());
-
-      retries += 1;
-    }
-    deletedIds.add(messageIds);
-  }
-
-  /**
-   * Messages which have been deleted (via the checkpoint finalize) are no longer in flight. This is
-   * only used for flow control and stats.
-   */
-  private void retire() {
-    long nowMsSinceEpoch = now();
-    while (true) {
-      List<String> ackIds = deletedIds.poll();
-      if (ackIds == null) {
-        return;
-      }
-      numDeleted.add(nowMsSinceEpoch, ackIds.size());
-      for (String ackId : ackIds) {
-        inFlight.remove(ackId);
-        safeToDeleteIds.remove(ackId);
-      }
-    }
-  }
-
-  /** BLOCKING Fetch another batch of messages from SQS. */
-  private void pull() {
-    if (inFlight.size() >= MAX_IN_FLIGHT) {
-      // Wait for checkpoint to be finalized before pulling anymore.
-      // There may be lag while checkpoints are persisted and the finalizeCheckpoint method
-      // is invoked. By limiting the in-flight messages we can ensure we don't end up consuming
-      // messages faster than we can checkpoint them.
-      return;
-    }
-
-    long requestTimeMsSinceEpoch = now();
-    long deadlineMsSinceEpoch = requestTimeMsSinceEpoch + visibilityTimeoutMs;
-
-    final ReceiveMessageRequest receiveMessageRequest =
-        new ReceiveMessageRequest(source.getRead().queueUrl());
-
-    receiveMessageRequest.setMaxNumberOfMessages(MAX_NUMBER_OF_MESSAGES);
-    receiveMessageRequest.setAttributeNames(
-        Arrays.asList(MessageSystemAttributeName.SentTimestamp.toString()));
-    final ReceiveMessageResult receiveMessageResult =
-        sqsClient.receiveMessage(receiveMessageRequest);
-
-    final List<Message> messages = receiveMessageResult.getMessages();
-
-    if (messages == null || messages.isEmpty()) {
-      numEmptyReceives.add(requestTimeMsSinceEpoch, 1L);
-      return;
-    }
-
-    lastReceivedMsSinceEpoch = requestTimeMsSinceEpoch;
-
-    // Capture the received messages.
-    for (Message message : messages) {
-      // Keep request time as message attribute for later usage
-      MessageAttributeValue reqTime =
-          new MessageAttributeValue().withStringValue(Long.toString(requestTimeMsSinceEpoch));
-      message.setMessageAttributes(ImmutableMap.of(REQUEST_TIME, reqTime));
-      messagesNotYetRead.add(message);
-      notYetReadBytes += message.getBody().getBytes(UTF_8).length;
-      inFlight.put(
-          message.getMessageId(),
-          new InFlightState(
-              message.getReceiptHandle(), requestTimeMsSinceEpoch, deadlineMsSinceEpoch));
-      numReceived++;
-      numReceivedRecently.add(requestTimeMsSinceEpoch, 1L);
-
-      long timestampMillis = getTimestamp(message).getMillis();
-      minReceivedTimestampMsSinceEpoch.add(requestTimeMsSinceEpoch, timestampMillis);
-      maxReceivedTimestampMsSinceEpoch.add(requestTimeMsSinceEpoch, timestampMillis);
-      minUnreadTimestampMsSinceEpoch.add(requestTimeMsSinceEpoch, timestampMillis);
-    }
-  }
-
-  /** Return the current time, in ms since epoch. */
-  long now() {
-    return System.currentTimeMillis();
-  }
-
-  /**
-   * BLOCKING Extend deadline for all messages which need it. CAUTION: If extensions can't keep up
-   * with wallclock then we'll never return.
-   */
-  private void extend() throws IOException {
-    while (true) {
-      long nowMsSinceEpoch = now();
-      List<String> assumeExpired = new ArrayList<>();
-      List<String> toBeExtended = new ArrayList<>();
-      List<String> toBeExpired = new ArrayList<>();
-      // Messages will be in increasing deadline order.
-      for (Map.Entry<String, InFlightState> entry : inFlight.entrySet()) {
-        if (entry.getValue().visibilityDeadlineMsSinceEpoch
-                - (visibilityTimeoutMs * VISIBILITY_SAFETY_PCT) / 100
-            > nowMsSinceEpoch) {
-          // All remaining messages don't need their visibility timeouts to be extended.
-          break;
-        }
-
-        if (entry.getValue().visibilityDeadlineMsSinceEpoch - VISIBILITY_TOO_LATE.getMillis()
-            < nowMsSinceEpoch) {
-          // SQS may have already considered this message to have expired.
-          // If so it will (eventually) be made available on a future pull request.
-          // If this message ends up being committed then it will be considered a duplicate
-          // when re-pulled.
-          assumeExpired.add(entry.getKey());
-          continue;
-        }
-
-        if (entry.getValue().requestTimeMsSinceEpoch + PROCESSING_TIMEOUT.getMillis()
-            < nowMsSinceEpoch) {
-          // This message has been in-flight for too long.
-          // Give up on it, otherwise we risk extending its visibility timeout indefinitely.
-          toBeExpired.add(entry.getKey());
-          continue;
-        }
-
-        // Extend the visibility timeout for this message.
-        toBeExtended.add(entry.getKey());
-        if (toBeExtended.size() >= DELETE_BATCH_SIZE) {
-          // Enough for one batch.
-          break;
-        }
-      }
-
-      if (assumeExpired.isEmpty() && toBeExtended.isEmpty() && toBeExpired.isEmpty()) {
-        // Nothing to be done.
-        return;
-      }
-
-      if (!assumeExpired.isEmpty()) {
-        // If we didn't make the visibility deadline assume expired and no longer in flight.
-        numLateDeadlines.add(nowMsSinceEpoch, assumeExpired.size());
-        for (String messageId : assumeExpired) {
-          inFlight.remove(messageId);
-        }
-      }
-
-      if (!toBeExpired.isEmpty()) {
-        // Expired messages are no longer considered in flight.
-        numExpired.add(nowMsSinceEpoch, toBeExpired.size());
-        for (String messageId : toBeExpired) {
-          inFlight.remove(messageId);
-        }
-      }
-
-      if (!toBeExtended.isEmpty()) {
-        // SQS extends visibility timeout from it's notion of current time.
-        // We'll try to track that on our side, but note the deadlines won't necessarily agree.
-        long extensionMs = (int) ((visibilityTimeoutMs * VISIBILITY_EXTENSION_PCT) / 100L);
-        long newDeadlineMsSinceEpoch = nowMsSinceEpoch + extensionMs;
-        for (String messageId : toBeExtended) {
-          // Maintain increasing ack deadline order.
-          String receiptHandle = inFlight.get(messageId).receiptHandle;
-          InFlightState state = inFlight.remove(messageId);
-
-          inFlight.put(
-              messageId,
-              new InFlightState(
-                  receiptHandle, state.requestTimeMsSinceEpoch, newDeadlineMsSinceEpoch));
-        }
-        List<String> receiptHandles =
-            toBeExtended.stream()
-                .map(inFlight::get)
-                .filter(Objects::nonNull) // get rid of null values
-                .map(m -> m.receiptHandle)
-                .collect(Collectors.toList());
-        // BLOCKs until extended.
-        extendBatch(nowMsSinceEpoch, receiptHandles, (int) (extensionMs / 1000));
-      }
-    }
-  }
-
-  /**
-   * BLOCKING Extend the visibility timeout for messages from SQS with the given {@code
-   * receiptHandles}.
-   */
-  void extendBatch(long nowMsSinceEpoch, List<String> receiptHandles, int extensionSec)
-      throws IOException {
-    int retries = 0;
-    int numMessages = receiptHandles.size();
-    Map<String, String> pendingReceipts =
-        IntStream.range(0, receiptHandles.size())
-            .boxed()
-            .collect(toMap(Object::toString, receiptHandles::get));
-    List<String> errorMessages = new ArrayList<>();
-
-    while (!pendingReceipts.isEmpty()) {
-
-      if (retries >= BATCH_OPERATION_MAX_RETIRES) {
-        throw new IOException(
-            "Failed to extend visibility timeout for "
-                + pendingReceipts.size()
-                + " messages after "
-                + retries
-                + " retries: "
-                + String.join(", ", errorMessages));
-      }
-
-      List<ChangeMessageVisibilityBatchRequestEntry> entries =
-          pendingReceipts.entrySet().stream()
-              .map(
-                  r ->
-                      new ChangeMessageVisibilityBatchRequestEntry(r.getKey(), r.getValue())
-                          .withVisibilityTimeout(extensionSec))
-              .collect(Collectors.toList());
-
-      ChangeMessageVisibilityBatchResult result =
-          sqsClient.changeMessageVisibilityBatch(source.getRead().queueUrl(), entries);
-
-      // Retry errors except invalid handles
-      Set<BatchResultErrorEntry> retryErrors =
-          result.getFailed().stream()
-              .filter(e -> !e.getCode().equals("ReceiptHandleIsInvalid"))
-              .collect(Collectors.toSet());
-
-      pendingReceipts
-          .keySet()
-          .retainAll(
-              retryErrors.stream().map(BatchResultErrorEntry::getId).collect(Collectors.toSet()));
-
-      errorMessages =
-          retryErrors.stream().map(BatchResultErrorEntry::getMessage).collect(Collectors.toList());
-
-      retries += 1;
-    }
-    numExtendedDeadlines.add(nowMsSinceEpoch, numMessages);
-  }
-
-  /** Log stats if time to do so. */
-  private void stats() {
-    long nowMsSinceEpoch = now();
-    if (lastLogTimestampMsSinceEpoch < 0) {
-      lastLogTimestampMsSinceEpoch = nowMsSinceEpoch;
-      return;
-    }
-    long deltaMs = nowMsSinceEpoch - lastLogTimestampMsSinceEpoch;
-    if (deltaMs < LOG_PERIOD.getMillis()) {
-      return;
-    }
-
-    String messageSkew = "unknown";
-    long minTimestamp = minReceivedTimestampMsSinceEpoch.get(nowMsSinceEpoch);
-    long maxTimestamp = maxReceivedTimestampMsSinceEpoch.get(nowMsSinceEpoch);
-    if (minTimestamp < Long.MAX_VALUE && maxTimestamp > Long.MIN_VALUE) {
-      messageSkew = (maxTimestamp - minTimestamp) + "ms";
-    }
-
-    String watermarkSkew = "unknown";
-    long minWatermark = minWatermarkMsSinceEpoch.get(nowMsSinceEpoch);
-    long maxWatermark = maxWatermarkMsSinceEpoch.get(nowMsSinceEpoch);
-    if (minWatermark < Long.MAX_VALUE && maxWatermark > Long.MIN_VALUE) {
-      watermarkSkew = (maxWatermark - minWatermark) + "ms";
-    }
-
-    String oldestInFlight = "no";
-    String oldestAckId = Iterables.getFirst(inFlight.keySet(), null);
-    if (oldestAckId != null) {
-      oldestInFlight = (nowMsSinceEpoch - inFlight.get(oldestAckId).requestTimeMsSinceEpoch) + "ms";
-    }
-
-    LOG.debug(
-        "SQS {} has "
-            + "{} received messages, "
-            + "{} current unread messages, "
-            + "{} current unread bytes, "
-            + "{} current in-flight msgs, "
-            + "{} oldest in-flight, "
-            + "{} current in-flight checkpoints, "
-            + "{} max in-flight checkpoints, "
-            + "{} bytes in backlog, "
-            + "{}B/s recent read, "
-            + "{} recent received, "
-            + "{} recent extended, "
-            + "{} recent late extended, "
-            + "{} recent deleted, "
-            + "{} recent released, "
-            + "{} recent expired, "
-            + "{} recent message timestamp skew, "
-            + "{} recent watermark skew, "
-            + "{} recent late messages, "
-            + "{} last reported watermark",
-        source.getRead().queueUrl(),
-        numReceived,
-        messagesNotYetRead.size(),
-        notYetReadBytes,
-        inFlight.size(),
-        oldestInFlight,
-        numInFlightCheckpoints.get(),
-        maxInFlightCheckpoints,
-        getTotalBacklogBytes(),
-        numReadBytes.get(nowMsSinceEpoch) / (SAMPLE_PERIOD.getMillis() / 1000L),
-        numReceivedRecently.get(nowMsSinceEpoch),
-        numExtendedDeadlines.get(nowMsSinceEpoch),
-        numLateDeadlines.get(nowMsSinceEpoch),
-        numDeleted.get(nowMsSinceEpoch),
-        numReleased.get(nowMsSinceEpoch),
-        numExpired.get(nowMsSinceEpoch),
-        messageSkew,
-        watermarkSkew,
-        numLateMessages.get(nowMsSinceEpoch),
-        new Instant(lastWatermarkMsSinceEpoch));
-
-    lastLogTimestampMsSinceEpoch = nowMsSinceEpoch;
-  }
-
-  /** Return the average byte size of all message read. -1 if no message read yet */
-  private long avgMessageBytes() {
-    if (!recentMessageBytes.isEmpty()) {
-      return (long) recentMessageBytes.stream().mapToDouble(s -> s).average().getAsDouble();
-    } else {
-      return -1L;
-    }
-  }
-
-  /** Extract the timestamp from the given {@code message}. */
-  private Instant getTimestamp(final Message message) {
-    return new Instant(
-        Long.parseLong(
-            message.getAttributes().get(MessageSystemAttributeName.SentTimestamp.toString())));
-  }
-
-  /** Extract the request timestamp from the given {@code message}. */
-  private Long getRequestTimeMsSinceEpoch(final Message message) {
-    return Long.parseLong(message.getMessageAttributes().get(REQUEST_TIME).getStringValue());
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sqs/SqsUnboundedSource.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sqs/SqsUnboundedSource.java
deleted file mode 100644
index 0ee9b808417..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sqs/SqsUnboundedSource.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.sqs;
-
-import com.amazonaws.services.sqs.model.Message;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import org.apache.beam.sdk.coders.Coder;
-import org.apache.beam.sdk.coders.SerializableCoder;
-import org.apache.beam.sdk.io.UnboundedSource;
-import org.apache.beam.sdk.io.aws.sqs.SqsIO.Read;
-import org.apache.beam.sdk.options.PipelineOptions;
-import org.checkerframework.checker.nullness.qual.Nullable;
-
-@SuppressWarnings({
-  "nullness" // TODO(https://github.com/apache/beam/issues/20497)
-})
-class SqsUnboundedSource extends UnboundedSource<Message, SqsCheckpointMark> {
-
-  private final Read read;
-  private final SqsConfiguration sqsConfiguration;
-  private final Coder<Message> outputCoder;
-
-  public SqsUnboundedSource(
-      Read read, SqsConfiguration sqsConfiguration, Coder<Message> outputCoder) {
-    this.read = read;
-    this.sqsConfiguration = sqsConfiguration;
-    this.outputCoder = outputCoder;
-  }
-
-  @Override
-  public List<SqsUnboundedSource> split(int desiredNumSplits, PipelineOptions options) {
-    List<SqsUnboundedSource> sources = new ArrayList<>();
-    for (int i = 0; i < Math.max(1, desiredNumSplits); ++i) {
-      sources.add(new SqsUnboundedSource(read, sqsConfiguration, outputCoder));
-    }
-    return sources;
-  }
-
-  @Override
-  public UnboundedReader<Message> createReader(
-      PipelineOptions options, @Nullable SqsCheckpointMark checkpointMark) {
-    try {
-      return new SqsUnboundedReader(this, checkpointMark);
-    } catch (IOException e) {
-      throw new RuntimeException("Unable to subscribe to " + read.queueUrl() + ": ", e);
-    }
-  }
-
-  @Override
-  public Coder<SqsCheckpointMark> getCheckpointMarkCoder() {
-    return SerializableCoder.of(SqsCheckpointMark.class);
-  }
-
-  @Override
-  public Coder<Message> getOutputCoder() {
-    return outputCoder;
-  }
-
-  public Read getRead() {
-    return read;
-  }
-
-  SqsConfiguration getSqsConfiguration() {
-    return sqsConfiguration;
-  }
-
-  @Override
-  public boolean requiresDeduping() {
-    return true;
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sqs/package-info.java b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sqs/package-info.java
deleted file mode 100644
index d688641ddff..00000000000
--- a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/sqs/package-info.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/** Defines IO connectors for Amazon Web Services SQS. */
-package org.apache.beam.sdk.io.aws.sqs;
diff --git a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/ITEnvironment.java b/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/ITEnvironment.java
deleted file mode 100644
index 3415a11bf9f..00000000000
--- a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/ITEnvironment.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws;
-
-import static org.apache.beam.sdk.testing.TestPipeline.testingPipelineOptions;
-import static org.testcontainers.containers.localstack.LocalStackContainer.Service.S3;
-
-import com.amazonaws.auth.AWSStaticCredentialsProvider;
-import com.amazonaws.auth.BasicAWSCredentials;
-import com.amazonaws.client.builder.AwsClientBuilder;
-import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration;
-import org.apache.beam.sdk.io.aws.options.AwsOptions;
-import org.apache.beam.sdk.options.Default;
-import org.apache.beam.sdk.options.Description;
-import org.apache.beam.sdk.options.PipelineOptionsFactory;
-import org.apache.beam.sdk.testing.TestPipeline;
-import org.apache.beam.sdk.testing.TestPipelineOptions;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableList;
-import org.apache.commons.lang3.StringUtils;
-import org.junit.rules.ExternalResource;
-import org.slf4j.LoggerFactory;
-import org.testcontainers.containers.localstack.LocalStackContainer;
-import org.testcontainers.containers.localstack.LocalStackContainer.Service;
-import org.testcontainers.containers.output.Slf4jLogConsumer;
-import org.testcontainers.utility.DockerImageName;
-
-/**
- * JUnit rule providing an integration testing environment for AWS as {@link ExternalResource}.
- *
- * <p>This rule is typically used as @ClassRule. It starts a Localstack container with the requested
- * AWS service and provides matching {@link AwsOptions}. The usage of localstack can also be
- * disabled using {@link ITOptions} pipeline options to run integration tests against AWS, for
- * instance:
- *
- * <pre>{@code
- * ./gradlew :sdks:java:io:amazon-web-services:integrationTest \
- *   --info \
- *   --tests "org.apache.beam.sdk.io.aws.s3.S3FileSystemIT" \
- *   -DintegrationTestPipelineOptions='["--awsRegion=eu-central-1","--useLocalstack=false"]'
- * }</pre>
- *
- * @param <OptionsT> The options type to use for the integration test.
- */
-public class ITEnvironment<OptionsT extends ITEnvironment.ITOptions> extends ExternalResource {
-  private static final String LOCALSTACK = "localstack/localstack";
-  private static final String LOCALSTACK_VERSION = "0.13.1";
-
-  public interface ITOptions extends AwsOptions, TestPipelineOptions {
-    @Description("Number of rows to write and read by the test")
-    @Default.Integer(1000)
-    Integer getNumberOfRows();
-
-    void setNumberOfRows(Integer count);
-
-    @Description("Flag if to use localstack, enabled by default.")
-    @Default.Boolean(true)
-    Boolean getUseLocalstack();
-
-    void setUseLocalstack(Boolean useLocalstack);
-
-    @Description("Localstack log level, e.g. trace, debug, info")
-    String getLocalstackLogLevel();
-
-    void setLocalstackLogLevel(String level);
-  }
-
-  private final OptionsT options;
-  private final LocalStackContainer localstack;
-
-  public ITEnvironment(Service service, Class<OptionsT> optionsClass, String... env) {
-    this(new Service[] {service}, optionsClass, env);
-  }
-
-  public ITEnvironment(Service[] services, Class<OptionsT> optionsClass, String... env) {
-    localstack =
-        new LocalStackContainer(DockerImageName.parse(LOCALSTACK).withTag(LOCALSTACK_VERSION))
-            .withServices(services)
-            .withStartupAttempts(3);
-
-    PipelineOptionsFactory.register(optionsClass);
-    options = testingPipelineOptions().as(optionsClass);
-
-    localstack.setEnv(ImmutableList.copyOf(env));
-    if (options.getLocalstackLogLevel() != null) {
-      localstack
-          .withEnv("LS_LOG", options.getLocalstackLogLevel())
-          .withLogConsumer(
-              new Slf4jLogConsumer(LoggerFactory.getLogger(StringUtils.join(services))));
-    }
-  }
-
-  public TestPipeline createTestPipeline() {
-    return TestPipeline.fromOptions(options);
-  }
-
-  public <BuilderT extends AwsClientBuilder<BuilderT, ClientT>, ClientT> ClientT buildClient(
-      BuilderT builder) {
-    if (options.getAwsServiceEndpoint() != null) {
-      builder.withEndpointConfiguration(
-          new EndpointConfiguration(options.getAwsServiceEndpoint(), options.getAwsRegion()));
-    } else {
-      builder.setRegion(options.getAwsRegion());
-    }
-    return builder.withCredentials(options.getAwsCredentialsProvider()).build();
-  }
-
-  public OptionsT options() {
-    return options;
-  }
-
-  @Override
-  protected void before() {
-    if (options.getUseLocalstack()) {
-      startLocalstack();
-    }
-  }
-
-  @Override
-  protected void after() {
-    localstack.stop(); // noop if not started
-  }
-
-  /** Necessary setup for localstack environment. */
-  private void startLocalstack() {
-    localstack.start();
-    options.setAwsServiceEndpoint(
-        localstack.getEndpointOverride(S3).toString()); // service irrelevant
-    options.setAwsRegion(localstack.getRegion());
-    options.setAwsCredentialsProvider(
-        new AWSStaticCredentialsProvider(
-            new BasicAWSCredentials(localstack.getAccessKey(), localstack.getSecretKey())));
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/coders/AwsCodersTest.java b/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/coders/AwsCodersTest.java
deleted file mode 100644
index 1ee20a6fa7e..00000000000
--- a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/coders/AwsCodersTest.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.coders;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.equalTo;
-
-import com.amazonaws.ResponseMetadata;
-import com.amazonaws.http.HttpResponse;
-import com.amazonaws.http.SdkHttpMetadata;
-import java.util.UUID;
-import org.apache.beam.sdk.util.CoderUtils;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableMap;
-import org.junit.Test;
-
-/** Tests for AWS coders. */
-public class AwsCodersTest {
-
-  @Test
-  public void testResponseMetadataDecodeEncodeEquals() throws Exception {
-    ResponseMetadata value = buildResponseMetadata();
-    ResponseMetadata clone = CoderUtils.clone(AwsCoders.responseMetadata(), value);
-    assertThat(clone.getRequestId(), equalTo(value.getRequestId()));
-  }
-
-  @Test
-  public void testSdkHttpMetadataDecodeEncodeEquals() throws Exception {
-    SdkHttpMetadata value = buildSdkHttpMetadata();
-    SdkHttpMetadata clone = CoderUtils.clone(AwsCoders.sdkHttpMetadata(), value);
-    assertThat(clone.getHttpStatusCode(), equalTo(value.getHttpStatusCode()));
-    assertThat(clone.getHttpHeaders(), equalTo(value.getHttpHeaders()));
-  }
-
-  @Test
-  public void testSdkHttpMetadataWithoutHeadersDecodeEncodeEquals() throws Exception {
-    SdkHttpMetadata value = buildSdkHttpMetadata();
-    SdkHttpMetadata clone = CoderUtils.clone(AwsCoders.sdkHttpMetadataWithoutHeaders(), value);
-    assertThat(clone.getHttpStatusCode(), equalTo(value.getHttpStatusCode()));
-    assertThat(clone.getHttpHeaders().isEmpty(), equalTo(true));
-  }
-
-  private ResponseMetadata buildResponseMetadata() {
-    return new ResponseMetadata(
-        ImmutableMap.of(ResponseMetadata.AWS_REQUEST_ID, UUID.randomUUID().toString()));
-  }
-
-  private SdkHttpMetadata buildSdkHttpMetadata() {
-    HttpResponse httpResponse = new HttpResponse(null, null);
-    httpResponse.setStatusCode(200);
-    httpResponse.addHeader("Content-Type", "application/json");
-    return SdkHttpMetadata.from(httpResponse);
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/dynamodb/AttributeValueCoderTest.java b/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/dynamodb/AttributeValueCoderTest.java
deleted file mode 100644
index 489feb7a87c..00000000000
--- a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/dynamodb/AttributeValueCoderTest.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.dynamodb;
-
-import com.amazonaws.services.dynamodbv2.model.AttributeValue;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableList;
-import org.junit.Assert;
-import org.junit.Test;
-
-/** Unit test cases for each type of AttributeValue to test encoding and decoding. */
-public class AttributeValueCoderTest {
-
-  @Test
-  public void shouldPassForStringType() throws IOException {
-    AttributeValue expected = new AttributeValue();
-    expected.setS("testing");
-
-    AttributeValueCoder coder = AttributeValueCoder.of();
-    ByteArrayOutputStream output = new ByteArrayOutputStream();
-    coder.encode(expected, output);
-
-    ByteArrayInputStream in = new ByteArrayInputStream(output.toByteArray());
-
-    AttributeValue actual = coder.decode(in);
-
-    Assert.assertEquals(expected, actual);
-  }
-
-  @Test
-  public void shouldPassForNumberType() throws IOException {
-    AttributeValue expected = new AttributeValue();
-    expected.setN("123");
-
-    AttributeValueCoder coder = AttributeValueCoder.of();
-    ByteArrayOutputStream output = new ByteArrayOutputStream();
-    coder.encode(expected, output);
-
-    ByteArrayInputStream in = new ByteArrayInputStream(output.toByteArray());
-
-    AttributeValue actual = coder.decode(in);
-
-    Assert.assertEquals(expected, actual);
-  }
-
-  @Test
-  public void shouldPassForBooleanType() throws IOException {
-    AttributeValue expected = new AttributeValue();
-    expected.setBOOL(false);
-
-    AttributeValueCoder coder = AttributeValueCoder.of();
-    ByteArrayOutputStream output = new ByteArrayOutputStream();
-    coder.encode(expected, output);
-
-    ByteArrayInputStream in = new ByteArrayInputStream(output.toByteArray());
-
-    AttributeValue actual = coder.decode(in);
-
-    Assert.assertEquals(expected, actual);
-  }
-
-  @Test
-  public void shouldPassForByteArray() throws IOException {
-    AttributeValue expected = new AttributeValue();
-    expected.setB(ByteBuffer.wrap("hello".getBytes(StandardCharsets.UTF_8)));
-
-    AttributeValueCoder coder = AttributeValueCoder.of();
-    ByteArrayOutputStream output = new ByteArrayOutputStream();
-    coder.encode(expected, output);
-
-    ByteArrayInputStream in = new ByteArrayInputStream(output.toByteArray());
-
-    AttributeValue actual = coder.decode(in);
-
-    Assert.assertEquals(expected, actual);
-  }
-
-  @Test
-  public void shouldPassForListOfString() throws IOException {
-    AttributeValue expected = new AttributeValue();
-    expected.setSS(ImmutableList.of("foo", "bar"));
-
-    AttributeValueCoder coder = AttributeValueCoder.of();
-    ByteArrayOutputStream output = new ByteArrayOutputStream();
-    coder.encode(expected, output);
-
-    ByteArrayInputStream in = new ByteArrayInputStream(output.toByteArray());
-
-    AttributeValue actual = coder.decode(in);
-
-    Assert.assertEquals(expected, actual);
-  }
-
-  @Test
-  public void shouldPassForOneListOfNumber() throws IOException {
-    AttributeValue expected = new AttributeValue();
-    expected.setNS(ImmutableList.of("123", "456"));
-
-    AttributeValueCoder coder = AttributeValueCoder.of();
-    ByteArrayOutputStream output = new ByteArrayOutputStream();
-    coder.encode(expected, output);
-
-    ByteArrayInputStream in = new ByteArrayInputStream(output.toByteArray());
-
-    AttributeValue actual = coder.decode(in);
-
-    Assert.assertEquals(expected, actual);
-  }
-
-  @Test
-  public void shouldPassForOneListOfByteArray() throws IOException {
-    AttributeValue expected = new AttributeValue();
-    expected.setBS(
-        ImmutableList.of(
-            ByteBuffer.wrap("mylistbyte1".getBytes(StandardCharsets.UTF_8)),
-            ByteBuffer.wrap("mylistbyte2".getBytes(StandardCharsets.UTF_8))));
-
-    AttributeValueCoder coder = AttributeValueCoder.of();
-    ByteArrayOutputStream output = new ByteArrayOutputStream();
-    coder.encode(expected, output);
-
-    ByteArrayInputStream in = new ByteArrayInputStream(output.toByteArray());
-
-    AttributeValue actual = coder.decode(in);
-
-    Assert.assertEquals(expected, actual);
-  }
-
-  @Test
-  public void shouldPassForListType() throws IOException {
-    AttributeValue expected = new AttributeValue();
-
-    List<AttributeValue> listAttr = new ArrayList<>();
-    listAttr.add(new AttributeValue("innerMapValue1"));
-    listAttr.add(new AttributeValue().withN("8976234"));
-
-    expected.setL(listAttr);
-
-    AttributeValueCoder coder = AttributeValueCoder.of();
-    ByteArrayOutputStream output = new ByteArrayOutputStream();
-    coder.encode(expected, output);
-
-    ByteArrayInputStream in = new ByteArrayInputStream(output.toByteArray());
-
-    AttributeValue actual = coder.decode(in);
-
-    Assert.assertEquals(expected, actual);
-  }
-
-  @Test
-  public void shouldPassForMapType() throws IOException {
-    AttributeValue expected = new AttributeValue();
-
-    Map<String, AttributeValue> attrMap = new HashMap<>();
-    attrMap.put("innerMapAttr1", new AttributeValue("innerMapValue1"));
-    attrMap.put(
-        "innerMapAttr2",
-        new AttributeValue().withB(ByteBuffer.wrap("8976234".getBytes(StandardCharsets.UTF_8))));
-
-    expected.setM(attrMap);
-
-    AttributeValueCoder coder = AttributeValueCoder.of();
-    ByteArrayOutputStream output = new ByteArrayOutputStream();
-    coder.encode(expected, output);
-
-    ByteArrayInputStream in = new ByteArrayInputStream(output.toByteArray());
-
-    AttributeValue actual = coder.decode(in);
-
-    Assert.assertEquals(expected, actual);
-  }
-
-  @Test
-  public void shouldPassForNullType() throws IOException {
-    AttributeValue expected = new AttributeValue();
-    expected.setNULL(true);
-
-    AttributeValueCoder coder = AttributeValueCoder.of();
-    ByteArrayOutputStream output = new ByteArrayOutputStream();
-    coder.encode(expected, output);
-
-    ByteArrayInputStream in = new ByteArrayInputStream(output.toByteArray());
-
-    AttributeValue actual = coder.decode(in);
-
-    Assert.assertEquals(expected, actual);
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/dynamodb/DynamoDBIOIT.java b/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/dynamodb/DynamoDBIOIT.java
deleted file mode 100644
index e3aa62450ce..00000000000
--- a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/dynamodb/DynamoDBIOIT.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.dynamodb;
-
-import static org.apache.beam.sdk.io.common.TestRow.getExpectedHashForRowCount;
-import static org.apache.beam.sdk.values.TypeDescriptors.strings;
-import static org.testcontainers.containers.localstack.LocalStackContainer.Service.DYNAMODB;
-
-import com.amazonaws.auth.AWSCredentials;
-import com.amazonaws.regions.Regions;
-import com.amazonaws.services.dynamodbv2.AmazonDynamoDB;
-import com.amazonaws.services.dynamodbv2.AmazonDynamoDBClientBuilder;
-import com.amazonaws.services.dynamodbv2.model.AttributeDefinition;
-import com.amazonaws.services.dynamodbv2.model.AttributeValue;
-import com.amazonaws.services.dynamodbv2.model.CreateTableRequest;
-import com.amazonaws.services.dynamodbv2.model.KeySchemaElement;
-import com.amazonaws.services.dynamodbv2.model.KeyType;
-import com.amazonaws.services.dynamodbv2.model.ProvisionedThroughput;
-import com.amazonaws.services.dynamodbv2.model.PutRequest;
-import com.amazonaws.services.dynamodbv2.model.ScalarAttributeType;
-import com.amazonaws.services.dynamodbv2.model.ScanRequest;
-import com.amazonaws.services.dynamodbv2.model.TableStatus;
-import com.amazonaws.services.dynamodbv2.model.WriteRequest;
-import java.util.Map;
-import org.apache.beam.sdk.io.GenerateSequence;
-import org.apache.beam.sdk.io.aws.ITEnvironment;
-import org.apache.beam.sdk.io.common.HashingFn;
-import org.apache.beam.sdk.io.common.TestRow;
-import org.apache.beam.sdk.io.common.TestRow.DeterministicallyConstructTestRowFn;
-import org.apache.beam.sdk.options.Default;
-import org.apache.beam.sdk.options.Description;
-import org.apache.beam.sdk.testing.PAssert;
-import org.apache.beam.sdk.testing.TestPipeline;
-import org.apache.beam.sdk.transforms.Combine;
-import org.apache.beam.sdk.transforms.Count;
-import org.apache.beam.sdk.transforms.Flatten;
-import org.apache.beam.sdk.transforms.MapElements;
-import org.apache.beam.sdk.transforms.ParDo;
-import org.apache.beam.sdk.values.KV;
-import org.apache.beam.sdk.values.PCollection;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableMap;
-import org.junit.ClassRule;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExternalResource;
-import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
-
-@RunWith(JUnit4.class)
-/**
- * Integration test to write and read from DynamoDB.
- *
- * <p>By default this runs against Localstack, but you can use {@link DynamoDBIOIT.ITOptions} to
- * configure tests to run against AWS DynamoDB.
- *
- * <pre>{@code
- * ./gradlew :sdks:java:io:amazon-web-services:integrationTest \
- *   --info \
- *   --tests "org.apache.beam.sdk.io.aws.dynamodb.DynamoDBIOIT" \
- *   -DintegrationTestPipelineOptions='["--awsRegion=eu-central-1","--useLocalstack=false"]'
- * }</pre>
- */
-public class DynamoDBIOIT {
-  public interface ITOptions extends ITEnvironment.ITOptions {
-    @Description("DynamoDB table name")
-    @Default.String("beam-dynamodbio-it")
-    String getDynamoDBTable();
-
-    void setDynamoDBTable(String value);
-
-    @Description("DynamoDB total segments")
-    @Default.Integer(2)
-    Integer getDynamoDBSegments();
-
-    void setDynamoDBSegments(Integer segments);
-
-    @Description("Create DynamoDB table. Enabled when using localstack")
-    @Default.Boolean(false)
-    Boolean getCreateTable();
-
-    void setCreateTable(Boolean createTable);
-  }
-
-  private static final String COL_ID = "id";
-  private static final String COL_NAME = "name";
-
-  @ClassRule
-  public static ITEnvironment<ITOptions> env =
-      new ITEnvironment<>(DYNAMODB, ITOptions.class, "DYNAMODB_ERROR_PROBABILITY=0.1");
-
-  @Rule public TestPipeline pipelineWrite = env.createTestPipeline();
-  @Rule public TestPipeline pipelineRead = env.createTestPipeline();
-  @Rule public ExternalResource dbTable = CreateDbTable.optionally(env.options());
-
-  /** Test which write and then read data from DynamoDB. */
-  @Test
-  public void testWriteThenRead() {
-    runWrite();
-    runRead();
-  }
-
-  /** Write test dataset to DynamoDB. */
-  private void runWrite() {
-    int rows = env.options().getNumberOfRows();
-    pipelineWrite
-        .apply("Generate Sequence", GenerateSequence.from(0).to(rows))
-        .apply("Prepare TestRows", ParDo.of(new DeterministicallyConstructTestRowFn()))
-        .apply(
-            "Write to DynamoDB",
-            DynamoDBIO.<TestRow>write()
-                .withAwsClientsProvider(clientProvider())
-                .withWriteRequestMapperFn(row -> buildWriteRequest(row)));
-    pipelineWrite.run().waitUntilFinish();
-  }
-
-  /** Read test dataset from DynamoDB. */
-  private void runRead() {
-    int rows = env.options().getNumberOfRows();
-    PCollection<Map<String, AttributeValue>> records =
-        pipelineRead
-            .apply(
-                "Read from DynamoDB",
-                DynamoDBIO.read()
-                    .withAwsClientsProvider(clientProvider())
-                    .withScanRequestFn(in -> buildScanRequest())
-                    .items())
-            .apply("Flatten result", Flatten.iterables());
-
-    PAssert.thatSingleton(records.apply("Count All", Count.globally())).isEqualTo((long) rows);
-
-    PCollection<String> consolidatedHashcode =
-        records
-            .apply(MapElements.into(strings()).via(record -> record.get(COL_NAME).getS()))
-            .apply("Hash records", Combine.globally(new HashingFn()).withoutDefaults());
-
-    PAssert.that(consolidatedHashcode).containsInAnyOrder(getExpectedHashForRowCount(rows));
-
-    pipelineRead.run().waitUntilFinish();
-  }
-
-  private AwsClientsProvider clientProvider() {
-    AWSCredentials credentials = env.options().getAwsCredentialsProvider().getCredentials();
-    return new BasicDynamoDBProvider(
-        credentials.getAWSAccessKeyId(),
-        credentials.getAWSSecretKey(),
-        Regions.fromName(env.options().getAwsRegion()),
-        env.options().getAwsServiceEndpoint());
-  }
-
-  private static ScanRequest buildScanRequest() {
-    return new ScanRequest(env.options().getDynamoDBTable())
-        .withTotalSegments(env.options().getDynamoDBSegments());
-  }
-
-  private static KV<String, WriteRequest> buildWriteRequest(TestRow row) {
-    AttributeValue id = new AttributeValue().withN(row.id().toString());
-    AttributeValue name = new AttributeValue().withS(row.name());
-    PutRequest req = new PutRequest(ImmutableMap.of(COL_ID, id, COL_NAME, name));
-    return KV.of(env.options().getDynamoDBTable(), new WriteRequest().withPutRequest(req));
-  }
-
-  static class CreateDbTable extends ExternalResource {
-    static ExternalResource optionally(ITOptions opts) {
-      boolean create = opts.getCreateTable() || opts.getUseLocalstack();
-      return create ? new CreateDbTable() : new ExternalResource() {};
-    }
-
-    private final String name = env.options().getDynamoDBTable();
-    private final AmazonDynamoDB client = env.buildClient(AmazonDynamoDBClientBuilder.standard());
-
-    @Override
-    protected void before() throws Throwable {
-      CreateTableRequest request =
-          new CreateTableRequest()
-              .withTableName(name)
-              .withAttributeDefinitions(
-                  attribute(COL_ID, ScalarAttributeType.N),
-                  attribute(COL_NAME, ScalarAttributeType.S))
-              .withKeySchema(keyElement(COL_ID, KeyType.HASH), keyElement(COL_NAME, KeyType.RANGE))
-              .withProvisionedThroughput(new ProvisionedThroughput(1000L, 1000L));
-      String status = client.createTable(request).getTableDescription().getTableStatus();
-      int attempts = 10;
-      for (int i = 0; i <= attempts; ++i) {
-        if (status.equals(TableStatus.ACTIVE.toString())) {
-          return;
-        }
-        Thread.sleep(1000L);
-        status = client.describeTable(name).getTable().getTableStatus();
-      }
-      throw new RuntimeException("Unable to initialize table");
-    }
-
-    @Override
-    protected void after() {
-      client.deleteTable(name);
-      client.shutdown();
-    }
-
-    private AttributeDefinition attribute(String name, ScalarAttributeType type) {
-      return new AttributeDefinition(name, type);
-    }
-
-    private KeySchemaElement keyElement(String name, KeyType type) {
-      return new KeySchemaElement(name, type);
-    }
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/dynamodb/DynamoDBIOReadTest.java b/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/dynamodb/DynamoDBIOReadTest.java
deleted file mode 100644
index 27e2a84076b..00000000000
--- a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/dynamodb/DynamoDBIOReadTest.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.dynamodb;
-
-import static java.lang.Math.min;
-import static java.util.stream.Collectors.toList;
-import static java.util.stream.IntStream.range;
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.Iterables.getLast;
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.Lists.newArrayList;
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.Lists.transform;
-import static org.mockito.ArgumentMatchers.argThat;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import com.amazonaws.services.dynamodbv2.AmazonDynamoDB;
-import com.amazonaws.services.dynamodbv2.model.AttributeValue;
-import com.amazonaws.services.dynamodbv2.model.ScanRequest;
-import com.amazonaws.services.dynamodbv2.model.ScanResult;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.stream.IntStream;
-import org.apache.beam.sdk.testing.PAssert;
-import org.apache.beam.sdk.testing.TestPipeline;
-import org.apache.beam.sdk.transforms.Count;
-import org.apache.beam.sdk.transforms.Flatten;
-import org.apache.beam.sdk.values.PCollection;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableMap;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-import org.junit.runner.RunWith;
-import org.mockito.ArgumentMatcher;
-import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
-
-@RunWith(MockitoJUnitRunner.class)
-public class DynamoDBIOReadTest {
-  private static final String tableName = "Test";
-
-  @Rule public final TestPipeline pipeline = TestPipeline.create();
-  @Rule public final ExpectedException thrown = ExpectedException.none();
-  @Mock public AmazonDynamoDB client;
-
-  @Test
-  public void testReadOneSegment() {
-    MockData mockData = new MockData(range(0, 10));
-    mockData.mockScan(10, client); // 1 scan iteration
-
-    PCollection<List<Map<String, AttributeValue>>> actual =
-        pipeline.apply(
-            DynamoDBIO.<List<Map<String, AttributeValue>>>read()
-                .withAwsClientsProvider(StaticAwsClientsProvider.of(client))
-                .withScanRequestFn(
-                    in -> new ScanRequest().withTableName(tableName).withTotalSegments(1))
-                .items());
-
-    PAssert.that(actual.apply(Count.globally())).containsInAnyOrder(1L);
-    PAssert.that(actual).containsInAnyOrder(mockData.getAllItems());
-
-    pipeline.run().waitUntilFinish();
-  }
-
-  @Test
-  public void testReadWithCustomLimit() {
-    final int requestedLimit = 100;
-    MockData mockData = new MockData(range(0, 10));
-    mockData.mockScan(requestedLimit, client); // 1 scan iteration
-
-    pipeline.apply(
-        DynamoDBIO.<List<Map<String, AttributeValue>>>read()
-            .withAwsClientsProvider(StaticAwsClientsProvider.of(client))
-            .withScanRequestFn(
-                in ->
-                    new ScanRequest()
-                        .withTableName(tableName)
-                        .withTotalSegments(1)
-                        .withLimit(requestedLimit))
-            .items());
-
-    pipeline.run().waitUntilFinish();
-
-    verify(client).scan(argThat((ScanRequest req) -> requestedLimit == req.getLimit()));
-  }
-
-  @Test
-  public void testReadThreeSegments() {
-    MockData mockData = new MockData(range(0, 10), range(10, 20), range(20, 30));
-    mockData.mockScan(10, client); // 1 scan iteration per segment
-
-    PCollection<List<Map<String, AttributeValue>>> actual =
-        pipeline.apply(
-            DynamoDBIO.<List<Map<String, AttributeValue>>>read()
-                .withAwsClientsProvider(StaticAwsClientsProvider.of(client))
-                .withScanRequestFn(
-                    in -> new ScanRequest().withTableName(tableName).withTotalSegments(3))
-                .items());
-
-    PAssert.that(actual.apply(Count.globally())).containsInAnyOrder(3L);
-    PAssert.that(actual.apply(Flatten.iterables())).containsInAnyOrder(mockData.getAllItems());
-
-    pipeline.run().waitUntilFinish();
-  }
-
-  @Test
-  public void testReadWithStartKey() {
-    MockData mockData = new MockData(range(0, 10), range(20, 32));
-    mockData.mockScan(5, client); // 2 + 3 scan iterations
-
-    PCollection<List<Map<String, AttributeValue>>> actual =
-        pipeline.apply(
-            DynamoDBIO.<List<Map<String, AttributeValue>>>read()
-                .withAwsClientsProvider(StaticAwsClientsProvider.of(client))
-                .withScanRequestFn(
-                    in -> new ScanRequest().withTableName(tableName).withTotalSegments(2))
-                .items());
-
-    PAssert.that(actual.apply(Count.globally())).containsInAnyOrder(5L);
-    PAssert.that(actual.apply(Flatten.iterables())).containsInAnyOrder(mockData.getAllItems());
-
-    pipeline.run().waitUntilFinish();
-  }
-
-  @Test
-  public void testReadMissingScanRequestFn() {
-    pipeline.enableAbandonedNodeEnforcement(false);
-    thrown.expect(IllegalArgumentException.class);
-    thrown.expectMessage("withScanRequestFn() is required");
-
-    pipeline.apply(DynamoDBIO.read().withAwsClientsProvider(StaticAwsClientsProvider.of(client)));
-  }
-
-  @Test
-  public void testReadMissingAwsClientsProvider() {
-    pipeline.enableAbandonedNodeEnforcement(false);
-    thrown.expect(IllegalArgumentException.class);
-    thrown.expectMessage("withAwsClientsProvider() is required");
-
-    pipeline.apply(DynamoDBIO.read().withScanRequestFn(in -> new ScanRequest()));
-  }
-
-  @Test
-  public void testReadMissingTotalSegments() {
-    pipeline.enableAbandonedNodeEnforcement(false);
-    thrown.expect(IllegalArgumentException.class);
-    thrown.expectMessage("TotalSegments is required with withScanRequestFn() and greater zero");
-
-    pipeline.apply(
-        DynamoDBIO.read()
-            .withAwsClientsProvider(StaticAwsClientsProvider.of(client))
-            .withScanRequestFn(in -> new ScanRequest()));
-  }
-
-  @Test
-  public void testReadInvalidTotalSegments() {
-    pipeline.enableAbandonedNodeEnforcement(false);
-    thrown.expect(IllegalArgumentException.class);
-    thrown.expectMessage("TotalSegments is required with withScanRequestFn() and greater zero");
-
-    pipeline.apply(
-        DynamoDBIO.read()
-            .withAwsClientsProvider(StaticAwsClientsProvider.of(client))
-            .withScanRequestFn(in -> new ScanRequest().withTotalSegments(0)));
-  }
-
-  private static class MockData {
-    private final List<List<Integer>> data;
-
-    MockData(IntStream... segments) {
-      data = Arrays.stream(segments).map(ids -> newArrayList(ids.iterator())).collect(toList());
-    }
-
-    List<Map<String, AttributeValue>> getAllItems() {
-      return data.stream().flatMap(ids -> ids.stream()).map(id -> item(id)).collect(toList());
-    }
-
-    void mockScan(int sizeLimit, AmazonDynamoDB mock) {
-      for (int segment = 0; segment < data.size(); segment++) {
-        List<Integer> ids = data.get(segment);
-
-        List<Map<String, AttributeValue>> items = null;
-        Map<String, AttributeValue> startKey, lastKey;
-        for (int start = 0; start < ids.size(); start += sizeLimit) {
-          startKey = items != null ? getLast(items) : null;
-          items = transform(ids.subList(start, min(ids.size(), start + sizeLimit)), id -> item(id));
-          lastKey = start + sizeLimit < ids.size() ? getLast(items) : null;
-
-          when(mock.scan(argThat(matchesScanRequest(segment, startKey))))
-              .thenReturn(new ScanResult().withItems(items).withLastEvaluatedKey(lastKey));
-        }
-      }
-    }
-
-    ArgumentMatcher<ScanRequest> matchesScanRequest(
-        Integer segment, Map<String, AttributeValue> startKey) {
-      return req ->
-          req != null
-              && segment.equals(req.getSegment())
-              && Objects.equals(startKey, req.getExclusiveStartKey());
-    }
-  }
-
-  private static Map<String, AttributeValue> item(int id) {
-    return ImmutableMap.of(
-        "rangeKey", new AttributeValue().withN(String.valueOf(id)),
-        "hashKey", new AttributeValue().withS(String.valueOf(id)));
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/dynamodb/DynamoDBIOWriteTest.java b/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/dynamodb/DynamoDBIOWriteTest.java
deleted file mode 100644
index e49276ed4c4..00000000000
--- a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/dynamodb/DynamoDBIOWriteTest.java
+++ /dev/null
@@ -1,430 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.dynamodb;
-
-import static java.util.stream.Collectors.toList;
-import static java.util.stream.IntStream.range;
-import static java.util.stream.IntStream.rangeClosed;
-import static org.apache.beam.sdk.io.aws.dynamodb.DynamoDBIO.Write.WriteFn.RETRY_ERROR_LOG;
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.Maps.filterKeys;
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.Maps.transformValues;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.argThat;
-import static org.mockito.Mockito.inOrder;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import com.amazonaws.services.dynamodbv2.AmazonDynamoDB;
-import com.amazonaws.services.dynamodbv2.model.AmazonDynamoDBException;
-import com.amazonaws.services.dynamodbv2.model.AttributeValue;
-import com.amazonaws.services.dynamodbv2.model.BatchWriteItemRequest;
-import com.amazonaws.services.dynamodbv2.model.BatchWriteItemResult;
-import com.amazonaws.services.dynamodbv2.model.DeleteRequest;
-import com.amazonaws.services.dynamodbv2.model.PutRequest;
-import com.amazonaws.services.dynamodbv2.model.WriteRequest;
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.function.Function;
-import java.util.function.Supplier;
-import java.util.stream.IntStream;
-import org.apache.beam.sdk.Pipeline;
-import org.apache.beam.sdk.PipelineResult;
-import org.apache.beam.sdk.coders.DefaultCoder;
-import org.apache.beam.sdk.extensions.avro.coders.AvroCoder;
-import org.apache.beam.sdk.io.aws.dynamodb.DynamoDBIO.RetryConfiguration;
-import org.apache.beam.sdk.io.aws.dynamodb.DynamoDBIO.Write.WriteFn;
-import org.apache.beam.sdk.testing.ExpectedLogs;
-import org.apache.beam.sdk.testing.PAssert;
-import org.apache.beam.sdk.testing.TestPipeline;
-import org.apache.beam.sdk.transforms.Create;
-import org.apache.beam.sdk.transforms.DoFn;
-import org.apache.beam.sdk.transforms.ParDo;
-import org.apache.beam.sdk.transforms.SerializableBiFunction;
-import org.apache.beam.sdk.transforms.SerializableFunction;
-import org.apache.beam.sdk.values.KV;
-import org.apache.beam.sdk.values.PCollection;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableList;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableMap;
-import org.joda.time.Duration;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-import org.junit.runner.RunWith;
-import org.mockito.ArgumentCaptor;
-import org.mockito.ArgumentMatcher;
-import org.mockito.InOrder;
-import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
-import org.slf4j.helpers.MessageFormatter;
-
-@RunWith(MockitoJUnitRunner.class)
-public class DynamoDBIOWriteTest {
-  private static final String tableName = "Test";
-
-  @Rule public final TestPipeline pipeline = TestPipeline.create();
-  @Rule public final ExpectedLogs writeFnLogs = ExpectedLogs.none(WriteFn.class);
-  @Rule public final ExpectedException thrown = ExpectedException.none();
-
-  @Mock public AmazonDynamoDB client;
-
-  @Test
-  public void testWritePutItems() {
-    List<Item> items = Item.range(0, 100);
-
-    Supplier<List<Item>> capturePuts =
-        captureBatchWrites(client, req -> req.getPutRequest().getItem());
-
-    PCollection<Void> output =
-        pipeline
-            .apply(Create.of(items))
-            .apply(
-                DynamoDBIO.<Item>write()
-                    .withWriteRequestMapperFn(putRequestMapper)
-                    .withAwsClientsProvider(StaticAwsClientsProvider.of(client)));
-
-    PAssert.that(output).empty();
-    pipeline.run().waitUntilFinish();
-
-    assertThat(capturePuts.get()).containsExactlyInAnyOrderElementsOf(items);
-  }
-
-  @Test
-  public void testWritePutItemsWithDuplicates() {
-    List<Item> items = Item.range(0, 100);
-
-    Supplier<List<List<Item>>> captureRequests =
-        captureBatchWriteRequests(client, req -> req.getPutRequest().getItem());
-
-    pipeline
-        .apply(Create.of(items))
-        // generate identical duplicates
-        .apply(ParDo.of(new AddDuplicatesDoFn(3, false)))
-        .apply(
-            DynamoDBIO.<Item>write()
-                .withWriteRequestMapperFn(putRequestMapper)
-                .withAwsClientsProvider(StaticAwsClientsProvider.of(client)));
-
-    pipeline.run().waitUntilFinish();
-
-    List<List<Item>> requests = captureRequests.get();
-    for (List<Item> reqItems : requests) {
-      assertThat(reqItems).doesNotHaveDuplicates(); // each request is free of duplicates
-    }
-
-    assertThat(requests.stream().flatMap(List::stream)).containsAll(items);
-  }
-
-  @Test
-  public void testWritePutItemsWithDuplicatesByKey() {
-    ImmutableList<String> keys = ImmutableList.of("id");
-    List<Item> items = Item.range(0, 100);
-
-    Supplier<List<List<Item>>> captureRequests =
-        captureBatchWriteRequests(client, req -> req.getPutRequest().getItem());
-
-    pipeline
-        .apply(Create.of(items))
-        // decorate duplicates so they are different
-        .apply(ParDo.of(new AddDuplicatesDoFn(3, true)))
-        .apply(
-            DynamoDBIO.<Item>write()
-                .withWriteRequestMapperFn(putRequestMapper)
-                .withAwsClientsProvider(StaticAwsClientsProvider.of(client))
-                .withDeduplicateKeys(keys));
-
-    pipeline.run().waitUntilFinish();
-
-    List<List<Item>> requests = captureRequests.get();
-    for (List<Item> reqItems : requests) {
-      List<Item> keysOnly =
-          reqItems.stream()
-              .map(item -> new Item(filterKeys(item.entries, keys::contains)))
-              .collect(toList());
-      assertThat(keysOnly).doesNotHaveDuplicates(); // each request is free of duplicates
-    }
-
-    assertThat(requests.stream().flatMap(List::stream)).containsAll(items);
-  }
-
-  @Test
-  public void testWriteDeleteItems() {
-    List<Item> items = Item.range(0, 100);
-
-    Supplier<List<Item>> captureDeletes =
-        captureBatchWrites(client, req -> req.getDeleteRequest().getKey());
-
-    PCollection<Void> output =
-        pipeline
-            .apply(Create.of(items))
-            .apply(
-                DynamoDBIO.<Item>write()
-                    .withWriteRequestMapperFn(deleteRequestMapper)
-                    .withAwsClientsProvider(StaticAwsClientsProvider.of(client)));
-
-    PAssert.that(output).empty();
-    pipeline.run().waitUntilFinish();
-
-    assertThat(captureDeletes.get()).hasSize(100);
-    assertThat(captureDeletes.get()).containsExactlyInAnyOrderElementsOf(items);
-  }
-
-  @Test
-  public void testWriteDeleteItemsWithDuplicates() {
-    List<Item> items = Item.range(0, 100);
-
-    Supplier<List<List<Item>>> captureRequests =
-        captureBatchWriteRequests(client, req -> req.getDeleteRequest().getKey());
-
-    pipeline
-        .apply(Create.of(items))
-        // generate identical duplicates
-        .apply(ParDo.of(new AddDuplicatesDoFn(3, false)))
-        .apply(
-            DynamoDBIO.<Item>write()
-                .withWriteRequestMapperFn(deleteRequestMapper)
-                .withAwsClientsProvider(StaticAwsClientsProvider.of(client)));
-
-    pipeline.run().waitUntilFinish();
-
-    List<List<Item>> requests = captureRequests.get();
-    for (List<Item> reqItems : requests) {
-      assertThat(reqItems).doesNotHaveDuplicates(); // each request is free of duplicates
-    }
-
-    assertThat(requests.stream().flatMap(List::stream)).containsAll(items);
-  }
-
-  @Test
-  public void testWritePutItemsWithRetrySuccess() {
-    when(client.batchWriteItem(any(BatchWriteItemRequest.class)))
-        .thenThrow(
-            AmazonDynamoDBException.class,
-            AmazonDynamoDBException.class,
-            AmazonDynamoDBException.class)
-        .thenReturn(new BatchWriteItemResult().withUnprocessedItems(ImmutableMap.of()));
-
-    pipeline
-        .apply(Create.of(Item.of(1)))
-        .apply(
-            "write",
-            DynamoDBIO.<Item>write()
-                .withWriteRequestMapperFn(putRequestMapper)
-                .withAwsClientsProvider(StaticAwsClientsProvider.of(client))
-                .withRetryConfiguration(try4Times));
-
-    PipelineResult result = pipeline.run();
-    result.waitUntilFinish();
-
-    verify(client, times(4)).batchWriteItem(any(BatchWriteItemRequest.class));
-  }
-
-  @Test
-  public void testWritePutItemsWithPartialSuccess() {
-    List<WriteRequest> writes = putRequests(Item.range(0, 10));
-
-    when(client.batchWriteItem(any(BatchWriteItemRequest.class)))
-        .thenReturn(partialWriteSuccess(writes.subList(4, 10)))
-        .thenReturn(partialWriteSuccess(writes.subList(8, 10)))
-        .thenReturn(new BatchWriteItemResult().withUnprocessedItems(ImmutableMap.of()));
-
-    pipeline
-        .apply(Create.of(10)) // number if items to produce
-        .apply(ParDo.of(new GenerateItems())) // 10 items in one bundle
-        .apply(
-            "write",
-            DynamoDBIO.<Item>write()
-                .withWriteRequestMapperFn(putRequestMapper)
-                .withAwsClientsProvider(StaticAwsClientsProvider.of(client))
-                .withRetryConfiguration(try4Times));
-
-    PipelineResult result = pipeline.run();
-    result.waitUntilFinish();
-
-    verify(client, times(3)).batchWriteItem(any(BatchWriteItemRequest.class));
-
-    InOrder ordered = inOrder(client);
-    ordered.verify(client).batchWriteItem(argThat(matchWritesUnordered(writes)));
-    ordered.verify(client).batchWriteItem(argThat(matchWritesUnordered(writes.subList(4, 10))));
-    ordered.verify(client).batchWriteItem(argThat(matchWritesUnordered(writes.subList(8, 10))));
-  }
-
-  @Test
-  public void testWritePutItemsWithRetryFailure() throws Throwable {
-    thrown.expect(IOException.class);
-    thrown.expectMessage("Error writing to DynamoDB");
-    thrown.expectMessage("No more attempts allowed");
-
-    when(client.batchWriteItem(any(BatchWriteItemRequest.class)))
-        .thenThrow(AmazonDynamoDBException.class);
-
-    pipeline
-        .apply(Create.of(Item.of(1)))
-        .apply(
-            DynamoDBIO.<Item>write()
-                .withWriteRequestMapperFn(putRequestMapper)
-                .withAwsClientsProvider(StaticAwsClientsProvider.of(client))
-                .withRetryConfiguration(try4Times));
-
-    try {
-      pipeline.run().waitUntilFinish();
-    } catch (final Pipeline.PipelineExecutionException e) {
-      verify(client, times(4)).batchWriteItem(any(BatchWriteItemRequest.class));
-      writeFnLogs.verifyWarn(MessageFormatter.format(RETRY_ERROR_LOG, 4, "").getMessage());
-      throw e.getCause();
-    }
-  }
-
-  @DefaultCoder(AvroCoder.class)
-  static class Item implements Serializable {
-    Map<String, String> entries;
-
-    private Item() {}
-
-    private Item(Map<String, String> entries) {
-      this.entries = entries;
-    }
-
-    static Item of(int id) {
-      return new Item(ImmutableMap.of("id", String.valueOf(id)));
-    }
-
-    static Item of(Map<String, AttributeValue> attributes) {
-      return new Item(ImmutableMap.copyOf(transformValues(attributes, a -> a.getS())));
-    }
-
-    static List<Item> range(int startInclusive, int endExclusive) {
-      return IntStream.range(startInclusive, endExclusive).mapToObj(Item::of).collect(toList());
-    }
-
-    Item withEntry(String key, String value) {
-      return new Item(
-          ImmutableMap.<String, String>builder().putAll(entries).put(key, value).build());
-    }
-
-    Map<String, AttributeValue> attributeMap() {
-      return new HashMap<>(transformValues(entries, v -> new AttributeValue().withS(v)));
-    }
-
-    @Override
-    public boolean equals(Object o) {
-      if (this == o) {
-        return true;
-      }
-      if (o == null || getClass() != o.getClass()) {
-        return false;
-      }
-      return Objects.equals(entries, ((Item) o).entries);
-    }
-
-    @Override
-    public int hashCode() {
-      return Objects.hash(entries);
-    }
-
-    @Override
-    public String toString() {
-      return "Item" + entries;
-    }
-  }
-
-  private Supplier<List<List<Item>>> captureBatchWriteRequests(
-      AmazonDynamoDB mock, Function<WriteRequest, Map<String, AttributeValue>> extractor) {
-    ArgumentCaptor<BatchWriteItemRequest> reqCaptor =
-        ArgumentCaptor.forClass(BatchWriteItemRequest.class);
-    when(mock.batchWriteItem(reqCaptor.capture()))
-        .thenReturn(new BatchWriteItemResult().withUnprocessedItems(ImmutableMap.of()));
-
-    return () ->
-        reqCaptor.getAllValues().stream()
-            .flatMap(req -> req.getRequestItems().values().stream())
-            .map(writes -> writes.stream().map(extractor).map(Item::of).collect(toList()))
-            .collect(toList());
-  }
-
-  private Supplier<List<Item>> captureBatchWrites(
-      AmazonDynamoDB mock, Function<WriteRequest, Map<String, AttributeValue>> extractor) {
-    Supplier<List<List<Item>>> requests = captureBatchWriteRequests(mock, extractor);
-    return () -> requests.get().stream().flatMap(reqs -> reqs.stream()).collect(toList());
-  }
-
-  private static ArgumentMatcher<BatchWriteItemRequest> matchWritesUnordered(
-      List<WriteRequest> writes) {
-    return (BatchWriteItemRequest req) ->
-        req != null
-            && req.getRequestItems().get(tableName).size() == writes.size()
-            && req.getRequestItems().get(tableName).containsAll(writes);
-  }
-
-  private static BatchWriteItemResult partialWriteSuccess(List<WriteRequest> unprocessed) {
-    return new BatchWriteItemResult().withUnprocessedItems(ImmutableMap.of(tableName, unprocessed));
-  }
-
-  private static List<WriteRequest> putRequests(List<Item> items) {
-    return items.stream().map(putRequest).collect(toList());
-  }
-
-  private static Function<Item, WriteRequest> putRequest =
-      item -> new WriteRequest().withPutRequest(new PutRequest().withItem(item.attributeMap()));
-
-  private static Function<Item, WriteRequest> deleteRequest =
-      key -> new WriteRequest().withDeleteRequest(new DeleteRequest().withKey(key.attributeMap()));
-
-  private static SerializableFunction<Item, KV<String, WriteRequest>> putRequestMapper =
-      item -> KV.of(tableName, putRequest.apply(item));
-
-  private static SerializableFunction<Item, KV<String, WriteRequest>> deleteRequestMapper =
-      key -> KV.of(tableName, deleteRequest.apply(key));
-
-  private static RetryConfiguration try4Times =
-      RetryConfiguration.create(4, Duration.standardSeconds(1), Duration.millis(1));
-
-  private static class GenerateItems extends DoFn<Integer, Item> {
-    @ProcessElement
-    public void processElement(ProcessContext ctx) {
-      range(0, ctx.element()).forEach(i -> ctx.output(Item.of(i)));
-    }
-  }
-
-  /**
-   * A DoFn that adds N duplicates to a bundle. The original is emitted last and is the only item
-   * kept if deduplicating appropriately.
-   */
-  private static class AddDuplicatesDoFn extends DoFn<Item, Item> {
-    private final int duplicates;
-    private final SerializableBiFunction<Item, Integer, Item> decorator;
-
-    AddDuplicatesDoFn(int duplicates, boolean decorate) {
-      this.duplicates = duplicates;
-      this.decorator =
-          decorate ? (item, i) -> item.withEntry("duplicate", i.toString()) : (item, i) -> item;
-    }
-
-    @ProcessElement
-    public void processElement(ProcessContext ctx) {
-      Item original = ctx.element();
-      rangeClosed(1, duplicates).forEach(i -> ctx.output(decorator.apply(original, i)));
-      ctx.output(original);
-    }
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/dynamodb/StaticAwsClientsProvider.java b/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/dynamodb/StaticAwsClientsProvider.java
deleted file mode 100644
index d3f676cf109..00000000000
--- a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/dynamodb/StaticAwsClientsProvider.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.dynamodb;
-
-import static java.util.Collections.synchronizedMap;
-
-import com.amazonaws.services.dynamodbv2.AmazonDynamoDB;
-import java.util.HashMap;
-import java.util.Map;
-
-/** Client provider supporting unserializable clients such as mock instances for unit tests. */
-class StaticAwsClientsProvider implements AwsClientsProvider {
-  private static final Map<Integer, AmazonDynamoDB> clients = synchronizedMap(new HashMap<>());
-
-  private final int id;
-  private final transient boolean cleanup;
-
-  private StaticAwsClientsProvider(AmazonDynamoDB client) {
-    this.id = System.identityHashCode(client);
-    this.cleanup = true;
-  }
-
-  static AwsClientsProvider of(AmazonDynamoDB client) {
-    StaticAwsClientsProvider provider = new StaticAwsClientsProvider(client);
-    clients.put(provider.id, client);
-    return provider;
-  }
-
-  @Override
-  public AmazonDynamoDB createDynamoDB() {
-    return clients.get(id);
-  }
-
-  @Override
-  protected void finalize() {
-    if (cleanup) {
-      clients.remove(id);
-    }
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/options/AwsHttpClientConfigurationTest.java b/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/options/AwsHttpClientConfigurationTest.java
deleted file mode 100644
index f535c4271ac..00000000000
--- a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/options/AwsHttpClientConfigurationTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.options;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.beam.sdk.options.PipelineOptionsFactory;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
-
-/**
- * {@link AwsHttpClientConfigurationTest}. Test to verify that aws http client configuration are
- * correctly being set for the respective AWS services.
- */
-@RunWith(JUnit4.class)
-public class AwsHttpClientConfigurationTest {
-
-  @Test
-  public void testAwsHttpClientConfigurationValues() {
-    S3Options s3Options = getOptions();
-    assertEquals(5000, s3Options.getClientConfiguration().getSocketTimeout());
-    assertEquals(1000, s3Options.getClientConfiguration().getClientExecutionTimeout());
-    assertEquals(10, s3Options.getClientConfiguration().getMaxConnections());
-  }
-
-  private static S3Options getOptions() {
-    String[] args = {
-      "--s3ClientFactoryClass=org.apache.beam.sdk.io.aws.s3.DefaultS3ClientBuilderFactory",
-      "--clientConfiguration={\"clientExecutionTimeout\":1000,"
-          + "\"maxConnections\":10,"
-          + "\"socketTimeout\":5000}"
-    };
-    return PipelineOptionsFactory.fromArgs(args).as(S3Options.class);
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/options/AwsModuleTest.java b/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/options/AwsModuleTest.java
deleted file mode 100644
index 0099b08b704..00000000000
--- a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/options/AwsModuleTest.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.options;
-
-import static org.apache.beam.repackaged.core.org.apache.commons.lang3.reflect.FieldUtils.readField;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.hasItem;
-import static org.junit.Assert.assertEquals;
-
-import com.amazonaws.ClientConfiguration;
-import com.amazonaws.auth.AWSCredentialsProvider;
-import com.amazonaws.auth.AWSStaticCredentialsProvider;
-import com.amazonaws.auth.BasicAWSCredentials;
-import com.amazonaws.auth.BasicSessionCredentials;
-import com.amazonaws.auth.ClasspathPropertiesFileCredentialsProvider;
-import com.amazonaws.auth.DefaultAWSCredentialsProviderChain;
-import com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper;
-import com.amazonaws.auth.EnvironmentVariableCredentialsProvider;
-import com.amazonaws.auth.PropertiesFileCredentialsProvider;
-import com.amazonaws.auth.STSAssumeRoleSessionCredentialsProvider;
-import com.amazonaws.auth.SystemPropertiesCredentialsProvider;
-import com.amazonaws.auth.profile.ProfileCredentialsProvider;
-import com.amazonaws.services.s3.model.SSEAwsKeyManagementParams;
-import com.amazonaws.services.s3.model.SSECustomerKey;
-import com.fasterxml.jackson.databind.Module;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import java.util.List;
-import org.apache.beam.sdk.options.PipelineOptionsFactory;
-import org.apache.beam.sdk.util.common.ReflectHelpers;
-import org.apache.beam.sdk.util.construction.PipelineOptionsTranslation;
-import org.hamcrest.Matchers;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
-
-/** Tests {@link AwsModule}. */
-@RunWith(JUnit4.class)
-public class AwsModuleTest {
-
-  private final ObjectMapper objectMapper = new ObjectMapper().registerModule(new AwsModule());
-
-  @Test
-  public void testObjectMapperIsAbleToFindModule() {
-    List<Module> modules = ObjectMapper.findModules(ReflectHelpers.findClassLoader());
-    assertThat(modules, hasItem(Matchers.instanceOf(AwsModule.class)));
-  }
-
-  @Test
-  public void testAWSStaticCredentialsProviderSerializationDeserialization() throws Exception {
-    String awsKeyId = "key-id";
-    String awsSecretKey = "secret-key";
-
-    AWSStaticCredentialsProvider credentialsProvider =
-        new AWSStaticCredentialsProvider(new BasicAWSCredentials(awsKeyId, awsSecretKey));
-
-    String serializedCredentialsProvider = objectMapper.writeValueAsString(credentialsProvider);
-    AWSCredentialsProvider deserializedCredentialsProvider =
-        objectMapper.readValue(serializedCredentialsProvider, AWSCredentialsProvider.class);
-
-    assertEquals(credentialsProvider.getClass(), deserializedCredentialsProvider.getClass());
-    assertEquals(
-        credentialsProvider.getCredentials().getAWSAccessKeyId(),
-        deserializedCredentialsProvider.getCredentials().getAWSAccessKeyId());
-    assertEquals(
-        credentialsProvider.getCredentials().getAWSSecretKey(),
-        deserializedCredentialsProvider.getCredentials().getAWSSecretKey());
-
-    String sessionToken = "session-token";
-    BasicSessionCredentials sessionCredentials =
-        new BasicSessionCredentials(awsKeyId, awsSecretKey, sessionToken);
-    credentialsProvider = new AWSStaticCredentialsProvider(sessionCredentials);
-    serializedCredentialsProvider = objectMapper.writeValueAsString(credentialsProvider);
-    deserializedCredentialsProvider =
-        objectMapper.readValue(serializedCredentialsProvider, AWSCredentialsProvider.class);
-    BasicSessionCredentials deserializedCredentials =
-        (BasicSessionCredentials) deserializedCredentialsProvider.getCredentials();
-    assertEquals(credentialsProvider.getClass(), deserializedCredentialsProvider.getClass());
-    assertEquals(deserializedCredentials.getAWSAccessKeyId(), awsKeyId);
-    assertEquals(deserializedCredentials.getAWSSecretKey(), awsSecretKey);
-    assertEquals(deserializedCredentials.getSessionToken(), sessionToken);
-  }
-
-  @Test
-  public void testPropertiesFileCredentialsProviderSerializationDeserialization() throws Exception {
-    String credentialsFilePath = "/path/to/file";
-
-    PropertiesFileCredentialsProvider credentialsProvider =
-        new PropertiesFileCredentialsProvider(credentialsFilePath);
-
-    String serializedCredentialsProvider = objectMapper.writeValueAsString(credentialsProvider);
-    AWSCredentialsProvider deserializedCredentialsProvider =
-        objectMapper.readValue(serializedCredentialsProvider, AWSCredentialsProvider.class);
-
-    assertEquals(credentialsProvider.getClass(), deserializedCredentialsProvider.getClass());
-    assertEquals(
-        credentialsFilePath,
-        readField(deserializedCredentialsProvider, "credentialsFilePath", true));
-  }
-
-  @Test
-  public void testClasspathPropertiesFileCredentialsProviderSerializationDeserialization()
-      throws Exception {
-    String credentialsFilePath = "/path/to/file";
-
-    ClasspathPropertiesFileCredentialsProvider credentialsProvider =
-        new ClasspathPropertiesFileCredentialsProvider(credentialsFilePath);
-
-    String serializedCredentialsProvider = objectMapper.writeValueAsString(credentialsProvider);
-    AWSCredentialsProvider deserializedCredentialsProvider =
-        objectMapper.readValue(serializedCredentialsProvider, AWSCredentialsProvider.class);
-
-    assertEquals(credentialsProvider.getClass(), deserializedCredentialsProvider.getClass());
-    assertEquals(
-        credentialsFilePath,
-        readField(deserializedCredentialsProvider, "credentialsFilePath", true));
-  }
-
-  @Test
-  public void testSTSAssumeRoleSessionCredentialsProviderSerializationDeserialization()
-      throws Exception {
-    String roleArn = "arn:aws:iam::000111222333:role/TestRole";
-    String roleSessionName = "roleSessionName";
-    STSAssumeRoleSessionCredentialsProvider credentialsProvider =
-        new STSAssumeRoleSessionCredentialsProvider.Builder(roleArn, roleSessionName).build();
-    String serializedCredentialsProvider = objectMapper.writeValueAsString(credentialsProvider);
-    AWSCredentialsProvider deserializedCredentialsProvider =
-        objectMapper.readValue(serializedCredentialsProvider, AWSCredentialsProvider.class);
-
-    assertEquals(credentialsProvider.getClass(), deserializedCredentialsProvider.getClass());
-    assertEquals(roleArn, readField(deserializedCredentialsProvider, "roleArn", true));
-    assertEquals(
-        roleSessionName, readField(deserializedCredentialsProvider, "roleSessionName", true));
-  }
-
-  @Test
-  public void testSingletonAWSCredentialsProviderSerializationDeserialization() throws Exception {
-    AWSCredentialsProvider credentialsProvider;
-    String serializedCredentialsProvider;
-    AWSCredentialsProvider deserializedCredentialsProvider;
-
-    credentialsProvider = new DefaultAWSCredentialsProviderChain();
-    serializedCredentialsProvider = objectMapper.writeValueAsString(credentialsProvider);
-    deserializedCredentialsProvider =
-        objectMapper.readValue(serializedCredentialsProvider, AWSCredentialsProvider.class);
-    assertEquals(credentialsProvider.getClass(), deserializedCredentialsProvider.getClass());
-
-    credentialsProvider = new EnvironmentVariableCredentialsProvider();
-    serializedCredentialsProvider = objectMapper.writeValueAsString(credentialsProvider);
-    deserializedCredentialsProvider =
-        objectMapper.readValue(serializedCredentialsProvider, AWSCredentialsProvider.class);
-    assertEquals(credentialsProvider.getClass(), deserializedCredentialsProvider.getClass());
-
-    credentialsProvider = new SystemPropertiesCredentialsProvider();
-    serializedCredentialsProvider = objectMapper.writeValueAsString(credentialsProvider);
-    deserializedCredentialsProvider =
-        objectMapper.readValue(serializedCredentialsProvider, AWSCredentialsProvider.class);
-    assertEquals(credentialsProvider.getClass(), deserializedCredentialsProvider.getClass());
-
-    credentialsProvider = new ProfileCredentialsProvider();
-    serializedCredentialsProvider = objectMapper.writeValueAsString(credentialsProvider);
-    deserializedCredentialsProvider =
-        objectMapper.readValue(serializedCredentialsProvider, AWSCredentialsProvider.class);
-    assertEquals(credentialsProvider.getClass(), deserializedCredentialsProvider.getClass());
-
-    credentialsProvider = new EC2ContainerCredentialsProviderWrapper();
-    serializedCredentialsProvider = objectMapper.writeValueAsString(credentialsProvider);
-    deserializedCredentialsProvider =
-        objectMapper.readValue(serializedCredentialsProvider, AWSCredentialsProvider.class);
-    assertEquals(credentialsProvider.getClass(), deserializedCredentialsProvider.getClass());
-  }
-
-  @Test
-  public void testSSECustomerKeySerializationDeserialization() throws Exception {
-    final String key = "86glyTlCNZgccSxW8JxMa6ZdjdK3N141glAysPUZ3AA=";
-    final String md5 = null;
-    final String algorithm = "AES256";
-
-    SSECustomerKey value = new SSECustomerKey(key);
-
-    String valueAsJson = objectMapper.writeValueAsString(value);
-    SSECustomerKey valueDes = objectMapper.readValue(valueAsJson, SSECustomerKey.class);
-    assertEquals(key, valueDes.getKey());
-    assertEquals(algorithm, valueDes.getAlgorithm());
-    assertEquals(md5, valueDes.getMd5());
-  }
-
-  @Test
-  public void testSSEAwsKeyManagementParamsSerializationDeserialization() throws Exception {
-    final String awsKmsKeyId =
-        "arn:aws:kms:eu-west-1:123456789012:key/dc123456-7890-ABCD-EF01-234567890ABC";
-    final String encryption = "aws:kms";
-    SSEAwsKeyManagementParams value = new SSEAwsKeyManagementParams(awsKmsKeyId);
-
-    String valueAsJson = objectMapper.writeValueAsString(value);
-    SSEAwsKeyManagementParams valueDes =
-        objectMapper.readValue(valueAsJson, SSEAwsKeyManagementParams.class);
-    assertEquals(awsKmsKeyId, valueDes.getAwsKmsKeyId());
-    assertEquals(encryption, valueDes.getEncryption());
-  }
-
-  @Test
-  public void testClientConfigurationSerializationDeserialization() throws Exception {
-    ClientConfiguration clientConfiguration = new ClientConfiguration();
-    clientConfiguration.setProxyHost("localhost");
-    clientConfiguration.setProxyPort(1234);
-    clientConfiguration.setProxyUsername("username");
-    clientConfiguration.setProxyPassword("password");
-
-    final String valueAsJson = objectMapper.writeValueAsString(clientConfiguration);
-    final ClientConfiguration valueDes =
-        objectMapper.readValue(valueAsJson, ClientConfiguration.class);
-    assertEquals("localhost", valueDes.getProxyHost());
-    assertEquals(1234, valueDes.getProxyPort());
-    assertEquals("username", valueDes.getProxyUsername());
-    assertEquals("password", valueDes.getProxyPassword());
-  }
-
-  @Test
-  public void testAwsHttpClientConfigurationSerializationDeserialization() throws Exception {
-    ClientConfiguration clientConfiguration = new ClientConfiguration();
-    clientConfiguration.setConnectionTimeout(100);
-    clientConfiguration.setConnectionMaxIdleMillis(1000);
-    clientConfiguration.setSocketTimeout(300);
-
-    final String valueAsJson = objectMapper.writeValueAsString(clientConfiguration);
-    final ClientConfiguration clientConfigurationDeserialized =
-        objectMapper.readValue(valueAsJson, ClientConfiguration.class);
-    assertEquals(100, clientConfigurationDeserialized.getConnectionTimeout());
-    assertEquals(1000, clientConfigurationDeserialized.getConnectionMaxIdleMillis());
-    assertEquals(300, clientConfigurationDeserialized.getSocketTimeout());
-  }
-
-  @Test
-  public void testAwsHttpClientConfigurationSerializationDeserializationProto() throws Exception {
-    AwsOptions awsOptions =
-        PipelineOptionsTranslation.fromProto(
-                PipelineOptionsTranslation.toProto(
-                    PipelineOptionsFactory.fromArgs(
-                            "--clientConfiguration={ \"connectionTimeout\": 100, \"connectionMaxIdleTime\": 1000, \"socketTimeout\": 300, \"proxyPort\": -1, \"requestTimeout\": 1500 }")
-                        .create()))
-            .as(AwsOptions.class);
-    ClientConfiguration clientConfigurationDeserialized = awsOptions.getClientConfiguration();
-
-    assertEquals(100, clientConfigurationDeserialized.getConnectionTimeout());
-    assertEquals(1000, clientConfigurationDeserialized.getConnectionMaxIdleMillis());
-    assertEquals(300, clientConfigurationDeserialized.getSocketTimeout());
-    assertEquals(-1, clientConfigurationDeserialized.getProxyPort());
-    assertEquals(1500, clientConfigurationDeserialized.getRequestTimeout());
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/s3/MatchResultMatcher.java b/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/s3/MatchResultMatcher.java
deleted file mode 100644
index e6b127947df..00000000000
--- a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/s3/MatchResultMatcher.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.s3;
-
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkArgument;
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkNotNull;
-
-import java.io.IOException;
-import java.util.List;
-import org.apache.beam.sdk.io.fs.MatchResult;
-import org.apache.beam.sdk.io.fs.ResourceId;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableList;
-import org.hamcrest.BaseMatcher;
-import org.hamcrest.Description;
-import org.hamcrest.Matcher;
-
-/**
- * Hamcrest {@link Matcher} to match {@link MatchResult}. Necessary because {@link
- * MatchResult#metadata()} throws an exception under normal circumstances.
- */
-class MatchResultMatcher extends BaseMatcher<MatchResult> {
-
-  private final MatchResult.Status expectedStatus;
-  private final List<MatchResult.Metadata> expectedMetadata;
-  private final IOException expectedException;
-
-  private MatchResultMatcher(
-      MatchResult.Status expectedStatus,
-      List<MatchResult.Metadata> expectedMetadata,
-      IOException expectedException) {
-    this.expectedStatus = checkNotNull(expectedStatus);
-    checkArgument((expectedMetadata == null) ^ (expectedException == null));
-    this.expectedMetadata = expectedMetadata;
-    this.expectedException = expectedException;
-  }
-
-  static MatchResultMatcher create(List<MatchResult.Metadata> expectedMetadata) {
-    return new MatchResultMatcher(MatchResult.Status.OK, expectedMetadata, null);
-  }
-
-  private static MatchResultMatcher create(MatchResult.Metadata expectedMetadata) {
-    return create(ImmutableList.of(expectedMetadata));
-  }
-
-  static MatchResultMatcher create(
-      long sizeBytes, long lastModifiedMillis, ResourceId resourceId, boolean isReadSeekEfficient) {
-    return create(
-        MatchResult.Metadata.builder()
-            .setSizeBytes(sizeBytes)
-            .setLastModifiedMillis(lastModifiedMillis)
-            .setResourceId(resourceId)
-            .setIsReadSeekEfficient(isReadSeekEfficient)
-            .build());
-  }
-
-  static MatchResultMatcher create(
-      MatchResult.Status expectedStatus, IOException expectedException) {
-    return new MatchResultMatcher(expectedStatus, null, expectedException);
-  }
-
-  static MatchResultMatcher create(MatchResult expected) {
-    MatchResult.Status expectedStatus = expected.status();
-    List<MatchResult.Metadata> expectedMetadata = null;
-    IOException expectedException = null;
-    try {
-      expectedMetadata = expected.metadata();
-    } catch (IOException e) {
-      expectedException = e;
-    }
-    return new MatchResultMatcher(expectedStatus, expectedMetadata, expectedException);
-  }
-
-  @Override
-  public boolean matches(Object actual) {
-    if (actual == null) {
-      return false;
-    }
-    if (!(actual instanceof MatchResult)) {
-      return false;
-    }
-    MatchResult actualResult = (MatchResult) actual;
-    if (!expectedStatus.equals(actualResult.status())) {
-      return false;
-    }
-
-    List<MatchResult.Metadata> actualMetadata;
-    try {
-      actualMetadata = actualResult.metadata();
-    } catch (IOException e) {
-      return expectedException != null && expectedException.toString().equals(e.toString());
-    }
-    return expectedMetadata != null && expectedMetadata.equals(actualMetadata);
-  }
-
-  @Override
-  public void describeTo(Description description) {
-    if (expectedMetadata != null) {
-      description.appendText(MatchResult.create(expectedStatus, expectedMetadata).toString());
-    } else {
-      description.appendText(MatchResult.create(expectedStatus, expectedException).toString());
-    }
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/s3/S3FileSystemIT.java b/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/s3/S3FileSystemIT.java
deleted file mode 100644
index 112ab95463b..00000000000
--- a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/s3/S3FileSystemIT.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.s3;
-
-import static org.apache.beam.sdk.io.common.TestRow.getExpectedHashForRowCount;
-import static org.apache.commons.lang3.StringUtils.isAllLowerCase;
-import static org.apache.http.HttpHeaders.CONTENT_LENGTH;
-import static org.testcontainers.containers.localstack.LocalStackContainer.Service.S3;
-
-import com.amazonaws.Request;
-import com.amazonaws.handlers.RequestHandler2;
-import com.amazonaws.services.s3.AmazonS3;
-import com.amazonaws.services.s3.AmazonS3ClientBuilder;
-import java.util.Map;
-import org.apache.beam.sdk.io.GenerateSequence;
-import org.apache.beam.sdk.io.TextIO;
-import org.apache.beam.sdk.io.aws.ITEnvironment;
-import org.apache.beam.sdk.io.aws.options.S3Options;
-import org.apache.beam.sdk.io.common.HashingFn;
-import org.apache.beam.sdk.io.common.TestRow.DeterministicallyConstructTestRowFn;
-import org.apache.beam.sdk.io.common.TestRow.SelectNameFn;
-import org.apache.beam.sdk.testing.PAssert;
-import org.apache.beam.sdk.testing.TestPipeline;
-import org.apache.beam.sdk.transforms.Combine;
-import org.apache.beam.sdk.transforms.Count;
-import org.apache.beam.sdk.transforms.ParDo;
-import org.apache.beam.sdk.values.PCollection;
-import org.joda.time.DateTime;
-import org.junit.ClassRule;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExternalResource;
-import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
-
-/**
- * Integration test to write and read from a S3 compatible file system.
- *
- * <p>By default this runs against Localstack, but you can use {@link S3FileSystemIT.S3ITOptions} to
- * configure tests to run against AWS S3.
- *
- * <pre>{@code
- * ./gradlew :sdks:java:io:amazon-web-services:integrationTest \
- *   --info \
- *   --tests "org.apache.beam.sdk.io.aws.s3.S3FileSystemIT" \
- *   -DintegrationTestPipelineOptions='["--awsRegion=eu-central-1","--useLocalstack=false"]'
- * }</pre>
- */
-@RunWith(JUnit4.class)
-public class S3FileSystemIT {
-  public interface S3ITOptions extends ITEnvironment.ITOptions, S3Options {}
-
-  @ClassRule
-  public static ITEnvironment<S3ITOptions> env =
-      new ITEnvironment<S3ITOptions>(S3, S3ITOptions.class) {
-        @Override
-        protected void before() {
-          super.before();
-          options().setS3ClientFactoryClass(S3ClientFixFix.class);
-        }
-      };
-
-  @Rule public TestPipeline pipelineWrite = env.createTestPipeline();
-  @Rule public TestPipeline pipelineRead = env.createTestPipeline();
-  @Rule public S3Bucket s3Bucket = new S3Bucket();
-
-  @Test
-  public void testWriteThenRead() {
-    int rows = env.options().getNumberOfRows();
-    // Write test dataset to S3.
-    pipelineWrite
-        .apply("Generate Sequence", GenerateSequence.from(0).to(rows))
-        .apply("Prepare TestRows", ParDo.of(new DeterministicallyConstructTestRowFn()))
-        .apply("Prepare file rows", ParDo.of(new SelectNameFn()))
-        .apply("Write to S3 file", TextIO.write().to("s3://" + s3Bucket.name + "/test"));
-
-    pipelineWrite.run().waitUntilFinish();
-
-    // Read test dataset from S3.
-    PCollection<String> output =
-        pipelineRead.apply(TextIO.read().from("s3://" + s3Bucket.name + "/test*"));
-
-    PAssert.thatSingleton(output.apply("Count All", Count.globally())).isEqualTo((long) rows);
-
-    PAssert.that(output.apply(Combine.globally(new HashingFn()).withoutDefaults()))
-        .containsInAnyOrder(getExpectedHashForRowCount(rows));
-
-    pipelineRead.run().waitUntilFinish();
-  }
-
-  static class S3Bucket extends ExternalResource {
-    public final String name = "beam-s3io-it-" + new DateTime().toString("yyyyMMdd-HHmmss");
-
-    @Override
-    protected void before() {
-      AmazonS3 client = env.buildClient(AmazonS3ClientBuilder.standard());
-      client.createBucket(name);
-      client.shutdown();
-    }
-  }
-
-  // Fix duplicated Content-Length header due to case-sensitive handling of header names
-  // https://github.com/aws/aws-sdk-java/issues/2503
-  private static class S3ClientFixFix extends DefaultS3ClientBuilderFactory {
-    @Override
-    public AmazonS3ClientBuilder createBuilder(S3Options s3Options) {
-      return super.createBuilder(s3Options)
-          .withRequestHandlers(
-              new RequestHandler2() {
-                @Override
-                public void beforeRequest(Request<?> request) {
-                  Map<String, String> headers = request.getHeaders();
-                  if (!isAllLowerCase(CONTENT_LENGTH) && headers.containsKey(CONTENT_LENGTH)) {
-                    headers.remove(CONTENT_LENGTH.toLowerCase()); // remove duplicated header
-                  }
-                }
-              });
-    }
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/s3/S3FileSystemTest.java b/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/s3/S3FileSystemTest.java
deleted file mode 100644
index db749d7080e..00000000000
--- a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/s3/S3FileSystemTest.java
+++ /dev/null
@@ -1,1248 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.s3;
-
-import static org.apache.beam.sdk.io.aws.s3.S3TestUtils.buildMockedS3FileSystem;
-import static org.apache.beam.sdk.io.aws.s3.S3TestUtils.s3Config;
-import static org.apache.beam.sdk.io.aws.s3.S3TestUtils.s3ConfigWithCustomEndpointAndPathStyleAccessEnabled;
-import static org.apache.beam.sdk.io.aws.s3.S3TestUtils.s3ConfigWithSSECustomerKey;
-import static org.apache.beam.sdk.io.aws.s3.S3TestUtils.s3Options;
-import static org.apache.beam.sdk.io.aws.s3.S3TestUtils.s3OptionsWithCustomEndpointAndPathStyleAccessEnabled;
-import static org.apache.beam.sdk.io.aws.s3.S3TestUtils.s3OptionsWithSSECustomerKey;
-import static org.apache.beam.sdk.io.aws.s3.S3TestUtils.toMd5;
-import static org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Preconditions.checkNotNull;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.contains;
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.argThat;
-import static org.mockito.Matchers.anyObject;
-import static org.mockito.Matchers.notNull;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import akka.http.scaladsl.Http;
-import com.amazonaws.auth.AWSStaticCredentialsProvider;
-import com.amazonaws.auth.AnonymousAWSCredentials;
-import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration;
-import com.amazonaws.services.s3.AmazonS3;
-import com.amazonaws.services.s3.AmazonS3ClientBuilder;
-import com.amazonaws.services.s3.model.AmazonS3Exception;
-import com.amazonaws.services.s3.model.CompleteMultipartUploadRequest;
-import com.amazonaws.services.s3.model.CopyObjectRequest;
-import com.amazonaws.services.s3.model.CopyObjectResult;
-import com.amazonaws.services.s3.model.CopyPartRequest;
-import com.amazonaws.services.s3.model.CopyPartResult;
-import com.amazonaws.services.s3.model.DeleteObjectsRequest;
-import com.amazonaws.services.s3.model.GetObjectMetadataRequest;
-import com.amazonaws.services.s3.model.InitiateMultipartUploadRequest;
-import com.amazonaws.services.s3.model.InitiateMultipartUploadResult;
-import com.amazonaws.services.s3.model.ListObjectsV2Request;
-import com.amazonaws.services.s3.model.ListObjectsV2Result;
-import com.amazonaws.services.s3.model.ObjectMetadata;
-import com.amazonaws.services.s3.model.S3ObjectSummary;
-import com.amazonaws.services.s3.model.SSECustomerKey;
-import io.findify.s3mock.S3Mock;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.nio.ByteBuffer;
-import java.nio.channels.ReadableByteChannel;
-import java.nio.channels.WritableByteChannel;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import org.apache.beam.sdk.io.aws.options.S3Options;
-import org.apache.beam.sdk.io.fs.CreateOptions;
-import org.apache.beam.sdk.io.fs.MatchResult;
-import org.apache.beam.sdk.metrics.Lineage;
-import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.ImmutableList;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
-import org.mockito.ArgumentMatcher;
-
-/** Test case for {@link S3FileSystem}. */
-@RunWith(JUnit4.class)
-public class S3FileSystemTest {
-  private static S3Mock api;
-  private static AmazonS3 client;
-
-  @BeforeClass
-  public static void beforeClass() {
-    api = new S3Mock.Builder().withInMemoryBackend().build();
-    Http.ServerBinding binding = api.start();
-
-    EndpointConfiguration endpoint =
-        new EndpointConfiguration(
-            "http://localhost:" + binding.localAddress().getPort(), "us-west-2");
-    client =
-        AmazonS3ClientBuilder.standard()
-            .withPathStyleAccessEnabled(true)
-            .withEndpointConfiguration(endpoint)
-            .withCredentials(new AWSStaticCredentialsProvider(new AnonymousAWSCredentials()))
-            .build();
-  }
-
-  @AfterClass
-  public static void afterClass() {
-    api.stop();
-  }
-
-  @Test
-  public void testGetScheme() {
-    S3FileSystem s3FileSystem = new S3FileSystem(s3Config("s3"));
-    assertEquals("s3", s3FileSystem.getScheme());
-
-    s3FileSystem = new S3FileSystem(s3Config("other"));
-    assertEquals("other", s3FileSystem.getScheme());
-  }
-
-  @Test
-  public void testGetSchemeWithS3Options() {
-    S3FileSystem s3FileSystem = new S3FileSystem(s3Options());
-    assertEquals("s3", s3FileSystem.getScheme());
-  }
-
-  @Test
-  public void testGetPathStyleAccessEnabled() throws URISyntaxException {
-    S3FileSystem s3FileSystem =
-        new S3FileSystem(s3ConfigWithCustomEndpointAndPathStyleAccessEnabled("s3"));
-    URL s3Url = s3FileSystem.getAmazonS3Client().getUrl("bucket", "file");
-    assertEquals("https://s3.custom.dns/bucket/file", s3Url.toURI().toString());
-  }
-
-  @Test
-  public void testGetPathStyleAccessEnabledWithS3Options() throws URISyntaxException {
-    S3FileSystem s3FileSystem =
-        new S3FileSystem(s3OptionsWithCustomEndpointAndPathStyleAccessEnabled());
-    URL s3Url = s3FileSystem.getAmazonS3Client().getUrl("bucket", "file");
-    assertEquals("https://s3.custom.dns/bucket/file", s3Url.toURI().toString());
-  }
-
-  @Test
-  public void testCopy() throws IOException {
-    testCopy(s3Config("s3"));
-    testCopy(s3Config("other"));
-    testCopy(s3ConfigWithSSECustomerKey("s3"));
-    testCopy(s3ConfigWithSSECustomerKey("other"));
-  }
-
-  @Test
-  public void testCopyWithS3Options() throws IOException {
-    testCopy(s3Options());
-    testCopy(s3OptionsWithSSECustomerKey());
-  }
-
-  private GetObjectMetadataRequest createObjectMetadataRequest(
-      S3ResourceId path, SSECustomerKey sseCustomerKey) {
-    GetObjectMetadataRequest getObjectMetadataRequest =
-        new GetObjectMetadataRequest(path.getBucket(), path.getKey());
-    getObjectMetadataRequest.setSSECustomerKey(sseCustomerKey);
-    return getObjectMetadataRequest;
-  }
-
-  private void assertGetObjectMetadata(
-      S3FileSystem s3FileSystem,
-      GetObjectMetadataRequest request,
-      String sseCustomerKeyMd5,
-      ObjectMetadata objectMetadata) {
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .getObjectMetadata(argThat(new GetObjectMetadataRequestMatcher(request))))
-        .thenReturn(objectMetadata);
-    assertEquals(
-        sseCustomerKeyMd5,
-        s3FileSystem.getAmazonS3Client().getObjectMetadata(request).getSSECustomerKeyMd5());
-  }
-
-  private void testCopy(S3FileSystemConfiguration config) throws IOException {
-    testCopy(buildMockedS3FileSystem(config), config.getSSECustomerKey());
-  }
-
-  private void testCopy(S3Options options) throws IOException {
-    testCopy(buildMockedS3FileSystem(options), options.getSSECustomerKey());
-  }
-
-  private void testCopy(S3FileSystem s3FileSystem, SSECustomerKey sseCustomerKey)
-      throws IOException {
-    S3ResourceId sourcePath = S3ResourceId.fromUri(s3FileSystem.getScheme() + "://bucket/from");
-    S3ResourceId destinationPath = S3ResourceId.fromUri(s3FileSystem.getScheme() + "://bucket/to");
-
-    ObjectMetadata objectMetadata = new ObjectMetadata();
-    objectMetadata.setContentLength(0);
-    String sseCustomerKeyMd5 = toMd5(sseCustomerKey);
-    if (sseCustomerKeyMd5 != null) {
-      objectMetadata.setSSECustomerKeyMd5(sseCustomerKeyMd5);
-    }
-    assertGetObjectMetadata(
-        s3FileSystem,
-        createObjectMetadataRequest(sourcePath, sseCustomerKey),
-        sseCustomerKeyMd5,
-        objectMetadata);
-
-    s3FileSystem.copy(sourcePath, destinationPath);
-
-    verify(s3FileSystem.getAmazonS3Client(), times(1)).copyObject(any(CopyObjectRequest.class));
-
-    // we simulate a big object >= 5GB so it takes the multiPart path
-    objectMetadata.setContentLength(5_368_709_120L);
-    assertGetObjectMetadata(
-        s3FileSystem,
-        createObjectMetadataRequest(sourcePath, sseCustomerKey),
-        sseCustomerKeyMd5,
-        objectMetadata);
-
-    try {
-      s3FileSystem.copy(sourcePath, destinationPath);
-    } catch (NullPointerException e) {
-      // ignore failing unmocked path, this is covered by testMultipartCopy test
-    }
-
-    verify(s3FileSystem.getAmazonS3Client(), never()).copyObject(null);
-  }
-
-  @Test
-  public void testAtomicCopy() {
-    testAtomicCopy(s3Config("s3"));
-    testAtomicCopy(s3Config("other"));
-    testAtomicCopy(s3ConfigWithSSECustomerKey("s3"));
-    testAtomicCopy(s3ConfigWithSSECustomerKey("other"));
-  }
-
-  @Test
-  public void testAtomicCopyWithS3Options() {
-    testAtomicCopy(s3Options());
-    testAtomicCopy(s3OptionsWithSSECustomerKey());
-  }
-
-  private void testAtomicCopy(S3FileSystemConfiguration config) {
-    testAtomicCopy(buildMockedS3FileSystem(config), config.getSSECustomerKey());
-  }
-
-  private void testAtomicCopy(S3Options options) {
-    testAtomicCopy(buildMockedS3FileSystem(options), options.getSSECustomerKey());
-  }
-
-  private void testAtomicCopy(S3FileSystem s3FileSystem, SSECustomerKey sseCustomerKey) {
-    S3ResourceId sourcePath = S3ResourceId.fromUri(s3FileSystem.getScheme() + "://bucket/from");
-    S3ResourceId destinationPath = S3ResourceId.fromUri(s3FileSystem.getScheme() + "://bucket/to");
-
-    CopyObjectResult copyObjectResult = new CopyObjectResult();
-    String sseCustomerKeyMd5 = toMd5(sseCustomerKey);
-    if (sseCustomerKeyMd5 != null) {
-      copyObjectResult.setSSECustomerKeyMd5(sseCustomerKeyMd5);
-    }
-    CopyObjectRequest copyObjectRequest =
-        new CopyObjectRequest(
-            sourcePath.getBucket(),
-            sourcePath.getKey(),
-            destinationPath.getBucket(),
-            destinationPath.getKey());
-    copyObjectRequest.setSourceSSECustomerKey(sseCustomerKey);
-    copyObjectRequest.setDestinationSSECustomerKey(sseCustomerKey);
-    when(s3FileSystem.getAmazonS3Client().copyObject(any(CopyObjectRequest.class)))
-        .thenReturn(copyObjectResult);
-    assertEquals(
-        sseCustomerKeyMd5,
-        s3FileSystem.getAmazonS3Client().copyObject(copyObjectRequest).getSSECustomerKeyMd5());
-
-    ObjectMetadata sourceS3ObjectMetadata = new ObjectMetadata();
-    s3FileSystem.atomicCopy(sourcePath, destinationPath, sourceS3ObjectMetadata);
-
-    verify(s3FileSystem.getAmazonS3Client(), times(2)).copyObject(any(CopyObjectRequest.class));
-  }
-
-  @Test
-  public void testMultipartCopy() {
-    testMultipartCopy(s3Config("s3"));
-    testMultipartCopy(s3Config("other"));
-    testMultipartCopy(s3ConfigWithSSECustomerKey("s3"));
-    testMultipartCopy(s3ConfigWithSSECustomerKey("other"));
-  }
-
-  @Test
-  public void testMultipartCopyWithS3Options() {
-    testMultipartCopy(s3Options());
-    testMultipartCopy(s3OptionsWithSSECustomerKey());
-  }
-
-  private void testMultipartCopy(S3FileSystemConfiguration config) {
-    testMultipartCopy(
-        buildMockedS3FileSystem(config),
-        config.getSSECustomerKey(),
-        config.getS3UploadBufferSizeBytes());
-  }
-
-  private void testMultipartCopy(S3Options options) {
-    testMultipartCopy(
-        buildMockedS3FileSystem(options),
-        options.getSSECustomerKey(),
-        options.getS3UploadBufferSizeBytes());
-  }
-
-  private void testMultipartCopy(
-      S3FileSystem s3FileSystem, SSECustomerKey sseCustomerKey, long s3UploadBufferSizeBytes) {
-    S3ResourceId sourcePath = S3ResourceId.fromUri(s3FileSystem.getScheme() + "://bucket/from");
-    S3ResourceId destinationPath = S3ResourceId.fromUri(s3FileSystem.getScheme() + "://bucket/to");
-
-    InitiateMultipartUploadResult initiateMultipartUploadResult =
-        new InitiateMultipartUploadResult();
-    initiateMultipartUploadResult.setUploadId("upload-id");
-    String sseCustomerKeyMd5 = toMd5(sseCustomerKey);
-    if (sseCustomerKeyMd5 != null) {
-      initiateMultipartUploadResult.setSSECustomerKeyMd5(sseCustomerKeyMd5);
-    }
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .initiateMultipartUpload(any(InitiateMultipartUploadRequest.class)))
-        .thenReturn(initiateMultipartUploadResult);
-    assertEquals(
-        sseCustomerKeyMd5,
-        s3FileSystem
-            .getAmazonS3Client()
-            .initiateMultipartUpload(
-                new InitiateMultipartUploadRequest(
-                    destinationPath.getBucket(), destinationPath.getKey()))
-            .getSSECustomerKeyMd5());
-
-    ObjectMetadata sourceObjectMetadata = new ObjectMetadata();
-    sourceObjectMetadata.setContentLength((long) (s3UploadBufferSizeBytes * 1.5));
-    sourceObjectMetadata.setContentEncoding("read-seek-efficient");
-    if (sseCustomerKeyMd5 != null) {
-      sourceObjectMetadata.setSSECustomerKeyMd5(sseCustomerKeyMd5);
-    }
-    assertGetObjectMetadata(
-        s3FileSystem,
-        createObjectMetadataRequest(sourcePath, sseCustomerKey),
-        sseCustomerKeyMd5,
-        sourceObjectMetadata);
-
-    CopyPartResult copyPartResult1 = new CopyPartResult();
-    copyPartResult1.setETag("etag-1");
-    CopyPartResult copyPartResult2 = new CopyPartResult();
-    copyPartResult1.setETag("etag-2");
-    if (sseCustomerKeyMd5 != null) {
-      copyPartResult1.setSSECustomerKeyMd5(sseCustomerKeyMd5);
-      copyPartResult2.setSSECustomerKeyMd5(sseCustomerKeyMd5);
-    }
-    CopyPartRequest copyPartRequest = new CopyPartRequest();
-    copyPartRequest.setSourceSSECustomerKey(sseCustomerKey);
-    when(s3FileSystem.getAmazonS3Client().copyPart(any(CopyPartRequest.class)))
-        .thenReturn(copyPartResult1)
-        .thenReturn(copyPartResult2);
-    assertEquals(
-        sseCustomerKeyMd5,
-        s3FileSystem.getAmazonS3Client().copyPart(copyPartRequest).getSSECustomerKeyMd5());
-
-    s3FileSystem.multipartCopy(sourcePath, destinationPath, sourceObjectMetadata);
-
-    verify(s3FileSystem.getAmazonS3Client(), times(1))
-        .completeMultipartUpload(any(CompleteMultipartUploadRequest.class));
-  }
-
-  @Test
-  public void deleteThousandsOfObjectsInMultipleBuckets() throws IOException {
-    S3FileSystem s3FileSystem = buildMockedS3FileSystem(s3Config("s3"));
-
-    List<String> buckets = ImmutableList.of("bucket1", "bucket2");
-    List<String> keys = new ArrayList<>();
-    for (int i = 0; i < 2500; i++) {
-      keys.add(String.format("key-%d", i));
-    }
-    List<S3ResourceId> paths = new ArrayList<>();
-    for (String bucket : buckets) {
-      for (String key : keys) {
-        paths.add(S3ResourceId.fromComponents("s3", bucket, key));
-      }
-    }
-
-    s3FileSystem.delete(paths);
-
-    // Should require 6 calls to delete 2500 objects in each of 2 buckets.
-    verify(s3FileSystem.getAmazonS3Client(), times(6))
-        .deleteObjects(any(DeleteObjectsRequest.class));
-  }
-
-  @Test
-  public void deleteThousandsOfObjectsInMultipleBucketsWithS3Options() throws IOException {
-    S3FileSystem s3FileSystem = buildMockedS3FileSystem(s3Options());
-
-    List<String> buckets = ImmutableList.of("bucket1", "bucket2");
-    List<String> keys = new ArrayList<>();
-    for (int i = 0; i < 2500; i++) {
-      keys.add(String.format("key-%d", i));
-    }
-    List<S3ResourceId> paths = new ArrayList<>();
-    for (String bucket : buckets) {
-      for (String key : keys) {
-        paths.add(S3ResourceId.fromComponents("s3", bucket, key));
-      }
-    }
-
-    s3FileSystem.delete(paths);
-
-    // Should require 6 calls to delete 2500 objects in each of 2 buckets.
-    verify(s3FileSystem.getAmazonS3Client(), times(6))
-        .deleteObjects(any(DeleteObjectsRequest.class));
-  }
-
-  @Test
-  public void matchNonGlob() {
-    S3FileSystem s3FileSystem = buildMockedS3FileSystem(s3Config("mys3"));
-
-    S3ResourceId path = S3ResourceId.fromUri("mys3://testbucket/testdirectory/filethatexists");
-    long lastModifiedMillis = 1540000000000L;
-    ObjectMetadata s3ObjectMetadata = new ObjectMetadata();
-    s3ObjectMetadata.setContentLength(100);
-    s3ObjectMetadata.setContentEncoding("read-seek-efficient");
-    s3ObjectMetadata.setLastModified(new Date(lastModifiedMillis));
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .getObjectMetadata(
-                argThat(
-                    new GetObjectMetadataRequestMatcher(
-                        new GetObjectMetadataRequest(path.getBucket(), path.getKey())))))
-        .thenReturn(s3ObjectMetadata);
-
-    MatchResult result = s3FileSystem.matchNonGlobPath(path);
-    assertThat(
-        result,
-        MatchResultMatcher.create(
-            ImmutableList.of(
-                MatchResult.Metadata.builder()
-                    .setSizeBytes(100)
-                    .setLastModifiedMillis(lastModifiedMillis)
-                    .setResourceId(path)
-                    .setIsReadSeekEfficient(true)
-                    .build())));
-  }
-
-  @Test
-  public void matchNonGlobWithS3Options() {
-    S3FileSystem s3FileSystem = buildMockedS3FileSystem(s3Options());
-
-    S3ResourceId path = S3ResourceId.fromUri("s3://testbucket/testdirectory/filethatexists");
-    long lastModifiedMillis = 1540000000000L;
-    ObjectMetadata s3ObjectMetadata = new ObjectMetadata();
-    s3ObjectMetadata.setContentLength(100);
-    s3ObjectMetadata.setContentEncoding("read-seek-efficient");
-    s3ObjectMetadata.setLastModified(new Date(lastModifiedMillis));
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .getObjectMetadata(
-                argThat(
-                    new GetObjectMetadataRequestMatcher(
-                        new GetObjectMetadataRequest(path.getBucket(), path.getKey())))))
-        .thenReturn(s3ObjectMetadata);
-
-    MatchResult result = s3FileSystem.matchNonGlobPath(path);
-    assertThat(
-        result,
-        MatchResultMatcher.create(
-            ImmutableList.of(
-                MatchResult.Metadata.builder()
-                    .setSizeBytes(100)
-                    .setLastModifiedMillis(lastModifiedMillis)
-                    .setResourceId(path)
-                    .setIsReadSeekEfficient(true)
-                    .build())));
-  }
-
-  @Test
-  public void matchNonGlobNotReadSeekEfficient() {
-    S3FileSystem s3FileSystem = buildMockedS3FileSystem(s3Config("s3"));
-
-    S3ResourceId path = S3ResourceId.fromUri("s3://testbucket/testdirectory/filethatexists");
-    long lastModifiedMillis = 1540000000000L;
-    ObjectMetadata s3ObjectMetadata = new ObjectMetadata();
-    s3ObjectMetadata.setContentLength(100);
-    s3ObjectMetadata.setLastModified(new Date(lastModifiedMillis));
-    s3ObjectMetadata.setContentEncoding("gzip");
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .getObjectMetadata(
-                argThat(
-                    new GetObjectMetadataRequestMatcher(
-                        new GetObjectMetadataRequest(path.getBucket(), path.getKey())))))
-        .thenReturn(s3ObjectMetadata);
-
-    MatchResult result = s3FileSystem.matchNonGlobPath(path);
-    assertThat(
-        result,
-        MatchResultMatcher.create(
-            ImmutableList.of(
-                MatchResult.Metadata.builder()
-                    .setSizeBytes(100)
-                    .setLastModifiedMillis(lastModifiedMillis)
-                    .setResourceId(path)
-                    .setIsReadSeekEfficient(false)
-                    .build())));
-  }
-
-  @Test
-  public void matchNonGlobNotReadSeekEfficientWithS3Options() {
-    S3FileSystem s3FileSystem = buildMockedS3FileSystem(s3Options());
-
-    S3ResourceId path = S3ResourceId.fromUri("s3://testbucket/testdirectory/filethatexists");
-    long lastModifiedMillis = 1540000000000L;
-    ObjectMetadata s3ObjectMetadata = new ObjectMetadata();
-    s3ObjectMetadata.setContentLength(100);
-    s3ObjectMetadata.setLastModified(new Date(lastModifiedMillis));
-    s3ObjectMetadata.setContentEncoding("gzip");
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .getObjectMetadata(
-                argThat(
-                    new GetObjectMetadataRequestMatcher(
-                        new GetObjectMetadataRequest(path.getBucket(), path.getKey())))))
-        .thenReturn(s3ObjectMetadata);
-
-    MatchResult result = s3FileSystem.matchNonGlobPath(path);
-    assertThat(
-        result,
-        MatchResultMatcher.create(
-            ImmutableList.of(
-                MatchResult.Metadata.builder()
-                    .setSizeBytes(100)
-                    .setLastModifiedMillis(lastModifiedMillis)
-                    .setResourceId(path)
-                    .setIsReadSeekEfficient(false)
-                    .build())));
-  }
-
-  @Test
-  public void matchNonGlobNullContentEncoding() {
-    S3FileSystem s3FileSystem = buildMockedS3FileSystem(s3Config("s3"));
-
-    S3ResourceId path = S3ResourceId.fromUri("s3://testbucket/testdirectory/filethatexists");
-    long lastModifiedMillis = 1540000000000L;
-    ObjectMetadata s3ObjectMetadata = new ObjectMetadata();
-    s3ObjectMetadata.setContentLength(100);
-    s3ObjectMetadata.setLastModified(new Date(lastModifiedMillis));
-    s3ObjectMetadata.setContentEncoding(null);
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .getObjectMetadata(
-                argThat(
-                    new GetObjectMetadataRequestMatcher(
-                        new GetObjectMetadataRequest(path.getBucket(), path.getKey())))))
-        .thenReturn(s3ObjectMetadata);
-
-    MatchResult result = s3FileSystem.matchNonGlobPath(path);
-    assertThat(
-        result,
-        MatchResultMatcher.create(
-            ImmutableList.of(
-                MatchResult.Metadata.builder()
-                    .setSizeBytes(100)
-                    .setLastModifiedMillis(lastModifiedMillis)
-                    .setResourceId(path)
-                    .setIsReadSeekEfficient(true)
-                    .build())));
-  }
-
-  @Test
-  public void matchNonGlobNullContentEncodingWithS3Options() {
-    S3FileSystem s3FileSystem = buildMockedS3FileSystem(s3Options());
-
-    S3ResourceId path = S3ResourceId.fromUri("s3://testbucket/testdirectory/filethatexists");
-    long lastModifiedMillis = 1540000000000L;
-    ObjectMetadata s3ObjectMetadata = new ObjectMetadata();
-    s3ObjectMetadata.setContentLength(100);
-    s3ObjectMetadata.setLastModified(new Date(lastModifiedMillis));
-    s3ObjectMetadata.setContentEncoding(null);
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .getObjectMetadata(
-                argThat(
-                    new GetObjectMetadataRequestMatcher(
-                        new GetObjectMetadataRequest(path.getBucket(), path.getKey())))))
-        .thenReturn(s3ObjectMetadata);
-
-    MatchResult result = s3FileSystem.matchNonGlobPath(path);
-    assertThat(
-        result,
-        MatchResultMatcher.create(
-            ImmutableList.of(
-                MatchResult.Metadata.builder()
-                    .setSizeBytes(100)
-                    .setLastModifiedMillis(lastModifiedMillis)
-                    .setResourceId(path)
-                    .setIsReadSeekEfficient(true)
-                    .build())));
-  }
-
-  @Test
-  public void matchNonGlobNotFound() {
-    S3FileSystem s3FileSystem = buildMockedS3FileSystem(s3Config("mys3"));
-
-    S3ResourceId path = S3ResourceId.fromUri("mys3://testbucket/testdirectory/nonexistentfile");
-    AmazonS3Exception exception = new AmazonS3Exception("mock exception");
-    exception.setStatusCode(404);
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .getObjectMetadata(
-                argThat(
-                    new GetObjectMetadataRequestMatcher(
-                        new GetObjectMetadataRequest(path.getBucket(), path.getKey())))))
-        .thenThrow(exception);
-
-    MatchResult result = s3FileSystem.matchNonGlobPath(path);
-    assertThat(
-        result,
-        MatchResultMatcher.create(MatchResult.Status.NOT_FOUND, new FileNotFoundException()));
-  }
-
-  @Test
-  public void matchNonGlobNotFoundWithS3Options() {
-    S3FileSystem s3FileSystem = buildMockedS3FileSystem(s3Options());
-
-    S3ResourceId path = S3ResourceId.fromUri("s3://testbucket/testdirectory/nonexistentfile");
-    AmazonS3Exception exception = new AmazonS3Exception("mock exception");
-    exception.setStatusCode(404);
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .getObjectMetadata(
-                argThat(
-                    new GetObjectMetadataRequestMatcher(
-                        new GetObjectMetadataRequest(path.getBucket(), path.getKey())))))
-        .thenThrow(exception);
-
-    MatchResult result = s3FileSystem.matchNonGlobPath(path);
-    assertThat(
-        result,
-        MatchResultMatcher.create(MatchResult.Status.NOT_FOUND, new FileNotFoundException()));
-  }
-
-  @Test
-  public void matchNonGlobForbidden() {
-    S3FileSystem s3FileSystem = buildMockedS3FileSystem(s3Config("s3"));
-
-    AmazonS3Exception exception = new AmazonS3Exception("mock exception");
-    exception.setStatusCode(403);
-    S3ResourceId path = S3ResourceId.fromUri("s3://testbucket/testdirectory/keyname");
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .getObjectMetadata(
-                argThat(
-                    new GetObjectMetadataRequestMatcher(
-                        new GetObjectMetadataRequest(path.getBucket(), path.getKey())))))
-        .thenThrow(exception);
-
-    assertThat(
-        s3FileSystem.matchNonGlobPath(path),
-        MatchResultMatcher.create(MatchResult.Status.ERROR, new IOException(exception)));
-  }
-
-  @Test
-  public void matchNonGlobForbiddenWithS3Options() {
-    S3FileSystem s3FileSystem = buildMockedS3FileSystem(s3Options());
-
-    AmazonS3Exception exception = new AmazonS3Exception("mock exception");
-    exception.setStatusCode(403);
-    S3ResourceId path = S3ResourceId.fromUri("s3://testbucket/testdirectory/keyname");
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .getObjectMetadata(
-                argThat(
-                    new GetObjectMetadataRequestMatcher(
-                        new GetObjectMetadataRequest(path.getBucket(), path.getKey())))))
-        .thenThrow(exception);
-
-    assertThat(
-        s3FileSystem.matchNonGlobPath(path),
-        MatchResultMatcher.create(MatchResult.Status.ERROR, new IOException(exception)));
-  }
-
-  static class ListObjectsV2RequestArgumentMatches
-      implements ArgumentMatcher<ListObjectsV2Request> {
-    private final ListObjectsV2Request expected;
-
-    ListObjectsV2RequestArgumentMatches(ListObjectsV2Request expected) {
-      this.expected = checkNotNull(expected);
-    }
-
-    @Override
-    public boolean matches(ListObjectsV2Request argument) {
-      if (argument instanceof ListObjectsV2Request) {
-        ListObjectsV2Request actual = (ListObjectsV2Request) argument;
-        return expected.getBucketName().equals(actual.getBucketName())
-            && expected.getPrefix().equals(actual.getPrefix())
-            && (expected.getContinuationToken() == null
-                ? actual.getContinuationToken() == null
-                : expected.getContinuationToken().equals(actual.getContinuationToken()));
-      }
-      return false;
-    }
-  }
-
-  @Test
-  public void matchGlob() throws IOException {
-    S3FileSystem s3FileSystem = buildMockedS3FileSystem(s3Config("mys3"));
-
-    S3ResourceId path = S3ResourceId.fromUri("mys3://testbucket/foo/bar*baz");
-
-    ListObjectsV2Request firstRequest =
-        new ListObjectsV2Request()
-            .withBucketName(path.getBucket())
-            .withPrefix(path.getKeyNonWildcardPrefix())
-            .withContinuationToken(null);
-
-    // Expected to be returned; prefix and wildcard/regex match
-    S3ObjectSummary firstMatch = new S3ObjectSummary();
-    firstMatch.setBucketName(path.getBucket());
-    firstMatch.setKey("foo/bar0baz");
-    firstMatch.setSize(100);
-    firstMatch.setLastModified(new Date(1540000000001L));
-
-    // Expected to not be returned; prefix matches, but substring after wildcard does not
-    S3ObjectSummary secondMatch = new S3ObjectSummary();
-    secondMatch.setBucketName(path.getBucket());
-    secondMatch.setKey("foo/bar1qux");
-    secondMatch.setSize(200);
-    secondMatch.setLastModified(new Date(1540000000002L));
-
-    // Expected first request returns continuation token
-    ListObjectsV2Result firstResult = new ListObjectsV2Result();
-    firstResult.setNextContinuationToken("token");
-    firstResult.getObjectSummaries().add(firstMatch);
-    firstResult.getObjectSummaries().add(secondMatch);
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .listObjectsV2(argThat(new ListObjectsV2RequestArgumentMatches(firstRequest))))
-        .thenReturn(firstResult);
-
-    // Expect second request with continuation token
-    ListObjectsV2Request secondRequest =
-        new ListObjectsV2Request()
-            .withBucketName(path.getBucket())
-            .withPrefix(path.getKeyNonWildcardPrefix())
-            .withContinuationToken("token");
-
-    // Expected to be returned; prefix and wildcard/regex match
-    S3ObjectSummary thirdMatch = new S3ObjectSummary();
-    thirdMatch.setBucketName(path.getBucket());
-    thirdMatch.setKey("foo/bar2baz");
-    thirdMatch.setSize(300);
-    thirdMatch.setLastModified(new Date(1540000000003L));
-
-    // Expected second request returns third prefix match and no continuation token
-    ListObjectsV2Result secondResult = new ListObjectsV2Result();
-    secondResult.setNextContinuationToken(null);
-    secondResult.getObjectSummaries().add(thirdMatch);
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .listObjectsV2(argThat(new ListObjectsV2RequestArgumentMatches(secondRequest))))
-        .thenReturn(secondResult);
-
-    // Expect object metadata queries for content encoding
-    ObjectMetadata metadata = new ObjectMetadata();
-    metadata.setContentEncoding("");
-    when(s3FileSystem.getAmazonS3Client().getObjectMetadata(anyObject())).thenReturn(metadata);
-
-    assertThat(
-        s3FileSystem.matchGlobPaths(ImmutableList.of(path)).get(0),
-        MatchResultMatcher.create(
-            ImmutableList.of(
-                MatchResult.Metadata.builder()
-                    .setIsReadSeekEfficient(true)
-                    .setResourceId(
-                        S3ResourceId.fromComponents(
-                            "mys3", firstMatch.getBucketName(), firstMatch.getKey()))
-                    .setSizeBytes(firstMatch.getSize())
-                    .setLastModifiedMillis(firstMatch.getLastModified().getTime())
-                    .build(),
-                MatchResult.Metadata.builder()
-                    .setIsReadSeekEfficient(true)
-                    .setResourceId(
-                        S3ResourceId.fromComponents(
-                            "mys3", thirdMatch.getBucketName(), thirdMatch.getKey()))
-                    .setSizeBytes(thirdMatch.getSize())
-                    .setLastModifiedMillis(thirdMatch.getLastModified().getTime())
-                    .build())));
-  }
-
-  @Test
-  public void matchGlobWithS3Options() throws IOException {
-    S3FileSystem s3FileSystem = buildMockedS3FileSystem(s3Options());
-
-    S3ResourceId path = S3ResourceId.fromUri("s3://testbucket/foo/bar*baz");
-
-    ListObjectsV2Request firstRequest =
-        new ListObjectsV2Request()
-            .withBucketName(path.getBucket())
-            .withPrefix(path.getKeyNonWildcardPrefix())
-            .withContinuationToken(null);
-
-    // Expected to be returned; prefix and wildcard/regex match
-    S3ObjectSummary firstMatch = new S3ObjectSummary();
-    firstMatch.setBucketName(path.getBucket());
-    firstMatch.setKey("foo/bar0baz");
-    firstMatch.setSize(100);
-    firstMatch.setLastModified(new Date(1540000000001L));
-
-    // Expected to not be returned; prefix matches, but substring after wildcard does not
-    S3ObjectSummary secondMatch = new S3ObjectSummary();
-    secondMatch.setBucketName(path.getBucket());
-    secondMatch.setKey("foo/bar1qux");
-    secondMatch.setSize(200);
-    secondMatch.setLastModified(new Date(1540000000002L));
-
-    // Expected first request returns continuation token
-    ListObjectsV2Result firstResult = new ListObjectsV2Result();
-    firstResult.setNextContinuationToken("token");
-    firstResult.getObjectSummaries().add(firstMatch);
-    firstResult.getObjectSummaries().add(secondMatch);
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .listObjectsV2(argThat(new ListObjectsV2RequestArgumentMatches(firstRequest))))
-        .thenReturn(firstResult);
-
-    // Expect second request with continuation token
-    ListObjectsV2Request secondRequest =
-        new ListObjectsV2Request()
-            .withBucketName(path.getBucket())
-            .withPrefix(path.getKeyNonWildcardPrefix())
-            .withContinuationToken("token");
-
-    // Expected to be returned; prefix and wildcard/regex match
-    S3ObjectSummary thirdMatch = new S3ObjectSummary();
-    thirdMatch.setBucketName(path.getBucket());
-    thirdMatch.setKey("foo/bar2baz");
-    thirdMatch.setSize(300);
-    thirdMatch.setLastModified(new Date(1540000000003L));
-
-    // Expected second request returns third prefix match and no continuation token
-    ListObjectsV2Result secondResult = new ListObjectsV2Result();
-    secondResult.setNextContinuationToken(null);
-    secondResult.getObjectSummaries().add(thirdMatch);
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .listObjectsV2(argThat(new ListObjectsV2RequestArgumentMatches(secondRequest))))
-        .thenReturn(secondResult);
-
-    // Expect object metadata queries for content encoding
-    ObjectMetadata metadata = new ObjectMetadata();
-    metadata.setContentEncoding("");
-    when(s3FileSystem.getAmazonS3Client().getObjectMetadata(anyObject())).thenReturn(metadata);
-
-    assertThat(
-        s3FileSystem.matchGlobPaths(ImmutableList.of(path)).get(0),
-        MatchResultMatcher.create(
-            ImmutableList.of(
-                MatchResult.Metadata.builder()
-                    .setIsReadSeekEfficient(true)
-                    .setResourceId(
-                        S3ResourceId.fromComponents(
-                            "s3", firstMatch.getBucketName(), firstMatch.getKey()))
-                    .setSizeBytes(firstMatch.getSize())
-                    .setLastModifiedMillis(firstMatch.getLastModified().getTime())
-                    .build(),
-                MatchResult.Metadata.builder()
-                    .setIsReadSeekEfficient(true)
-                    .setResourceId(
-                        S3ResourceId.fromComponents(
-                            "s3", thirdMatch.getBucketName(), thirdMatch.getKey()))
-                    .setSizeBytes(thirdMatch.getSize())
-                    .setLastModifiedMillis(thirdMatch.getLastModified().getTime())
-                    .build())));
-  }
-
-  @Test
-  public void matchGlobWithSlashes() throws IOException {
-    S3FileSystem s3FileSystem = buildMockedS3FileSystem(s3Config("s3"));
-
-    S3ResourceId path = S3ResourceId.fromUri("s3://testbucket/foo/bar\\baz*");
-
-    ListObjectsV2Request request =
-        new ListObjectsV2Request()
-            .withBucketName(path.getBucket())
-            .withPrefix(path.getKeyNonWildcardPrefix())
-            .withContinuationToken(null);
-
-    // Expected to be returned; prefix and wildcard/regex match
-    S3ObjectSummary firstMatch = new S3ObjectSummary();
-    firstMatch.setBucketName(path.getBucket());
-    firstMatch.setKey("foo/bar\\baz0");
-    firstMatch.setSize(100);
-    firstMatch.setLastModified(new Date(1540000000001L));
-
-    // Expected to not be returned; prefix matches, but substring after wildcard does not
-    S3ObjectSummary secondMatch = new S3ObjectSummary();
-    secondMatch.setBucketName(path.getBucket());
-    secondMatch.setKey("foo/bar/baz1");
-    secondMatch.setSize(200);
-    secondMatch.setLastModified(new Date(1540000000002L));
-
-    // Expected first request returns continuation token
-    ListObjectsV2Result result = new ListObjectsV2Result();
-    result.getObjectSummaries().add(firstMatch);
-    result.getObjectSummaries().add(secondMatch);
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .listObjectsV2(argThat(new ListObjectsV2RequestArgumentMatches(request))))
-        .thenReturn(result);
-
-    // Expect object metadata queries for content encoding
-    ObjectMetadata metadata = new ObjectMetadata();
-    metadata.setContentEncoding("");
-    when(s3FileSystem.getAmazonS3Client().getObjectMetadata(anyObject())).thenReturn(metadata);
-
-    assertThat(
-        s3FileSystem.matchGlobPaths(ImmutableList.of(path)).get(0),
-        MatchResultMatcher.create(
-            ImmutableList.of(
-                MatchResult.Metadata.builder()
-                    .setIsReadSeekEfficient(true)
-                    .setResourceId(
-                        S3ResourceId.fromComponents(
-                            "s3", firstMatch.getBucketName(), firstMatch.getKey()))
-                    .setSizeBytes(firstMatch.getSize())
-                    .setLastModifiedMillis(firstMatch.getLastModified().getTime())
-                    .build())));
-  }
-
-  @Test
-  public void matchGlobWithSlashesWithS3Options() throws IOException {
-    S3FileSystem s3FileSystem = buildMockedS3FileSystem(s3Options());
-
-    S3ResourceId path = S3ResourceId.fromUri("s3://testbucket/foo/bar\\baz*");
-
-    ListObjectsV2Request request =
-        new ListObjectsV2Request()
-            .withBucketName(path.getBucket())
-            .withPrefix(path.getKeyNonWildcardPrefix())
-            .withContinuationToken(null);
-
-    // Expected to be returned; prefix and wildcard/regex match
-    S3ObjectSummary firstMatch = new S3ObjectSummary();
-    firstMatch.setBucketName(path.getBucket());
-    firstMatch.setKey("foo/bar\\baz0");
-    firstMatch.setSize(100);
-    firstMatch.setLastModified(new Date(1540000000001L));
-
-    // Expected to not be returned; prefix matches, but substring after wildcard does not
-    S3ObjectSummary secondMatch = new S3ObjectSummary();
-    secondMatch.setBucketName(path.getBucket());
-    secondMatch.setKey("foo/bar/baz1");
-    secondMatch.setSize(200);
-    secondMatch.setLastModified(new Date(1540000000002L));
-
-    // Expected first request returns continuation token
-    ListObjectsV2Result result = new ListObjectsV2Result();
-    result.getObjectSummaries().add(firstMatch);
-    result.getObjectSummaries().add(secondMatch);
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .listObjectsV2(argThat(new ListObjectsV2RequestArgumentMatches(request))))
-        .thenReturn(result);
-
-    // Expect object metadata queries for content encoding
-    ObjectMetadata metadata = new ObjectMetadata();
-    metadata.setContentEncoding("");
-    when(s3FileSystem.getAmazonS3Client().getObjectMetadata(anyObject())).thenReturn(metadata);
-
-    assertThat(
-        s3FileSystem.matchGlobPaths(ImmutableList.of(path)).get(0),
-        MatchResultMatcher.create(
-            ImmutableList.of(
-                MatchResult.Metadata.builder()
-                    .setIsReadSeekEfficient(true)
-                    .setResourceId(
-                        S3ResourceId.fromComponents(
-                            "s3", firstMatch.getBucketName(), firstMatch.getKey()))
-                    .setSizeBytes(firstMatch.getSize())
-                    .setLastModifiedMillis(firstMatch.getLastModified().getTime())
-                    .build())));
-  }
-
-  @Test
-  public void matchVariousInvokeThreadPool() throws IOException {
-    S3FileSystem s3FileSystem = buildMockedS3FileSystem(s3Config("s3"));
-
-    AmazonS3Exception notFoundException = new AmazonS3Exception("mock exception");
-    notFoundException.setStatusCode(404);
-    S3ResourceId pathNotExist =
-        S3ResourceId.fromUri("s3://testbucket/testdirectory/nonexistentfile");
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .getObjectMetadata(
-                argThat(
-                    new GetObjectMetadataRequestMatcher(
-                        new GetObjectMetadataRequest(
-                            pathNotExist.getBucket(), pathNotExist.getKey())))))
-        .thenThrow(notFoundException);
-
-    AmazonS3Exception forbiddenException = new AmazonS3Exception("mock exception");
-    forbiddenException.setStatusCode(403);
-    S3ResourceId pathForbidden =
-        S3ResourceId.fromUri("s3://testbucket/testdirectory/forbiddenfile");
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .getObjectMetadata(
-                argThat(
-                    new GetObjectMetadataRequestMatcher(
-                        new GetObjectMetadataRequest(
-                            pathForbidden.getBucket(), pathForbidden.getKey())))))
-        .thenThrow(forbiddenException);
-
-    S3ResourceId pathExist = S3ResourceId.fromUri("s3://testbucket/testdirectory/filethatexists");
-    ObjectMetadata s3ObjectMetadata = new ObjectMetadata();
-    s3ObjectMetadata.setContentLength(100);
-    s3ObjectMetadata.setLastModified(new Date(1540000000000L));
-    s3ObjectMetadata.setContentEncoding("not-gzip");
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .getObjectMetadata(
-                argThat(
-                    new GetObjectMetadataRequestMatcher(
-                        new GetObjectMetadataRequest(pathExist.getBucket(), pathExist.getKey())))))
-        .thenReturn(s3ObjectMetadata);
-
-    S3ResourceId pathGlob = S3ResourceId.fromUri("s3://testbucket/path/part*");
-
-    S3ObjectSummary foundListObject = new S3ObjectSummary();
-    foundListObject.setBucketName(pathGlob.getBucket());
-    foundListObject.setKey("path/part-0");
-    foundListObject.setSize(200);
-    foundListObject.setLastModified(new Date(1541000000000L));
-
-    ListObjectsV2Result listObjectsResult = new ListObjectsV2Result();
-    listObjectsResult.setNextContinuationToken(null);
-    listObjectsResult.getObjectSummaries().add(foundListObject);
-    when(s3FileSystem.getAmazonS3Client().listObjectsV2(notNull(ListObjectsV2Request.class)))
-        .thenReturn(listObjectsResult);
-
-    ObjectMetadata metadata = new ObjectMetadata();
-    metadata.setContentEncoding("");
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .getObjectMetadata(
-                argThat(
-                    new GetObjectMetadataRequestMatcher(
-                        new GetObjectMetadataRequest(pathGlob.getBucket(), "path/part-0")))))
-        .thenReturn(metadata);
-
-    assertThat(
-        s3FileSystem.match(
-            ImmutableList.of(
-                pathNotExist.toString(),
-                pathForbidden.toString(),
-                pathExist.toString(),
-                pathGlob.toString())),
-        contains(
-            MatchResultMatcher.create(MatchResult.Status.NOT_FOUND, new FileNotFoundException()),
-            MatchResultMatcher.create(
-                MatchResult.Status.ERROR, new IOException(forbiddenException)),
-            MatchResultMatcher.create(100, 1540000000000L, pathExist, true),
-            MatchResultMatcher.create(
-                200,
-                1541000000000L,
-                S3ResourceId.fromComponents("s3", pathGlob.getBucket(), foundListObject.getKey()),
-                true)));
-  }
-
-  @Test
-  public void matchVariousInvokeThreadPoolWithS3Options() throws IOException {
-    S3FileSystem s3FileSystem = buildMockedS3FileSystem(s3Options());
-
-    AmazonS3Exception notFoundException = new AmazonS3Exception("mock exception");
-    notFoundException.setStatusCode(404);
-    S3ResourceId pathNotExist =
-        S3ResourceId.fromUri("s3://testbucket/testdirectory/nonexistentfile");
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .getObjectMetadata(
-                argThat(
-                    new GetObjectMetadataRequestMatcher(
-                        new GetObjectMetadataRequest(
-                            pathNotExist.getBucket(), pathNotExist.getKey())))))
-        .thenThrow(notFoundException);
-
-    AmazonS3Exception forbiddenException = new AmazonS3Exception("mock exception");
-    forbiddenException.setStatusCode(403);
-    S3ResourceId pathForbidden =
-        S3ResourceId.fromUri("s3://testbucket/testdirectory/forbiddenfile");
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .getObjectMetadata(
-                argThat(
-                    new GetObjectMetadataRequestMatcher(
-                        new GetObjectMetadataRequest(
-                            pathForbidden.getBucket(), pathForbidden.getKey())))))
-        .thenThrow(forbiddenException);
-
-    S3ResourceId pathExist = S3ResourceId.fromUri("s3://testbucket/testdirectory/filethatexists");
-    ObjectMetadata s3ObjectMetadata = new ObjectMetadata();
-    s3ObjectMetadata.setContentLength(100);
-    s3ObjectMetadata.setLastModified(new Date(1540000000000L));
-    s3ObjectMetadata.setContentEncoding("not-gzip");
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .getObjectMetadata(
-                argThat(
-                    new GetObjectMetadataRequestMatcher(
-                        new GetObjectMetadataRequest(pathExist.getBucket(), pathExist.getKey())))))
-        .thenReturn(s3ObjectMetadata);
-
-    S3ResourceId pathGlob = S3ResourceId.fromUri("s3://testbucket/path/part*");
-
-    S3ObjectSummary foundListObject = new S3ObjectSummary();
-    foundListObject.setBucketName(pathGlob.getBucket());
-    foundListObject.setKey("path/part-0");
-    foundListObject.setSize(200);
-    foundListObject.setLastModified(new Date(1541000000000L));
-
-    ListObjectsV2Result listObjectsResult = new ListObjectsV2Result();
-    listObjectsResult.setNextContinuationToken(null);
-    listObjectsResult.getObjectSummaries().add(foundListObject);
-    when(s3FileSystem.getAmazonS3Client().listObjectsV2(notNull(ListObjectsV2Request.class)))
-        .thenReturn(listObjectsResult);
-
-    ObjectMetadata metadata = new ObjectMetadata();
-    metadata.setContentEncoding("");
-    when(s3FileSystem
-            .getAmazonS3Client()
-            .getObjectMetadata(
-                argThat(
-                    new GetObjectMetadataRequestMatcher(
-                        new GetObjectMetadataRequest(pathGlob.getBucket(), "path/part-0")))))
-        .thenReturn(metadata);
-
-    assertThat(
-        s3FileSystem.match(
-            ImmutableList.of(
-                pathNotExist.toString(),
-                pathForbidden.toString(),
-                pathExist.toString(),
-                pathGlob.toString())),
-        contains(
-            MatchResultMatcher.create(MatchResult.Status.NOT_FOUND, new FileNotFoundException()),
-            MatchResultMatcher.create(
-                MatchResult.Status.ERROR, new IOException(forbiddenException)),
-            MatchResultMatcher.create(100, 1540000000000L, pathExist, true),
-            MatchResultMatcher.create(
-                200,
-                1541000000000L,
-                S3ResourceId.fromComponents("s3", pathGlob.getBucket(), foundListObject.getKey()),
-                true)));
-  }
-
-  @Test
-  public void testWriteAndRead() throws IOException {
-    S3FileSystem s3FileSystem = buildMockedS3FileSystem(s3Config("s3"), client);
-
-    client.createBucket("testbucket");
-
-    byte[] writtenArray = new byte[] {0};
-    ByteBuffer bb = ByteBuffer.allocate(writtenArray.length);
-    bb.put(writtenArray);
-
-    // First create an object and write data to it
-    S3ResourceId path = S3ResourceId.fromUri("s3://testbucket/foo/bar.txt");
-    WritableByteChannel writableByteChannel =
-        s3FileSystem.create(
-            path,
-            CreateOptions.StandardCreateOptions.builder().setMimeType("application/text").build());
-    writableByteChannel.write(bb);
-    writableByteChannel.close();
-
-    // Now read the same object
-    ByteBuffer bb2 = ByteBuffer.allocate(writtenArray.length);
-    ReadableByteChannel open = s3FileSystem.open(path);
-    open.read(bb2);
-
-    // And compare the content with the one that was written
-    byte[] readArray = bb2.array();
-    assertArrayEquals(readArray, writtenArray);
-    open.close();
-  }
-
-  @Test
-  public void testWriteAndReadWithS3Options() throws IOException {
-    S3FileSystem s3FileSystem = buildMockedS3FileSystem(s3Options(), client);
-
-    client.createBucket("testbucket");
-
-    byte[] writtenArray = new byte[] {0};
-    ByteBuffer bb = ByteBuffer.allocate(writtenArray.length);
-    bb.put(writtenArray);
-
-    // First create an object and write data to it
-    S3ResourceId path = S3ResourceId.fromUri("s3://testbucket/foo/bar.txt");
-    WritableByteChannel writableByteChannel =
-        s3FileSystem.create(
-            path,
-            CreateOptions.StandardCreateOptions.builder().setMimeType("application/text").build());
-    writableByteChannel.write(bb);
-    writableByteChannel.close();
-
-    // Now read the same object
-    ByteBuffer bb2 = ByteBuffer.allocate(writtenArray.length);
-    ReadableByteChannel open = s3FileSystem.open(path);
-    open.read(bb2);
-
-    // And compare the content with the one that was written
-    byte[] readArray = bb2.array();
-    assertArrayEquals(readArray, writtenArray);
-    open.close();
-  }
-
-  @Test
-  public void testReportLineageOnBucket() {
-    verifyLineage("s3://testbucket", ImmutableList.of("testbucket"));
-    verifyLineage("s3://testbucket/", ImmutableList.of("testbucket"));
-    verifyLineage("s3://testbucket/foo/bar.txt", ImmutableList.of("testbucket", "foo/bar.txt"));
-  }
-
-  private void verifyLineage(String uri, List<String> expected) {
-    S3FileSystem s3FileSystem = buildMockedS3FileSystem(s3Config("mys3"), client);
-    S3ResourceId path = S3ResourceId.fromUri(uri);
-    Lineage mockLineage = mock(Lineage.class);
-    s3FileSystem.reportLineage(path, mockLineage);
-    verify(mockLineage, times(1)).add("s3", expected);
-  }
-
-  /** A mockito argument matcher to implement equality on GetObjectMetadataRequest. */
-  private static class GetObjectMetadataRequestMatcher
-      implements ArgumentMatcher<GetObjectMetadataRequest> {
-    private final GetObjectMetadataRequest expected;
-
-    GetObjectMetadataRequestMatcher(GetObjectMetadataRequest expected) {
-      this.expected = expected;
-    }
-
-    @Override
-    public boolean matches(GetObjectMetadataRequest obj) {
-      if (!(obj instanceof GetObjectMetadataRequest)) {
-        return false;
-      }
-      GetObjectMetadataRequest actual = (GetObjectMetadataRequest) obj;
-      return actual.getBucketName().equals(expected.getBucketName())
-          && actual.getKey().equals(expected.getKey());
-    }
-  }
-}
diff --git a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/s3/S3ResourceIdTest.java b/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/s3/S3ResourceIdTest.java
deleted file mode 100644
index dd759cb63db..00000000000
--- a/sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/s3/S3ResourceIdTest.java
+++ /dev/null
@@ -1,348 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.beam.sdk.io.aws.s3;
-
-import static org.apache.beam.sdk.io.fs.ResolveOptions.StandardResolveOptions.RESOLVE_DIRECTORY;
-import static org.apache.beam.sdk.io.fs.ResolveOptions.StandardResolveOptions.RESOLVE_FILE;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.util.Arrays;
-import java.util.Base64;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.List;
-import org.apache.beam.sdk.io.FileSystems;
-import org.apache.beam.sdk.io.aws.options.S3Options;
-import org.apache.beam.sdk.io.fs.ResolveOptions.StandardResolveOptions;
-import org.apache.beam.sdk.io.fs.ResourceId;
-import org.apache.beam.sdk.io.fs.ResourceIdTester;
-import org.apache.beam.sdk.options.PipelineOptionsFactory;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
-
-/** Tests {@link S3ResourceId}. */
-@RunWith(JUnit4.class)
-public class S3ResourceIdTest {
-
-  @Rule public ExpectedException thrown = ExpectedException.none();
-
-  static final class TestCase {
-
-    final String baseUri;
-    final String relativePath;
-    final StandardResolveOptions resolveOptions;
-    final String expectedResult;
-
-    TestCase(
-        String baseUri,
-        String relativePath,
-        StandardResolveOptions resolveOptions,
-        String expectedResult) {
-      this.baseUri = baseUri;
-      this.relativePath = relativePath;
-      this.resolveOptions = resolveOptions;
-      this.expectedResult = expectedResult;
-    }
-  }
-
-  // Each test case is an expected URL, then the components used to build it.
-  // Empty components result in a double slash.
-  private static final List<TestCase> PATH_TEST_CASES =
-      Arrays.asList(
-          new TestCase("s3://bucket/", "", RESOLVE_DIRECTORY, "s3://bucket/"),
-          new TestCase("s3://bucket", "", RESOLVE_DIRECTORY, "s3://bucket/"),
-          new TestCase("s3://bucket", "path/to/dir", RESOLVE_DIRECTORY, "s3://bucket/path/to/dir/"),
-          new TestCase("s3://bucket", "path/to/object", RESOLVE_FILE, "s3://bucket/path/to/object"),
-          new TestCase(
-              "s3://bucket/path/to/dir/", "..", RESOLVE_DIRECTORY, "s3://bucket/path/to/"));
-
-  private S3ResourceId deserializeFromB64(String base64) throws Exception {
-    ByteArrayInputStream b = new ByteArrayInputStream(Base64.getDecoder().decode(base64));
-    try (ObjectInputStream s = new ObjectInputStream(b)) {
-      return (S3ResourceId) s.readObject();
-    }
-  }
-
-  private String serializeToB64(S3ResourceId r) throws Exception {
-    ByteArrayOutputStream b = new ByteArrayOutputStream();
-    try (ObjectOutputStream s = new ObjectOutputStream(b)) {
-      s.writeObject(r);
-    }
-    return Base64.getEncoder().encodeToString(b.toByteArray());
-  }
-
-  @Test
-  public void testSerialization() throws Exception {
-    String r1Serialized =
-        "rO0ABXNyACpvcmcuYXBhY2hlLmJlYW0uc2RrLmlvLmF3cy5zMy5TM1Jlc291cmNlSWSN8nM8V4cVFwIABEwABmJ1Y2tldHQAEkxqYXZhL2xhbmcvU3RyaW5nO0wAA2tleXEAfgABTAAMbGFzdE1vZGlmaWVkdAAQTGphdmEvdXRpbC9EYXRlO0wABHNpemV0ABBMamF2YS9sYW5nL0xvbmc7eHB0AAZidWNrZXR0AAYvYS9iL2NwcA==";
-    String r2Serialized =
-        "rO0ABXNyACpvcmcuYXBhY2hlLmJlYW0uc2RrLmlvLmF3cy5zMy5TM1Jlc291cmNlSWSN8nM8V4cVFwIABEwABmJ1Y2tldHQAEkxqYXZhL2xhbmcvU3RyaW5nO0wAA2tleXEAfgABTAAMbGFzdE1vZGlmaWVkdAAQTGphdmEvdXRpbC9EYXRlO0wABHNpemV0ABBMamF2YS9sYW5nL0xvbmc7eHB0AAxvdGhlci1idWNrZXR0AAYveC95L3pwc3IADmphdmEubGFuZy5Mb25nO4vkkMyPI98CAAFKAAV2YWx1ZXhyABBqYXZhLmxhbmcuTnVtYmVyhqyVHQuU4IsCAAB4cAAAAAAAAAB7";
-    String r3Serialized =
-        "rO0ABXNyACpvcmcuYXBhY2hlLmJlYW0uc2RrLmlvLmF3cy5zMy5TM1Jlc291cmNlSWSN8nM8V4cVFwIABEwABmJ1Y2tldHQAEkxqYXZhL2xhbmcvU3RyaW5nO0wAA2tleXEAfgABTAAMbGFzdE1vZGlmaWVkdAAQTGphdmEvdXRpbC9EYXRlO0wABHNpemV0ABBMamF2YS9sYW5nL0xvbmc7eHB0AAx0aGlyZC1idWNrZXR0AAkvZm9vL2Jhci9zcgAOamF2YS51dGlsLkRhdGVoaoEBS1l0GQMAAHhwdwgAADgCgmXOAHhw";
-    String r4Serialized =
-        "rO0ABXNyACpvcmcuYXBhY2hlLmJlYW0uc2RrLmlvLmF3cy5zMy5TM1Jlc291cmNlSWSN8nM8V4cVFwIABEwABmJ1Y2tldHQAEkxqYXZhL2xhbmcvU3RyaW5nO0wAA2tleXEAfgABTAAMbGFzdE1vZGlmaWVkdAAQTGphdmEvdXRpbC9EYXRlO0wABHNpemV0ABBMamF2YS9sYW5nL0xvbmc7eHB0AApiYXotYnVja2V0dAAGL2EvYi9jc3IADmphdmEudXRpbC5EYXRlaGqBAUtZdBkDAAB4cHcIAAA33gSV5gB4c3IADmphdmEubGFuZy5Mb25nO4vkkMyPI98CAAFKAAV2YWx1ZXhyABBqYXZhLmxhbmcuTnVtYmVyhqyVHQuU4IsCAAB4cAAAAAAAAAAq";
-
-    S3ResourceId r1 = S3ResourceId.fromComponents("s3", "bucket", "a/b/c");
-    S3ResourceId r2 = S3ResourceId.fromComponents("s3", "other-bucket", "x/y/z").withSize(123);
-    S3ResourceId r3 =
-        S3ResourceId.fromComponents("s3", "third-bucket", "foo/bar/")
-            .withLastModified(new Date(121, Calendar.JULY, 3));
-    S3ResourceId r4 =
-        S3ResourceId.fromComponents("s3", "baz-bucket", "a/b/c")
-            .withSize(42)
-            .withLastModified(new Date(116, Calendar.JULY, 15));
-    S3ResourceId r5 = S3ResourceId.fromComponents("other-scheme", "bucket", "a/b/c");
-    S3ResourceId r6 =
-        S3ResourceId.fromComponents("other-scheme", "baz-bucket", "foo/bar/")
-            .withSize(42)
-            .withLastModified(new Date(116, Calendar.JULY, 5));
-
-    // S3ResourceIds serialized by previous versions should still deserialize.
-    assertEquals(r1, deserializeFromB64(r1Serialized));
-    assertEquals(r2, deserializeFromB64(r2Serialized));
-    assertEquals(r3, deserializeFromB64(r3Serialized));
-    assertEquals(r4, deserializeFromB64(r4Serialized));
-
-    // Current resource IDs should round-trip properly through serialization.
-    assertEquals(r1, deserializeFromB64(serializeToB64(r1)));
-    assertEquals(r2, deserializeFromB64(serializeToB64(r2)));
-    assertEquals(r3, deserializeFromB64(serializeToB64(r3)));
-    assertEquals(r4, deserializeFromB64(serializeToB64(r4)));
-    assertEquals(r5, deserializeFromB64(serializeToB64(r5)));
-    assertEquals(r6, deserializeFromB64(serializeToB64(r6)));
-  }
-
-  @Test
-  public void testResolve() {
-    for (TestCase testCase : PATH_TEST_CASES) {
-      ResourceId resourceId = S3ResourceId.fromUri(testCase.baseUri);
-      ResourceId resolved = resourceId.resolve(testCase.relativePath, testCase.resolveOptions);
-      assertEquals(testCase.expectedResult, resolved.toString());
-    }
-
-    // Tests for common s3 paths.
-    assertEquals(
-        S3ResourceId.fromUri("s3://bucket/tmp/aa"),
-        S3ResourceId.fromUri("s3://bucket/tmp/").resolve("aa", RESOLVE_FILE));
-    assertEquals(
-        S3ResourceId.fromUri("s3://bucket/tmp/aa/bb/cc/"),
-        S3ResourceId.fromUri("s3://bucket/tmp/")
-            .resolve("aa", RESOLVE_DIRECTORY)
-            .resolve("bb", RESOLVE_DIRECTORY)
-            .resolve("cc", RESOLVE_DIRECTORY));
-
-    // Tests absolute path.
-    assertEquals(
-        S3ResourceId.fromUri("s3://bucket/tmp/aa"),
-        S3ResourceId.fromUri("s3://bucket/tmp/bb/").resolve("s3://bucket/tmp/aa", RESOLVE_FILE));
-
-    // Tests bucket with no ending '/'.
-    assertEquals(
-        S3ResourceId.fromUri("s3://my-bucket/tmp"),
-        S3ResourceId.fromUri("s3://my-bucket").resolve("tmp", RESOLVE_FILE));
-
-    // Tests path with unicode
-    assertEquals(
-        S3ResourceId.fromUri("s3://bucket/输出 目录/输出 文件01.txt"),
-        S3ResourceId.fromUri("s3://bucket/输出 目录/").resolve("输出 文件01.txt", RESOLVE_FILE));
-  }
-
-  @Test
-  public void testResolveInvalidInputs() {
-    thrown.expect(IllegalArgumentException.class);
-    thrown.expectMessage("Cannot resolve a file with a directory path: [tmp/]");
-    S3ResourceId.fromUri("s3://my_bucket/").resolve("tmp/", RESOLVE_FILE);
-  }
-
-  @Test
-  public void testResolveInvalidNotDirectory() {
-    ResourceId tmpDir = S3ResourceId.fromUri("s3://my_bucket/").resolve("tmp dir", RESOLVE_FILE);
-
-    thrown.expect(IllegalStateException.class);
-    thrown.expectMessage(
-        "Expected this resource to be a directory, but was [s3://my_bucket/tmp dir]");
-    tmpDir.resolve("aa", RESOLVE_FILE);
-  }
-
-  @Test
-  public void testS3ResolveWithFileBase() {
-    ResourceId resourceId = S3ResourceId.fromUri("s3://bucket/path/to/file");
-    thrown.expect(IllegalStateException.class);
-    resourceId.resolve("child-path", RESOLVE_DIRECTORY); // resource is not a directory
-  }
-
-  @Test
-  public void testResolveParentToFile() {
-    ResourceId resourceId = S3ResourceId.fromUri("s3://bucket/path/to/dir/");
-    thrown.expect(IllegalArgumentException.class);
-    resourceId.resolve("..", RESOLVE_FILE); // '..' only resolves as dir, not as file
-  }
-
-  @Test
-  public void testGetCurrentDirectory() {
-    // Tests s3 paths.
-    assertEquals(
-        S3ResourceId.fromUri("s3://my_bucket/tmp dir/"),
-        S3ResourceId.fromUri("s3://my_bucket/tmp dir/").getCurrentDirectory());
-
-    // Tests path with unicode.
-    assertEquals(
-        S3ResourceId.fromUri("s3://my_bucket/输出 目录/"),
-        S3ResourceId.fromUri("s3://my_bucket/输出 目录/文件01.txt").getCurrentDirectory());
-
-    // Tests bucket with no ending '/'.
-    assertEquals(
-        S3ResourceId.fromUri("s3://my_bucket/"),
-        S3ResourceId.fromUri("s3://my_bucket").getCurrentDirectory());
-    assertEquals(
-        S3ResourceId.fromUri("s3://my_bucket/"),
-        S3ResourceId.fromUri("s3://my_bucket/not-directory").getCurrentDirectory());
-  }
-
-  @Test
-  public void testIsDirectory() {
-    assertTrue(S3ResourceId.fromUri("s3://my_bucket/tmp dir/").isDirectory());
-    assertTrue(S3ResourceId.fromUri("s3://my_bucket/").isDirectory());
-    assertTrue(S3ResourceId.fromUri("s3://my_bucket").isDirectory());
-    assertFalse(S3ResourceId.fromUri("s3://my_bucket/file").isDirectory());
-  }
-
-  @Test
-  public void testInvalidPathNoBucket() {
-    thrown.expect(IllegalArgumentException.class);
-    thrown.expectMessage("Invalid S3 URI: [s3://]");
-    S3ResourceId.fromUri("s3://");
-  }
-
-  @Test
-  public void testInvalidPathNoBucketAndSlash() {
-    thrown.expect(IllegalArgumentException.class);
-    thrown.expectMessage("Invalid S3 URI: [s3:///]");
-    S3ResourceId.fromUri("s3:///");
-  }
-
... 10817 lines suppressed ...