You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2022/09/03 12:27:00 UTC

[jira] [Updated] (CAMEL-18022) camel-aws - Head Bucket Request Fails when route is configured to folders in Bucket

     [ https://issues.apache.org/jira/browse/CAMEL-18022?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-18022:
--------------------------------
    Priority: Minor  (was: Major)

> camel-aws - Head Bucket Request Fails when route is configured to folders in Bucket
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-18022
>                 URL: https://issues.apache.org/jira/browse/CAMEL-18022
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-aws2
>    Affects Versions: 3.15.0, 3.16.0
>            Reporter: Jawad Ahmad
>            Assignee: Andrea Cosentino
>            Priority: Minor
>
> I am trying to configure AWS2 S3 component. I have folders under a hierarchy where the bucket name is top of the hierarchy and then different subfolders which will have actual files.
> But when I configure the route, it fails with 403 error on Head Bucket Request. I believe as my bucket name doesn't match the regex pattern (as it contains a subfolder name as well), this request gets failed.
> We need to move away from HeadBucketRequests or provide a way to configure herirchical folders structure. 
> {code:java}
>  try {
>             s3Client.headBucket(HeadBucketRequest.builder().bucket(bucketName).build());
>             LOG.trace("Bucket [{}] already exists", bucketName);
>             return;
>         } catch (AwsServiceException ase) {
>             /* 404 means the bucket doesn't exist */
>             if (!(ase.awsErrorDetails().sdkHttpResponse().statusCode() == 404)) {
>                 throw ase;
>             }
>         }
> {code}
> E.g : If bucket name = Test and folder name = CSV then S3 path of folder would look like : s3://Test/CSV/ . Configuring this in AWS route fails on Bucket Head Request.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)