Hi, I’ve been playing around with LakeFS Playgroun...
# help
a
Hi, I’ve been playing around with LakeFS Playground (GREAT feature btw 💪🏼) I’m trying to integrate with LakeFS via AWS Java SDK as follows:
Copy code
val logger = LoggerFactory.getLogger("LakeFS Integration Demo")  
val s3client = AmazonS3ClientBuilder.standard()
     .withEndpointConfiguration(AwsClientBuilder.EndpointConfiguration(
          "https://q73alt5prpbezujz.lakefs-demo.io",
          null
      ))
     .withCredentials(ProfileCredentialsProvider("lakefs"))
     .withClientConfiguration(PredefinedClientConfigurations.defaultConfig())
     .build()

val buckets = s3client.listBuckets()
logger.info("listBuckets(): $buckets")
val doesBucketExist = s3client.doesBucketExistV2(buckets.first().name)
logger.info("doesBucketExistV2(): $doesBucketExist")
When I run this snippet I get a weird behaviour.
buckets
evaluates to a list of size 1 containing a bucket named
my-repo
as expected. However,
doesBucketExist
evaluates to
false
In addition, any other API returns 404 (bucket not found)
Copy code
17:02:58.890 [main] INFO LakeFS Integration Demo - listBuckets(): [S3Bucket [name=my-repo, creationDate=Mon Feb 28 12:12:12 IST 2022, owner=null]]
17:02:59.585 [main] INFO LakeFS Integration Demo - doesBucketExistV2(): false
Might be worth mentioning that using the AWS CLI works just fine:
Copy code
» aws --profile lakefs --endpoint-url https://q73alt5prpbezujz.lakefs-demo.io s3 ls
2022-02-28 12:12:12 my-repo

» aws --profile lakefs --endpoint-url https://q73alt5prpbezujz.lakefs-demo.io s3 ls s3://my-repo
                           PRE main/