gatsby-uc/plugins

chore(gatsby-source-s3): AWS SDK for JavaScript v2 Going Into Maintenance Mode

h93xV2 opened this issue · 7 comments

Describe the bug

When starting up a project with gatsby-source-s3 installed, an error message is displayed. The error message is as follows:

ERROR

(node:22436) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023.

Please migrate your code to use AWS SDK for JavaScript (v3).
For more information, check the migration guide at https://a.co/7PzMCcy
(Use node --trace-warnings ... to show where the warning was created)

To Reproduce

With a Gatsby v4 project:

  1. npm i gatsby-source-s3
  2. Run either gatsby develop or gatsby build.

Expected behavior

Error messages should not be displayed when building the project.

I'm interested in attempting a fix for this if that would be alright.

I'm interested in attempting a fix for this if that would be alright.

Definitely alright! Thanks for the heads up on this.

Great! I'll get started on a pull request.

Well, I've upgraded from 3.2.4 to 4.0.0 several times, but after the build runs there are no images!

During build there are no helpful messages as to what might be going on. Neither there are any console errors on the affected pages. The images are simply not there.

I did the 2 config changes mentioned in https://github.com/gatsby-uc/plugins/blob/main/packages/gatsby-source-s3/CHANGELOG.md#400 namely

  • region is now required for custom endpoints.
  • The accessKeyId and secretAccessKey properties have been moved into the credentials property.

Going back to 3.2.4 is a workaround (everything works) but of course cannot stay that way.

NB local "gatsby develop" does work, images show. The problem only happens with build.

Anybody else suffering this issue?

Could you please reopen this ticket.

Well, I've upgraded from 3.2.4 to 4.0.0 several times, but after the build runs there are no images!

During build there are no helpful messages as to what might be going on. Neither there are any console errors on the affected pages. The images are simply not there.

I did the 2 config changes mentioned in https://github.com/gatsby-uc/plugins/blob/main/packages/gatsby-source-s3/CHANGELOG.md#400 namely

  • region is now required for custom endpoints.
  • The accessKeyId and secretAccessKey properties have been moved into the credentials property.

Going back to 3.2.4 is a workaround (everything works) but of course cannot stay that way.

NB local "gatsby develop" does work, images show. The problem only happens with build.

Anybody else suffering this issue?

Could you please reopen this ticket.

I'd recommend opening a new ticket.

Nevermind. Local develop and also build are OK.

I've found out this happens only on Gatsby Cloud. Investigating there.

Gatsby Cloud support reports that while they continue to investigate it's recommended NOT to use v4 of gatsby-source-s3 on their system.