Jawad Ahmad created CAMEL-18022:
-----------------------------------
Summary: HeadObject 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.16.0, 3.15.0
Reporter: Jawad Ahmad
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}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)