Skip to content

Proposal: expose a public S3 module #446

@benjreinhart

Description

@benjreinhart

Thank you for your work on Req!. I wanted to suggest an area for improvement:

I want to use the S3-related logic in Req.Utils in my own application for presigning, but that module is not publicly documented which leads me to believe its use is discouraged. However, it is used externally by at least ReqS3. The bulk of S3 logic lives in the Req.Utils module, with ReqS3 a relatively small wrapper around it. All this to say, the boundaries between the two packages are unclear and I'm not sure that a ReqS3 package is necessary if the most important part to encapsulate is provided by Req (i.e., signing utilities).

My proposal is to create an officially supported public interface for S3-related functionality. The exact scope of that module is up for debate, but at a minimum it would need to provide a complete implementation of AWS Signature Version 4. Beyond that, we could consider bringing some of the ReqS3 utilities in, or possibly moving the put_aws_sigv4/1 to this module. Most important is the signing code, which is the foundation everything else needs.

The goals are:

  1. Expose AWS Signature Version 4 (#443 and #445 bring us closer to a complete implementation)
  2. Make a clear interface external code can rely on.
  3. Clarify boundaries between Req and ReqS3
  4. Optionally provide other S3 utiltiies, e.g., presign_url or handle_s3_url step.

Since S3 is ubiquitous in the Cloud, I think a high percentage of projects in the ecosystem would benefit from their HTTP client providing robust utilties for interacting with it.

If agreed this is a good direction, I can open a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions