Skip to content

Commit

Permalink
Upgrade the last remaining use of the v2 AWS SDK to v3
Browse files Browse the repository at this point in the history
The v3 SDK supports the new AWS_ENDPOINT_URL configuration¹ unlike v2.²
This is important for CDC's internally-hosted instance of this codebase,
where they need to swap out S3 for a local S3-compatible service (e.g.
something like Minio, though there are many options).  We might also
want to do something similar for testing/development in the future.

I introduce a more ergonomic API for the S3 operations we use since the
modular API provided by v3 can be a little clunky.  There's a v2-like
API also provided by v3 but not for the operations we need.

The changes to signed URL expiration calculations are necessary because
the v2 SDK was using an earlier version of the AWS signature algorithm
(version 2) and the v3 SDK uses the latest version (version 4).

¹ <https://docs.aws.amazon.com/sdkref/latest/guide/feature-ss-endpoints.html>
² See compatibility table at the bottom of ¹.
  • Loading branch information
tsibley committed Oct 19, 2023
1 parent f0b4c91 commit 4df463b
Show file tree
Hide file tree
Showing 4 changed files with 13,511 additions and 9,762 deletions.
Loading

0 comments on commit 4df463b

Please sign in to comment.