Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add new custom-resource patching mechanism for serverless>3.39.0 #254

Merged
merged 2 commits into from
Jun 21, 2024

Conversation

dfangl
Copy link
Member

@dfangl dfangl commented Jun 21, 2024

Motivation

With 3.39.0, serverless migrated their custom resource lambedas to AWS SDK v3, which broke our patching of the s3ForcePathStyle into the global AWS config object.

#252 explains the issue in more detail, with impact explained.

We need to adapt our patching mechanism, while still maintaining backwards compatibility with older serverless versions.

Changes

  • Add new sdk-v3 patching mechanism. There is no global config object anymore, so we are replacing the sdk client instantiation.
  • Try the old patching first, if line is not found, use the new mechanism. This should maintain backwards compatibility.

@dfangl dfangl self-assigned this Jun 21, 2024
@dfangl dfangl requested review from bentsku and whummer June 21, 2024 11:19
Copy link
Contributor

@bentsku bentsku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, super neat! Nice and clean fix! Thanks for addressing this! Also, nice trick for the client instantiation... 👌

@dfangl dfangl force-pushed the fix/bucket-custom-resource-sdk-v3 branch from a396be1 to 2e0eb7a Compare June 21, 2024 12:43
@dfangl
Copy link
Member Author

dfangl commented Jun 21, 2024

I also updated the version to 1.2.1 and added it in the readme. Would be nice if we could release that version after merge

@dfangl dfangl merged commit 811f520 into master Jun 21, 2024
2 checks passed
@dfangl dfangl deleted the fix/bucket-custom-resource-sdk-v3 branch June 21, 2024 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants