[
https://issues.apache.org/jira/browse/NIFI-8662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17364499#comment-17364499
]
ASF subversion and git services commented on NIFI-8662:
-------------------------------------------------------
Commit 820b2cff29bf3a0d97399667264591b995cc9e45 in nifi's branch
refs/heads/main from Peter Turcsanyi
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=820b2cf ]
NIFI-8662: Using the configured AWS region when parsing from VPCE endpoint URL
fails in AbstractAWSProcessor
This closes #5140.
Signed-off-by: Tamas Palfy <[email protected]>
> Failed to parse AWS region from VPCE endpoint URL in AbstractAWSProcessor
> -------------------------------------------------------------------------
>
> Key: NIFI-8662
> URL: https://issues.apache.org/jira/browse/NIFI-8662
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Peter Turcsanyi
> Assignee: Peter Turcsanyi
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> The AWS client library cannot parse the region from custom endpoint URLs
> properly.
> NIFI-5456 fixed this issue via passing the region configured on the
> processor to {{AmazonWebServiceClient.setEndpoint()}} directly (no parsing
> needed in the client library, neither in NiFi).
> NIFI-5893 implemented the fix in another way: parsing the region from the
> endpoint URL on the NiFi side. It is not clear for me what special use case
> it wanted to solve but a regular VPCE endpoint does not work with it now.
> Endpoint URL:
> {{https://vpce-*****************-********.sqs.us-west-2.vpce.amazonaws.com}}
> Error:
> {code:java}
> 2021-06-04 18:25:57,101 ERROR [Timer-Driven Process Thread-5]
> o.apache.nifi.processors.aws.sqs.PutSQS
> PutSQS[id=c4714170-c2cb-39e9-a36c-c43e4604f64a] Failed to send messages to
> Amazon SQS due to com.amazonaws.services.sqs.model.AmazonSQSException:
> Credential should be scoped to a valid region, not 'us-east-1'. (Service:
> AmazonSQS; Status Code: 403; Error Code: SignatureDoesNotMatch; Request ID:
> 63ea72ad-a856-5eca-8c00-2b99da238d07)
> {code}
> It seems the "sqs" part does not match the regex used for parsing:
> {{^(?:.+[vpce-][a-z0-9-]+\.)?([a-z0-9-]+)$}}.
> However, the endpoint properly works with NIFI-5456 only.
> To support both fixes, I will implement the following logic:
> - use the parse method from NIFI-5893 first and use that region if the parse
> successful (no change here)
> - if the parsing fails, then fall back to NIFI-5456 (that is using the
> configured region) instead of the hard coded "us-east-1"
--
This message was sent by Atlassian Jira
(v8.3.4#803005)