-
Notifications
You must be signed in to change notification settings - Fork 41
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 Endpoint Resolver #300
S3 Endpoint Resolver #300
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #300 +/- ##
==========================================
- Coverage 88.99% 88.87% -0.13%
==========================================
Files 17 17
Lines 4936 4925 -11
==========================================
- Hits 4393 4377 -16
- Misses 543 548 +5 |
source/s3_endpoint_resolver/aws_s3_endpoint_resolver_partition.c
Outdated
Show resolved
Hide resolved
#include <aws/sdkutils/endpoints_rule_engine.h> | ||
|
||
AWS_PUSH_SANE_WARNING_LEVEL | ||
extern const char aws_s3_endpoint_resolver_partitions[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need it customer header? or can we have it in private header?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix & ship
Co-authored-by: Michael Graeb <graebm@amazon.com>
) | ||
if (AWS_ENABLE_S3_ENDPOINT_RESOLVER) | ||
list(APPEND S3_SRC ${AWS_S3_ENDPOINT_RESOLVER_SRC}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand how this works, just throw out my question:
So, this will only compile the source/s3_endpoint_resolver/*.c
when the cmake config is set. What about the header file? Will Cmake not compile the header files as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it will only include the source when the CMake configuration is set. The header file is always included to simplify things and we warn users not to use it unless it's enabled.
Hi @waahm7 , is there any information available how this should be used? I am trying to direct CRT to use a |
@rvansa This is just a helper to resolve s3 endpoints. You need to override the endpoint at https://github.com/awslabs/aws-c-s3/blob/main/include/aws/s3/s3_client.h#L815. |
@waahm7 Thanks, I found that it is overridden here; I had a bit of hope that this would be intended for a client-wide override as in I am wondering how mature CRT really is - from docs I got the impression that it is the high-performant basis of SDK, but even with |
We have our own HTTP client and don't use Curl. Curl is only used in some integration tests for sanity checks as it is easier to use and compare against.
CRT S3 Client is designed to be used under the SDKs. The SDKs resolve the endpoint, construct an HTTP request, and pass that as a This client is more suited for high-performance GetObject and PutObject operations only. For generic S3 usage like listObjects, the recommendation is normally to use an SDK. Any reasons you are trying to use |
Just a couple things to note: aws_s3_initiate_list_objects is a private function (as its defined in a private header). it does support endpoint override, but in a different way from how meta requests do it. As waahm7 mentioned, aws-c-s3 is not meant to be a full featured sdk, but rather a library for other sdks to implement on top of. You can implement any s3 api on top of aws-c-s3 by using default meta. request type, but that does require manual construction of http request. Some SDKs like java do it. Some SDKs, like cpp you mentioned, only bind out put and get - mostly because default was not quite ready yet when they integrated and there has not been any pressing performance reasons to integrate with non-data plane functions. Note: this is library backing official AWS SDKs. We dont test against anything other than S3 and thus cant guarantee that the client will work against all third party implementations. With that said, we are happy to address any misses in the generic core functionality as long as they are not specific to 3p services. |
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.