fix: extract region from ARN for cross-region SQS delivery#86
Open
tbashiyy wants to merge 1 commit intohectorvent:mainfrom
Open
fix: extract region from ARN for cross-region SQS delivery#86tbashiyy wants to merge 1 commit intohectorvent:mainfrom
tbashiyy wants to merge 1 commit intohectorvent:mainfrom
Conversation
…ntBridge and S3 EventBridge and S3 were using the 3-argument sendMessage overload which defaults to the emulator's default region, ignoring the region in the target SQS ARN. This caused cross-region SQS delivery to fail with NonExistentQueue errors. Now both services extract the region from the ARN and pass it to the region-aware sendMessage overload, consistent with how Lambda and SNS targets are already handled. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Owner
|
Hi @tbashiyy, thanks for taking the time to contribute! We've seen your PR and will take a look soon. To ensure this implementation stays robust, could you also open a PR in our compatibility suite at https://github.com/hectorvent/floci-compatibility-tests? This helps us validate that your changes keep working perfectly as the project evolves. The Floci team |
tbashiyy
added a commit
to tbashiyy/floci-compatibility-tests
that referenced
this pull request
Apr 3, 2026
…ests Validate that EventBridge and S3 notifications correctly deliver messages to SQS queues in a different region (eu-west-1) when the target ARN specifies a non-default region. Covers the fix in hectorvent/floci#86. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
hectorvent
requested changes
Apr 3, 2026
Owner
hectorvent
left a comment
There was a problem hiding this comment.
Hello @tbashiyy,
Thanks for the PR!
Could you please update the commit history to remove the Co-authored-by: Claude <...> line from the commit message? We prefer to keep the attribution focused on human contributors for this project. Once that's cleaned up, I'm happy to take another look!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
EventBridge and S3 were ignoring the region in SQS target ARNs when delivering messages, always using the emulator's default region. This caused cross-region SQS delivery to fail with
NonExistentQueueerrors.Both services now extract the region from the ARN and pass it to the region-aware
sendMessageoverload, consistent with how Lambda and SNS targets are already handled.Affected code paths:
EventBridgeService.invokeTarget— SQS branch (line 420)S3Service.fireNotifications— queue notification loop (line 1027)Type of change
fix:)feat:)feat!:orfix!:)AWS Compatibility
Incorrect behavior:
EventBridgeService.invokeTargetandS3Service.fireNotificationscalledsqsService.sendMessage(queueUrl, payload, 0)(3-arg overload), which internally defaults toregionResolver.getDefaultRegion(). When the SQS target ARN specified a different region (e.g.arn:aws:sqs:eu-west-1:...), the message was sent to the wrong regional queue store, resulting inNonExistentQueueerrors.Other service integrations (SNS→SQS, EventBridge→Lambda, EventBridge→SNS) already extract the region correctly — only the two SQS paths were missing this.
Checklist
./mvnw testpasses locally