Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: Upgrade to AWS SDK v3 #1201

Merged
merged 3 commits into from
May 8, 2024
Merged

fix: Upgrade to AWS SDK v3 #1201

merged 3 commits into from
May 8, 2024

Conversation

seb-cr
Copy link
Contributor

@seb-cr seb-cr commented Apr 4, 2024

AWS SDK v2 will enter maintenance mode in September and will become unmaintained in 2025, as announced here.

Documentation for AWS SDK v3 can be found here, however it is often not particularly helpful unless you know exactly what you're looking for. This upgrade guide is helpful for filling in some of the gaps.

This upgrade should not introduce behavioural changes. It removes the peer dependency on aws-sdk, and I've added the new AWS SDK packages as direct dependencies instead. This will make the update process as simple as possible (we're still using v2 in most of our services) and adding new peer dependencies would create a breaking change.

Jira: ENG-3211

@seb-cr seb-cr requested review from zhibek and corinja April 4, 2024 08:55
@seb-cr seb-cr merged commit fcfe5d6 into master May 8, 2024
5 checks passed
@seb-cr seb-cr deleted the ENG-3211/aws-sdk-v3 branch May 8, 2024 12:57
Copy link

github-actions bot commented May 8, 2024

🎉 This PR is included in version 2.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

seb-cr added a commit that referenced this pull request Jul 24, 2024
Replaces some of the harder-to-understand use of callback-style async
and `new Promise` with simpler async-await. As a bonus, we can remove
the `async` dependency!

This also fixes a bug in `SQSService#checkStatus`, where a failed
`listQueues` call can result in a `TypeError` if the `data` parameter of
the callback is undefined or null. Previously the unit tests ignored
this by passing an empty object (see the deleted `createCallbackMock`
function).

No specific Jira ticket, but removal of `async` completes [ENG-3212]

(Note at time of merge: a substantial amount of the callback-style
async calls to AWS APIs were already replaced with Promise chains
when we migrated to AWS SDK v3 in #1201. I've preserved the original
commit message, but it is no longer completely accurate!)

[ENG-3212]: https://comicrelief.atlassian.net/browse/ENG-3212
seb-cr added a commit that referenced this pull request Jan 27, 2025
This has been broken since upgrading to AWS SDK v3 (#1201). The object
body is no longer returned as a `Buffer` but as a `Readable`.

Jira: [ENG-3796]
seb-cr added a commit that referenced this pull request Jan 29, 2025
`BaseConfigService` has been broken since upgrading to AWS SDK v3
(#1201).

- The S3 object body is no longer returned as a `Buffer`, but as a
  `StreamingBlobPayloadOutputTypes`
- Errors now have a capitalised `Code` key, which impacts handling of
  missing config objects

Jira: [ENG-3796]

[ENG-3796]: https://comicrelief.atlassian.net/browse/ENG-3796
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants