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 host should be 's3.amazonaws.com' in endpoint #494
Comments
you can use s3.amazonaws.com directly, minio-java will figure out the right region using GetBucketLocation(). |
@JayVem The check s3.amazonaws.com is done to avoid minio-java consumer to know the region of the bucket. Passing endpoint as Let me know if this works for you. |
It doesn't work directly with s3.amazonaws.com - I receive an error in Amazon lambda saying that I should use the actual url. As you can see from line 443 in MinioClient.java constructor, the code is specifically looking for s3.amazonaws.com and when I give it s3.us-east-2.amazonaws.com as endpoint, it throws exception. |
what is the error that you get in lambda @JayVem ? |
@JayVem Do you mean you have to use FYI minio-java has inbuilt region cache ie many different S3 calls on same bucket uses only one location query call. |
ok, So here are the issues, when I use credentials given by Lambda environment with code like this - `private String awsKey = System.getenv("AWS_ACCESS_KEY_ID");
I receive an error like this - Now, when I try with no credentials specified (which I thought should work, given the fact that the lambda has access to the s3 bucket) with this code -
Please note in both cases the server url was s3.amazon.com. If I use anything else, then the constructor throws the exception mentioned in the subject line. |
@JayVem Could you check whether
|
Closing this bug as stale. |
When testing file copy on s3, I see an error thrown as specified in the subject of this issue. I noticed in the code that there is a string pattern check for s3.amazonaws.com. This is incorrect expectation. If you see in this link , s3.us-east-2 is also a valid s3 region and so are many others. Please fix this - this especially fails when using minio client from inside a Amazon Lambda function (to which the access to the s3.us-east-2 is already available, since the lambda executes in the same region).
The text was updated successfully, but these errors were encountered: