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

Claus Ibsen updated CAMEL-27787:
--------------------------------
    Description: 
Found while improving the option descriptions of camel-aws2-ec2, 
camel-aws2-iam, camel-aws2-msk and camel-aws2-ses for CAMEL-23832 (commit 
https://github.com/apache/camel/commit/99d1fbdc409a4265c151600302845e5b46e06322,
 pull request https://github.com/apache/camel/pull/31134).
These are separate problems of the component; the descriptions change only 
documents the current behavior.

h4. 1. Region.of(null) in the health check
{{AWS2EC2ProducerHealthCheck}}, {{IAM2ProducerHealthCheck}}, 
{{MSK2ProducerHealthCheck}} and {{Ses2ProducerHealthCheck}} call 
{{Region.of(configuration.getRegion())}} without checking that the region is 
set. With no region option, {{Region.of(null)}} throws, the catch-all marks the 
check DOWN, and the client is never tried, although the client works (the AWS 
SDK finds the region from AWS_REGION, the profile, or a client that is set or 
autowired).
The other 21 aws2 health checks (for example {{Sns2ProducerHealthCheck}}, 
{{Lambda2ProducerHealthCheck}}) guard it with 
{{ObjectHelper.isNotEmpty(configuration.getRegion())}}.
Proposed change: the same guard in these 4.

h4. 2. camel-aws2-msk: useSessionCredentials without the keys fails only at 
start
{{MSK2Component.createEndpoint}} accepts useSessionCredentials=true without 
accessKey/secretKey/sessionToken; the error comes when the client is built at 
start, and the component's error message does not mention 
useSessionCredentials. Minor.


_Claude Code on behalf of davsclaus_

  was:
Found while improving the option descriptions of camel-aws2-ec2, 
camel-aws2-iam, camel-aws2-msk and camel-aws2-ses for CAMEL-23832 (pull request 
https://github.com/apache/camel/pull/31134).
These are separate problems of the component; the descriptions change only 
documents the current behavior.

h4. 1. Region.of(null) in the health check
{{AWS2EC2ProducerHealthCheck}}, {{IAM2ProducerHealthCheck}}, 
{{MSK2ProducerHealthCheck}} and {{Ses2ProducerHealthCheck}} call 
{{Region.of(configuration.getRegion())}} without checking that the region is 
set. With no region option, {{Region.of(null)}} throws, the catch-all marks the 
check DOWN, and the client is never tried, although the client works (the AWS 
SDK finds the region from AWS_REGION, the profile, or a client that is set or 
autowired).
The other 21 aws2 health checks (for example {{Sns2ProducerHealthCheck}}, 
{{Lambda2ProducerHealthCheck}}) guard it with 
{{ObjectHelper.isNotEmpty(configuration.getRegion())}}.
Proposed change: the same guard in these 4.

h4. 2. camel-aws2-msk: useSessionCredentials without the keys fails only at 
start
{{MSK2Component.createEndpoint}} accepts useSessionCredentials=true without 
accessKey/secretKey/sessionToken; the error comes when the client is built at 
start, and the component's error message does not mention 
useSessionCredentials. Minor.


_Claude Code on behalf of davsclaus_


> camel-aws2-ec2, camel-aws2-iam, camel-aws2-msk, camel-aws2-ses: the producer 
> health check is DOWN when the region option is not set
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27787
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27787
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-aws2
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.25.0
>
>
> Found while improving the option descriptions of camel-aws2-ec2, 
> camel-aws2-iam, camel-aws2-msk and camel-aws2-ses for CAMEL-23832 (commit 
> https://github.com/apache/camel/commit/99d1fbdc409a4265c151600302845e5b46e06322,
>  pull request https://github.com/apache/camel/pull/31134).
> These are separate problems of the component; the descriptions change only 
> documents the current behavior.
> h4. 1. Region.of(null) in the health check
> {{AWS2EC2ProducerHealthCheck}}, {{IAM2ProducerHealthCheck}}, 
> {{MSK2ProducerHealthCheck}} and {{Ses2ProducerHealthCheck}} call 
> {{Region.of(configuration.getRegion())}} without checking that the region is 
> set. With no region option, {{Region.of(null)}} throws, the catch-all marks 
> the check DOWN, and the client is never tried, although the client works (the 
> AWS SDK finds the region from AWS_REGION, the profile, or a client that is 
> set or autowired).
> The other 21 aws2 health checks (for example {{Sns2ProducerHealthCheck}}, 
> {{Lambda2ProducerHealthCheck}}) guard it with 
> {{ObjectHelper.isNotEmpty(configuration.getRegion())}}.
> Proposed change: the same guard in these 4.
> h4. 2. camel-aws2-msk: useSessionCredentials without the keys fails only at 
> start
> {{MSK2Component.createEndpoint}} accepts useSessionCredentials=true without 
> accessKey/secretKey/sessionToken; the error comes when the client is built at 
> start, and the component's error message does not mention 
> useSessionCredentials. Minor.
> _Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to