Re: AWS S3 Storage Service gets 403 Forbidden
I just wanted to report that I resolved the issue. Having RAW was one piece of the puzzle. The other was I had this configuration: uri="aws2-s3://bucket-ses-s3-receiving/?... If you notice there is a slash on the end of receiving. Once I changed it to: uri="aws2-s3://bucket-ses-s3-receiving?... (along with using RAW(myKey)) it all started working. Thanks for your help. On Thu, Aug 24, 2023 at 3:08 PM Andrea Cosentino wrote: > > Have a look at > https://github.com/apache/camel-examples/tree/main/examples/main > > Il giorno gio 24 ago 2023 alle ore 22:38 Ross Woolf ha > scritto: > > > I've never used an external file for the properties. Can you point me > > in the right direction? > > > > On Thu, Aug 24, 2023 at 2:28 PM Andrea Cosentino > > wrote: > > > > > > When this happen I usually externalize the properties in a file or I use > > > the camel main properties to inject parameters.. > > > > > > Il gio 24 ago 2023, 22:23 Ross Woolf ha scritto: > > > > > > > > > > > > > > > > uri="aws2-s3://bucket-ses-s3-receiving/?region=us-east-1accessKey=RAW(MY_ACCESS_KEY)secretKey=RAW(MY_SECRET_KEY_WITH+)" > > > > /> > > > > > > > > > > > > > > > > On Thu, Aug 24, 2023 at 2:15 PM Andrea Cosentino > > > > wrote: > > > > > > > > > > Can you show the route now that you're using RAW? > > > > > > > > > > Il gio 24 ago 2023, 22:00 Ross Woolf ha > > scritto: > > > > > > > > > > > My secret key has a +. I used RAW( ) on both the access and secret > > > > > > keys, but the result is the same. I can set a breakpoint and view > > the > > > > > > aws configuration object and both keys make it to the configuration > > > > > > object as they should be. But it fails when creating the > > > > > > HeadBucketRequet object. > > > > > > > > > > > > > > > > > > On Thu, Aug 24, 2023 at 1:23 PM Andrea Cosentino < > > anco...@gmail.com> > > > > > > wrote: > > > > > > > > > > > > > > Do you have particular characters in your key? Prefix the access > > key > > > > > > value > > > > > > > with RAW() and the secret in the same way. > > > > > > > > > > > > > > Il gio 24 ago 2023, 21:13 Ross Woolf ha > > > > scritto: > > > > > > > > > > > > > > > I am trying to use the AWS S3 Storage Service component. I > > have > > > > been > > > > > > > > unsuccessful at getting access to the S3 bucket via the > > > > component. I > > > > > > > > always get a 403 Forbidden error. I am using Camel 3.21.0, > > and I > > > > have > > > > > > > > tried both Java 11 and 17 with the same results. I can > > > > successfully > > > > > > use > > > > > > > > the AWS CLI to get files from the S3 bucket using the API and > > the > > > > > > > > access/secret keys, but using the same keys with the camel S3 > > > > component > > > > > > > > always fails. > > > > > > > > > > > > > > > > The following is my camel route I am trying: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > uri="aws2-s3://bucket-ses-s3-receiving/?region=us-east-1accessKey=MY_ACCESS_KEYsecretKey=MY_SECRET_KEY" > > > > > > > > /> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > The following is the relevant portion of the exception: > > > > > > > > Caused by: > > software.amazon.awssdk.services.s3.model.S3Exception: > > > > null > > > > > > > > (Service: S3, Status Code: 403, Request ID: TA07HFNJRF6D1FGW, > > > > Extended > > > > > > > > Request ID: > > > > > > > > > > > > > > > > > > > > > > > > > > > > Oxv5vee3vzHsWe5LAvbPuu+/kzI/OKf+5pDilV4hxwFas0M8XgYR0EeuZQwrU0KRT9CN/OUlPrA=) > > > > > > > > at > > > > > > > > > > > > > > > > > > > > > > > > > > > > software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleErrorResponse(AwsXmlPredicatedResponseHandler.java:156) > > > > > > > > at > > > > > > > > > > > > > > > > > > > > > > > > > > > > software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleResponse(AwsXmlPredicatedResponseHandler.java:108) > > > > > > > > ... > > > > > > > > at > > > > > > > > > > > > > > > > > > > > > > > > > > > > software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:76) > > > > > > > > at > > > > > > > > > > > > > > > > > > > > > > > > > > > > software.amazon.awssdk.core.client.handler.SdkSyncClientHandler.execute(SdkSyncClientHandler.java:45) > > > > > > > > at > > > > > > > > > > > > > > > > > > > > > > > > > > > > software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:56) > > > > > > > > at > > > > > > > > > > > > > > > > > > > > > > > > > > > > software.amazon.awssdk.services.s3.DefaultS3Client.headBucket(DefaultS3Client.java:5249) > > > > > > > > at > > > > > > > > > > > > > > > > > > > > > > > > > > > > org.apache.camel.component.aws2.s3.AWS2S3Endpoint.doStart(AWS2S3Endpoint.java:102) > > > > > > > > at > > > > > > > > > > > > org.apache.camel.support.service.BaseService.start(BaseService.java:119) > > > > > > > > at
Re: AWS S3 Storage Service gets 403 Forbidden
Have a look at https://github.com/apache/camel-examples/tree/main/examples/main Il giorno gio 24 ago 2023 alle ore 22:38 Ross Woolf ha scritto: > I've never used an external file for the properties. Can you point me > in the right direction? > > On Thu, Aug 24, 2023 at 2:28 PM Andrea Cosentino > wrote: > > > > When this happen I usually externalize the properties in a file or I use > > the camel main properties to inject parameters.. > > > > Il gio 24 ago 2023, 22:23 Ross Woolf ha scritto: > > > > > > > > > > > uri="aws2-s3://bucket-ses-s3-receiving/?region=us-east-1accessKey=RAW(MY_ACCESS_KEY)secretKey=RAW(MY_SECRET_KEY_WITH+)" > > > /> > > > > > > > > > > > > On Thu, Aug 24, 2023 at 2:15 PM Andrea Cosentino > > > wrote: > > > > > > > > Can you show the route now that you're using RAW? > > > > > > > > Il gio 24 ago 2023, 22:00 Ross Woolf ha > scritto: > > > > > > > > > My secret key has a +. I used RAW( ) on both the access and secret > > > > > keys, but the result is the same. I can set a breakpoint and view > the > > > > > aws configuration object and both keys make it to the configuration > > > > > object as they should be. But it fails when creating the > > > > > HeadBucketRequet object. > > > > > > > > > > > > > > > On Thu, Aug 24, 2023 at 1:23 PM Andrea Cosentino < > anco...@gmail.com> > > > > > wrote: > > > > > > > > > > > > Do you have particular characters in your key? Prefix the access > key > > > > > value > > > > > > with RAW() and the secret in the same way. > > > > > > > > > > > > Il gio 24 ago 2023, 21:13 Ross Woolf ha > > > scritto: > > > > > > > > > > > > > I am trying to use the AWS S3 Storage Service component. I > have > > > been > > > > > > > unsuccessful at getting access to the S3 bucket via the > > > component. I > > > > > > > always get a 403 Forbidden error. I am using Camel 3.21.0, > and I > > > have > > > > > > > tried both Java 11 and 17 with the same results. I can > > > successfully > > > > > use > > > > > > > the AWS CLI to get files from the S3 bucket using the API and > the > > > > > > > access/secret keys, but using the same keys with the camel S3 > > > component > > > > > > > always fails. > > > > > > > > > > > > > > The following is my camel route I am trying: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > uri="aws2-s3://bucket-ses-s3-receiving/?region=us-east-1accessKey=MY_ACCESS_KEYsecretKey=MY_SECRET_KEY" > > > > > > > /> > > > > > > > > > > > > > > > > > > > > > > > > > > > > The following is the relevant portion of the exception: > > > > > > > Caused by: > software.amazon.awssdk.services.s3.model.S3Exception: > > > null > > > > > > > (Service: S3, Status Code: 403, Request ID: TA07HFNJRF6D1FGW, > > > Extended > > > > > > > Request ID: > > > > > > > > > > > > > > > > > > > > > > > Oxv5vee3vzHsWe5LAvbPuu+/kzI/OKf+5pDilV4hxwFas0M8XgYR0EeuZQwrU0KRT9CN/OUlPrA=) > > > > > > > at > > > > > > > > > > > > > > > > > > > > > > > software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleErrorResponse(AwsXmlPredicatedResponseHandler.java:156) > > > > > > > at > > > > > > > > > > > > > > > > > > > > > > > software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleResponse(AwsXmlPredicatedResponseHandler.java:108) > > > > > > > ... > > > > > > > at > > > > > > > > > > > > > > > > > > > > > > > software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:76) > > > > > > > at > > > > > > > > > > > > > > > > > > > > > > > software.amazon.awssdk.core.client.handler.SdkSyncClientHandler.execute(SdkSyncClientHandler.java:45) > > > > > > > at > > > > > > > > > > > > > > > > > > > > > > > software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:56) > > > > > > > at > > > > > > > > > > > > > > > > > > > > > > > software.amazon.awssdk.services.s3.DefaultS3Client.headBucket(DefaultS3Client.java:5249) > > > > > > > at > > > > > > > > > > > > > > > > > > > > > > > org.apache.camel.component.aws2.s3.AWS2S3Endpoint.doStart(AWS2S3Endpoint.java:102) > > > > > > > at > > > > > > > > > org.apache.camel.support.service.BaseService.start(BaseService.java:119) > > > > > > > at > > > > > > > > > > > > > > > > > > > > > > > org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:113) > > > > > > > at > > > > > > > > > > > > > > > > org.apache.camel.impl.engine.RouteService.doWarmUp(RouteService.java:184) > > > > > > > at > > > > > > org.apache.camel.impl.engine.RouteService.warmUp(RouteService.java:121) > > > > > > > ... 53 more > > > > > > > > > > > > > > Is there more I need to provide in the aws2-s3 configuration? > Or > > > is > > > > > there > > > > > > > a bug with the way Camel implements the API, or an issue with > the > > > > > awssdk > > > > > > > API itself? I'm stuck and don't know how to figure this out. > > > > > > > Any help is appreciated. >
Re: AWS S3 Storage Service gets 403 Forbidden
I've never used an external file for the properties. Can you point me in the right direction? On Thu, Aug 24, 2023 at 2:28 PM Andrea Cosentino wrote: > > When this happen I usually externalize the properties in a file or I use > the camel main properties to inject parameters.. > > Il gio 24 ago 2023, 22:23 Ross Woolf ha scritto: > > > > > > uri="aws2-s3://bucket-ses-s3-receiving/?region=us-east-1accessKey=RAW(MY_ACCESS_KEY)secretKey=RAW(MY_SECRET_KEY_WITH+)" > > /> > > > > > > > > On Thu, Aug 24, 2023 at 2:15 PM Andrea Cosentino > > wrote: > > > > > > Can you show the route now that you're using RAW? > > > > > > Il gio 24 ago 2023, 22:00 Ross Woolf ha scritto: > > > > > > > My secret key has a +. I used RAW( ) on both the access and secret > > > > keys, but the result is the same. I can set a breakpoint and view the > > > > aws configuration object and both keys make it to the configuration > > > > object as they should be. But it fails when creating the > > > > HeadBucketRequet object. > > > > > > > > > > > > On Thu, Aug 24, 2023 at 1:23 PM Andrea Cosentino > > > > wrote: > > > > > > > > > > Do you have particular characters in your key? Prefix the access key > > > > value > > > > > with RAW() and the secret in the same way. > > > > > > > > > > Il gio 24 ago 2023, 21:13 Ross Woolf ha > > scritto: > > > > > > > > > > > I am trying to use the AWS S3 Storage Service component. I have > > been > > > > > > unsuccessful at getting access to the S3 bucket via the > > component. I > > > > > > always get a 403 Forbidden error. I am using Camel 3.21.0, and I > > have > > > > > > tried both Java 11 and 17 with the same results. I can > > successfully > > > > use > > > > > > the AWS CLI to get files from the S3 bucket using the API and the > > > > > > access/secret keys, but using the same keys with the camel S3 > > component > > > > > > always fails. > > > > > > > > > > > > The following is my camel route I am trying: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > uri="aws2-s3://bucket-ses-s3-receiving/?region=us-east-1accessKey=MY_ACCESS_KEYsecretKey=MY_SECRET_KEY" > > > > > > /> > > > > > > > > > > > > > > > > > > > > > > > > The following is the relevant portion of the exception: > > > > > > Caused by: software.amazon.awssdk.services.s3.model.S3Exception: > > null > > > > > > (Service: S3, Status Code: 403, Request ID: TA07HFNJRF6D1FGW, > > Extended > > > > > > Request ID: > > > > > > > > > > > > > > > > > > Oxv5vee3vzHsWe5LAvbPuu+/kzI/OKf+5pDilV4hxwFas0M8XgYR0EeuZQwrU0KRT9CN/OUlPrA=) > > > > > > at > > > > > > > > > > > > > > > > > > software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleErrorResponse(AwsXmlPredicatedResponseHandler.java:156) > > > > > > at > > > > > > > > > > > > > > > > > > software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleResponse(AwsXmlPredicatedResponseHandler.java:108) > > > > > > ... > > > > > > at > > > > > > > > > > > > > > > > > > software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:76) > > > > > > at > > > > > > > > > > > > > > > > > > software.amazon.awssdk.core.client.handler.SdkSyncClientHandler.execute(SdkSyncClientHandler.java:45) > > > > > > at > > > > > > > > > > > > > > > > > > software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:56) > > > > > > at > > > > > > > > > > > > > > > > > > software.amazon.awssdk.services.s3.DefaultS3Client.headBucket(DefaultS3Client.java:5249) > > > > > > at > > > > > > > > > > > > > > > > > > org.apache.camel.component.aws2.s3.AWS2S3Endpoint.doStart(AWS2S3Endpoint.java:102) > > > > > > at > > > > > > org.apache.camel.support.service.BaseService.start(BaseService.java:119) > > > > > > at > > > > > > > > > > > > > > > > > > org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:113) > > > > > > at > > > > > > > > > > > > org.apache.camel.impl.engine.RouteService.doWarmUp(RouteService.java:184) > > > > > > at > > > > org.apache.camel.impl.engine.RouteService.warmUp(RouteService.java:121) > > > > > > ... 53 more > > > > > > > > > > > > Is there more I need to provide in the aws2-s3 configuration? Or > > is > > > > there > > > > > > a bug with the way Camel implements the API, or an issue with the > > > > awssdk > > > > > > API itself? I'm stuck and don't know how to figure this out. > > > > > > Any help is appreciated. > > > > > > > > > > > >
Re: AWS S3 Storage Service gets 403 Forbidden
When this happen I usually externalize the properties in a file or I use the camel main properties to inject parameters.. Il gio 24 ago 2023, 22:23 Ross Woolf ha scritto: > > uri="aws2-s3://bucket-ses-s3-receiving/?region=us-east-1accessKey=RAW(MY_ACCESS_KEY)secretKey=RAW(MY_SECRET_KEY_WITH+)" > /> > > > > On Thu, Aug 24, 2023 at 2:15 PM Andrea Cosentino > wrote: > > > > Can you show the route now that you're using RAW? > > > > Il gio 24 ago 2023, 22:00 Ross Woolf ha scritto: > > > > > My secret key has a +. I used RAW( ) on both the access and secret > > > keys, but the result is the same. I can set a breakpoint and view the > > > aws configuration object and both keys make it to the configuration > > > object as they should be. But it fails when creating the > > > HeadBucketRequet object. > > > > > > > > > On Thu, Aug 24, 2023 at 1:23 PM Andrea Cosentino > > > wrote: > > > > > > > > Do you have particular characters in your key? Prefix the access key > > > value > > > > with RAW() and the secret in the same way. > > > > > > > > Il gio 24 ago 2023, 21:13 Ross Woolf ha > scritto: > > > > > > > > > I am trying to use the AWS S3 Storage Service component. I have > been > > > > > unsuccessful at getting access to the S3 bucket via the > component. I > > > > > always get a 403 Forbidden error. I am using Camel 3.21.0, and I > have > > > > > tried both Java 11 and 17 with the same results. I can > successfully > > > use > > > > > the AWS CLI to get files from the S3 bucket using the API and the > > > > > access/secret keys, but using the same keys with the camel S3 > component > > > > > always fails. > > > > > > > > > > The following is my camel route I am trying: > > > > > > > > > > > > > > > > > > > > > > > uri="aws2-s3://bucket-ses-s3-receiving/?region=us-east-1accessKey=MY_ACCESS_KEYsecretKey=MY_SECRET_KEY" > > > > > /> > > > > > > > > > > > > > > > > > > > > The following is the relevant portion of the exception: > > > > > Caused by: software.amazon.awssdk.services.s3.model.S3Exception: > null > > > > > (Service: S3, Status Code: 403, Request ID: TA07HFNJRF6D1FGW, > Extended > > > > > Request ID: > > > > > > > > > > > > > > Oxv5vee3vzHsWe5LAvbPuu+/kzI/OKf+5pDilV4hxwFas0M8XgYR0EeuZQwrU0KRT9CN/OUlPrA=) > > > > > at > > > > > > > > > > > > > > software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleErrorResponse(AwsXmlPredicatedResponseHandler.java:156) > > > > > at > > > > > > > > > > > > > > software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleResponse(AwsXmlPredicatedResponseHandler.java:108) > > > > > ... > > > > > at > > > > > > > > > > > > > > software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:76) > > > > > at > > > > > > > > > > > > > > software.amazon.awssdk.core.client.handler.SdkSyncClientHandler.execute(SdkSyncClientHandler.java:45) > > > > > at > > > > > > > > > > > > > > software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:56) > > > > > at > > > > > > > > > > > > > > software.amazon.awssdk.services.s3.DefaultS3Client.headBucket(DefaultS3Client.java:5249) > > > > > at > > > > > > > > > > > > > > org.apache.camel.component.aws2.s3.AWS2S3Endpoint.doStart(AWS2S3Endpoint.java:102) > > > > > at > > > > org.apache.camel.support.service.BaseService.start(BaseService.java:119) > > > > > at > > > > > > > > > > > > > > org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:113) > > > > > at > > > > > > > > > org.apache.camel.impl.engine.RouteService.doWarmUp(RouteService.java:184) > > > > > at > > > org.apache.camel.impl.engine.RouteService.warmUp(RouteService.java:121) > > > > > ... 53 more > > > > > > > > > > Is there more I need to provide in the aws2-s3 configuration? Or > is > > > there > > > > > a bug with the way Camel implements the API, or an issue with the > > > awssdk > > > > > API itself? I'm stuck and don't know how to figure this out. > > > > > Any help is appreciated. > > > > > > > > >
Re: AWS S3 Storage Service gets 403 Forbidden
On Thu, Aug 24, 2023 at 2:15 PM Andrea Cosentino wrote: > > Can you show the route now that you're using RAW? > > Il gio 24 ago 2023, 22:00 Ross Woolf ha scritto: > > > My secret key has a +. I used RAW( ) on both the access and secret > > keys, but the result is the same. I can set a breakpoint and view the > > aws configuration object and both keys make it to the configuration > > object as they should be. But it fails when creating the > > HeadBucketRequet object. > > > > > > On Thu, Aug 24, 2023 at 1:23 PM Andrea Cosentino > > wrote: > > > > > > Do you have particular characters in your key? Prefix the access key > > value > > > with RAW() and the secret in the same way. > > > > > > Il gio 24 ago 2023, 21:13 Ross Woolf ha scritto: > > > > > > > I am trying to use the AWS S3 Storage Service component. I have been > > > > unsuccessful at getting access to the S3 bucket via the component. I > > > > always get a 403 Forbidden error. I am using Camel 3.21.0, and I have > > > > tried both Java 11 and 17 with the same results. I can successfully > > use > > > > the AWS CLI to get files from the S3 bucket using the API and the > > > > access/secret keys, but using the same keys with the camel S3 component > > > > always fails. > > > > > > > > The following is my camel route I am trying: > > > > > > > > > > > > > > > > > uri="aws2-s3://bucket-ses-s3-receiving/?region=us-east-1accessKey=MY_ACCESS_KEYsecretKey=MY_SECRET_KEY" > > > > /> > > > > > > > > > > > > > > > > The following is the relevant portion of the exception: > > > > Caused by: software.amazon.awssdk.services.s3.model.S3Exception: null > > > > (Service: S3, Status Code: 403, Request ID: TA07HFNJRF6D1FGW, Extended > > > > Request ID: > > > > > > > > > > Oxv5vee3vzHsWe5LAvbPuu+/kzI/OKf+5pDilV4hxwFas0M8XgYR0EeuZQwrU0KRT9CN/OUlPrA=) > > > > at > > > > > > > > > > software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleErrorResponse(AwsXmlPredicatedResponseHandler.java:156) > > > > at > > > > > > > > > > software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleResponse(AwsXmlPredicatedResponseHandler.java:108) > > > > ... > > > > at > > > > > > > > > > software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:76) > > > > at > > > > > > > > > > software.amazon.awssdk.core.client.handler.SdkSyncClientHandler.execute(SdkSyncClientHandler.java:45) > > > > at > > > > > > > > > > software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:56) > > > > at > > > > > > > > > > software.amazon.awssdk.services.s3.DefaultS3Client.headBucket(DefaultS3Client.java:5249) > > > > at > > > > > > > > > > org.apache.camel.component.aws2.s3.AWS2S3Endpoint.doStart(AWS2S3Endpoint.java:102) > > > > at > > org.apache.camel.support.service.BaseService.start(BaseService.java:119) > > > > at > > > > > > > > > > org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:113) > > > > at > > > > > > org.apache.camel.impl.engine.RouteService.doWarmUp(RouteService.java:184) > > > > at > > org.apache.camel.impl.engine.RouteService.warmUp(RouteService.java:121) > > > > ... 53 more > > > > > > > > Is there more I need to provide in the aws2-s3 configuration? Or is > > there > > > > a bug with the way Camel implements the API, or an issue with the > > awssdk > > > > API itself? I'm stuck and don't know how to figure this out. > > > > Any help is appreciated. > > > > > >
Re: AWS S3 Storage Service gets 403 Forbidden
Can you show the route now that you're using RAW? Il gio 24 ago 2023, 22:00 Ross Woolf ha scritto: > My secret key has a +. I used RAW( ) on both the access and secret > keys, but the result is the same. I can set a breakpoint and view the > aws configuration object and both keys make it to the configuration > object as they should be. But it fails when creating the > HeadBucketRequet object. > > > On Thu, Aug 24, 2023 at 1:23 PM Andrea Cosentino > wrote: > > > > Do you have particular characters in your key? Prefix the access key > value > > with RAW() and the secret in the same way. > > > > Il gio 24 ago 2023, 21:13 Ross Woolf ha scritto: > > > > > I am trying to use the AWS S3 Storage Service component. I have been > > > unsuccessful at getting access to the S3 bucket via the component. I > > > always get a 403 Forbidden error. I am using Camel 3.21.0, and I have > > > tried both Java 11 and 17 with the same results. I can successfully > use > > > the AWS CLI to get files from the S3 bucket using the API and the > > > access/secret keys, but using the same keys with the camel S3 component > > > always fails. > > > > > > The following is my camel route I am trying: > > > > > > > > > > > > uri="aws2-s3://bucket-ses-s3-receiving/?region=us-east-1accessKey=MY_ACCESS_KEYsecretKey=MY_SECRET_KEY" > > > /> > > > > > > > > > > > > The following is the relevant portion of the exception: > > > Caused by: software.amazon.awssdk.services.s3.model.S3Exception: null > > > (Service: S3, Status Code: 403, Request ID: TA07HFNJRF6D1FGW, Extended > > > Request ID: > > > > > > > Oxv5vee3vzHsWe5LAvbPuu+/kzI/OKf+5pDilV4hxwFas0M8XgYR0EeuZQwrU0KRT9CN/OUlPrA=) > > > at > > > > > > > software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleErrorResponse(AwsXmlPredicatedResponseHandler.java:156) > > > at > > > > > > > software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleResponse(AwsXmlPredicatedResponseHandler.java:108) > > > ... > > > at > > > > > > > software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:76) > > > at > > > > > > > software.amazon.awssdk.core.client.handler.SdkSyncClientHandler.execute(SdkSyncClientHandler.java:45) > > > at > > > > > > > software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:56) > > > at > > > > > > > software.amazon.awssdk.services.s3.DefaultS3Client.headBucket(DefaultS3Client.java:5249) > > > at > > > > > > > org.apache.camel.component.aws2.s3.AWS2S3Endpoint.doStart(AWS2S3Endpoint.java:102) > > > at > org.apache.camel.support.service.BaseService.start(BaseService.java:119) > > > at > > > > > > > org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:113) > > > at > > > > org.apache.camel.impl.engine.RouteService.doWarmUp(RouteService.java:184) > > > at > org.apache.camel.impl.engine.RouteService.warmUp(RouteService.java:121) > > > ... 53 more > > > > > > Is there more I need to provide in the aws2-s3 configuration? Or is > there > > > a bug with the way Camel implements the API, or an issue with the > awssdk > > > API itself? I'm stuck and don't know how to figure this out. > > > Any help is appreciated. > > > >
Re: AWS S3 Storage Service gets 403 Forbidden
My secret key has a +. I used RAW( ) on both the access and secret keys, but the result is the same. I can set a breakpoint and view the aws configuration object and both keys make it to the configuration object as they should be. But it fails when creating the HeadBucketRequet object. On Thu, Aug 24, 2023 at 1:23 PM Andrea Cosentino wrote: > > Do you have particular characters in your key? Prefix the access key value > with RAW() and the secret in the same way. > > Il gio 24 ago 2023, 21:13 Ross Woolf ha scritto: > > > I am trying to use the AWS S3 Storage Service component. I have been > > unsuccessful at getting access to the S3 bucket via the component. I > > always get a 403 Forbidden error. I am using Camel 3.21.0, and I have > > tried both Java 11 and 17 with the same results. I can successfully use > > the AWS CLI to get files from the S3 bucket using the API and the > > access/secret keys, but using the same keys with the camel S3 component > > always fails. > > > > The following is my camel route I am trying: > > > > > > > uri="aws2-s3://bucket-ses-s3-receiving/?region=us-east-1accessKey=MY_ACCESS_KEYsecretKey=MY_SECRET_KEY" > > /> > > > > > > > > The following is the relevant portion of the exception: > > Caused by: software.amazon.awssdk.services.s3.model.S3Exception: null > > (Service: S3, Status Code: 403, Request ID: TA07HFNJRF6D1FGW, Extended > > Request ID: > > > > Oxv5vee3vzHsWe5LAvbPuu+/kzI/OKf+5pDilV4hxwFas0M8XgYR0EeuZQwrU0KRT9CN/OUlPrA=) > > at > > > > software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleErrorResponse(AwsXmlPredicatedResponseHandler.java:156) > > at > > > > software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleResponse(AwsXmlPredicatedResponseHandler.java:108) > > ... > > at > > > > software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:76) > > at > > > > software.amazon.awssdk.core.client.handler.SdkSyncClientHandler.execute(SdkSyncClientHandler.java:45) > > at > > > > software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:56) > > at > > > > software.amazon.awssdk.services.s3.DefaultS3Client.headBucket(DefaultS3Client.java:5249) > > at > > > > org.apache.camel.component.aws2.s3.AWS2S3Endpoint.doStart(AWS2S3Endpoint.java:102) > > at org.apache.camel.support.service.BaseService.start(BaseService.java:119) > > at > > > > org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:113) > > at > > org.apache.camel.impl.engine.RouteService.doWarmUp(RouteService.java:184) > > at org.apache.camel.impl.engine.RouteService.warmUp(RouteService.java:121) > > ... 53 more > > > > Is there more I need to provide in the aws2-s3 configuration? Or is there > > a bug with the way Camel implements the API, or an issue with the awssdk > > API itself? I'm stuck and don't know how to figure this out. > > Any help is appreciated. > >
Re: AWS S3 Storage Service gets 403 Forbidden
Do you have particular characters in your key? Prefix the access key value with RAW() and the secret in the same way. Il gio 24 ago 2023, 21:13 Ross Woolf ha scritto: > I am trying to use the AWS S3 Storage Service component. I have been > unsuccessful at getting access to the S3 bucket via the component. I > always get a 403 Forbidden error. I am using Camel 3.21.0, and I have > tried both Java 11 and 17 with the same results. I can successfully use > the AWS CLI to get files from the S3 bucket using the API and the > access/secret keys, but using the same keys with the camel S3 component > always fails. > > The following is my camel route I am trying: > > > uri="aws2-s3://bucket-ses-s3-receiving/?region=us-east-1accessKey=MY_ACCESS_KEYsecretKey=MY_SECRET_KEY" > /> > > > > The following is the relevant portion of the exception: > Caused by: software.amazon.awssdk.services.s3.model.S3Exception: null > (Service: S3, Status Code: 403, Request ID: TA07HFNJRF6D1FGW, Extended > Request ID: > > Oxv5vee3vzHsWe5LAvbPuu+/kzI/OKf+5pDilV4hxwFas0M8XgYR0EeuZQwrU0KRT9CN/OUlPrA=) > at > > software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleErrorResponse(AwsXmlPredicatedResponseHandler.java:156) > at > > software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleResponse(AwsXmlPredicatedResponseHandler.java:108) > ... > at > > software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:76) > at > > software.amazon.awssdk.core.client.handler.SdkSyncClientHandler.execute(SdkSyncClientHandler.java:45) > at > > software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:56) > at > > software.amazon.awssdk.services.s3.DefaultS3Client.headBucket(DefaultS3Client.java:5249) > at > > org.apache.camel.component.aws2.s3.AWS2S3Endpoint.doStart(AWS2S3Endpoint.java:102) > at org.apache.camel.support.service.BaseService.start(BaseService.java:119) > at > > org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:113) > at > org.apache.camel.impl.engine.RouteService.doWarmUp(RouteService.java:184) > at org.apache.camel.impl.engine.RouteService.warmUp(RouteService.java:121) > ... 53 more > > Is there more I need to provide in the aws2-s3 configuration? Or is there > a bug with the way Camel implements the API, or an issue with the awssdk > API itself? I'm stuck and don't know how to figure this out. > Any help is appreciated. >
AWS S3 Storage Service gets 403 Forbidden
I am trying to use the AWS S3 Storage Service component. I have been unsuccessful at getting access to the S3 bucket via the component. I always get a 403 Forbidden error. I am using Camel 3.21.0, and I have tried both Java 11 and 17 with the same results. I can successfully use the AWS CLI to get files from the S3 bucket using the API and the access/secret keys, but using the same keys with the camel S3 component always fails. The following is my camel route I am trying: The following is the relevant portion of the exception: Caused by: software.amazon.awssdk.services.s3.model.S3Exception: null (Service: S3, Status Code: 403, Request ID: TA07HFNJRF6D1FGW, Extended Request ID: Oxv5vee3vzHsWe5LAvbPuu+/kzI/OKf+5pDilV4hxwFas0M8XgYR0EeuZQwrU0KRT9CN/OUlPrA=) at software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleErrorResponse(AwsXmlPredicatedResponseHandler.java:156) at software.amazon.awssdk.protocols.xml.internal.unmarshall.AwsXmlPredicatedResponseHandler.handleResponse(AwsXmlPredicatedResponseHandler.java:108) ... at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:76) at software.amazon.awssdk.core.client.handler.SdkSyncClientHandler.execute(SdkSyncClientHandler.java:45) at software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:56) at software.amazon.awssdk.services.s3.DefaultS3Client.headBucket(DefaultS3Client.java:5249) at org.apache.camel.component.aws2.s3.AWS2S3Endpoint.doStart(AWS2S3Endpoint.java:102) at org.apache.camel.support.service.BaseService.start(BaseService.java:119) at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:113) at org.apache.camel.impl.engine.RouteService.doWarmUp(RouteService.java:184) at org.apache.camel.impl.engine.RouteService.warmUp(RouteService.java:121) ... 53 more Is there more I need to provide in the aws2-s3 configuration? Or is there a bug with the way Camel implements the API, or an issue with the awssdk API itself? I'm stuck and don't know how to figure this out. Any help is appreciated.