Closed DyfanJones closed 1 year ago
hi @jkh1,
Sorry about the delay in the minio s3 example. If you remove the region_name
it should work. Here is an example of me creating minio s3 on my local machine :)
library(s3fs)
s3_file_system(
aws_access_key_id = "minioadmin",
aws_secret_access_key = "minioadmin",
endpoint = "http://localhost:9000"
)
s3_dir_ls()
#> [1] ""
s3_bucket_create("s3://testbucket")
#> [1] "s3://testbucket"
# refresh cache
s3_dir_ls(refresh = T)
#> [1] "s3://testbucket"
s3_bucket_delete("s3://testbucket")
#> [1] "s3://testbucket"
# refresh cache
s3_dir_ls(refresh = T)
#> [1] ""
Created on 2022-12-14 with reprex v2.0.2
Please let me know if your having any difficulty :)
I will add this example to the readme 😄
@DyfanJones Thanks for the prompt reply.
If I remove region_name from s3_file_system(), I get Error in get_region(profile_name) : No region provided
It seems the profile mentioned in the errors refer to profiles from an AWS config file that paws can use so could it be that s3fs/paws is looking for missing data in a profile which I don't have since I am not using AWS?
Ah I see, I guess you haven't set up any .aws/credentials or .aws/config files. No worries you can set a default aws region for example: us-east-1
and it should connect file.
library(s3fs)
s3_file_system(
aws_access_key_id = "minioadmin",
aws_secret_access_key = "minioadmin",
region = "us-east-1",
endpoint = "http://localhost:9000",
refresh = T
)
s3_dir_ls()
#> [1] ""
s3_bucket_create("s3://testbucket")
#> [1] "s3://testbucket"
# refresh cache
s3_dir_ls(refresh = T)
#> [1] "s3://testbucket"
s3_bucket_delete("s3://testbucket")
#> [1] "s3://testbucket"
# refresh cache
s3_dir_ls(refresh = T)
#> [1] ""
Created on 2022-12-14 with reprex v2.0.2
I wonder if I should set that as a backup if it fails to get an aws region 🤔
This works although I had tried us-east-1 before, maybe the refresh option did the trick. Thanks.
@jkh1 I have set a default region so you shouldn't get that error again :) I have also added the minio s3 example. please feel free to re-open this ticket if you come across the same issue again.
Trying to use s3fs to access files on a minio server with code like this:
results in
Error in get_region(cfgs$credentials$profile) : No region provided
It looks as if whatever is given as region_name is ignored. Is this a bug or am I going about it wrong?Thx