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

S3 presigned choose between path and virtual host style #138

Conversation

matthias-schoeneich
Copy link
Contributor

@matthias-schoeneich matthias-schoeneich commented Aug 10, 2023

Currently aws-erlang does path-style addressing for S3 presigned URLs - except for region <<"local">> - where virtual-host style addressing is being used.

AWS on the other side is pushing towards virtual-host style addressing. So newer features are not available via path-style addressing.

My personal use case are S3 Object Lambda's, which - when addressed via path-style - just return a http redirect.

So this PR introduces the possibility to choose from the two options. To not introduce breaking changes, it defaults to path-style addressing while preserving the "hacks" for region <<"local">>.

To make review easier, there are two commits

  • 6f3d601 - which just documents current behavior as eunit tests
  • da23fb5 - which is the actual change

@matthias-schoeneich matthias-schoeneich marked this pull request as draft August 10, 2023 21:31
@matthias-schoeneich matthias-schoeneich marked this pull request as ready for review August 10, 2023 21:37
@onno-vos-dev onno-vos-dev self-requested a review August 14, 2023 08:28
Copy link
Member

@onno-vos-dev onno-vos-dev left a comment

Choose a reason for hiding this comment

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

Could consider adding: -deprecated([{make_presigned_v4_url,5,next_major_release}]). and fully remove it on the next major version.

I'll leave this open for a day in case you want to make that change otherwise I'll merge, tag, release-train 👍

@onno-vos-dev onno-vos-dev merged commit 717768e into aws-beam:master Aug 17, 2023
@onno-vos-dev
Copy link
Member

onno-vos-dev commented Aug 17, 2023

Thank you @matthias-schoeneich for the PR! Merged and tagged as 1.0.2 👌 👍 The release to hex failed to publish the docs. Will look into it but the package is there at least :-)

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