irods / irods_client_aws_lambda_s3

1 stars 3 forks source link

Don't add s3_bucket to physical path #1

Closed cinek810 closed 4 years ago

cinek810 commented 4 years ago

We found that testing the lambda function for files registration - files were registered with double bucket name as phycical path resulting in S3_FILE_STAT_ERR on attepmt to iget/irepl files.

It looks like s3_bucket is already factored into s3_prefix since bucket name is the one and only directory in / - at least in our setup. Maybe this requires some if/else around.

trel commented 4 years ago

I cannot reproduce the original error. I think this may be a configuration error. Still investigating.

s3_prefix does not contain the bucket name, I have only seen it be an empty string or the path after the root within a particular bucket.

s3_prefix = os.path.dirname(s3_key)

If you print(s3_key) just prior to setting the s3_prefix above, you should not see the bucket name printed out...

trel commented 4 years ago

I have made a few additional changes to the lambda function since this pull request was created. I have still never seen the behavior mentioned.

Can you confirm you're connecting to AWS proper - and not another service that is AWS-like?

cinek810 commented 4 years ago

Yes.. it was AWS, I think it was Frankfurt region.

trel commented 4 years ago

Okay, I'll leave this open, but anything you can find to help reproduce would be great.

trel commented 4 years ago

closing - we've got this deployed in multiple locations - working as expected.

please reach out if you're still having trouble.