[
https://issues.apache.org/jira/browse/CAMEL-18022?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-18022:
--------------------------------
Fix Version/s: 4.x
(was: 4.8.0)
> 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
> Fix For: 4.x
>
>
> 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)