aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

feat(events-targets): support messageGroupId for standard SQS queues

Open ravilg-aws opened this issue 1 month ago • 7 comments

Description

EventBridge now supports the messageGroupId parameter for standard (non-FIFO) SQS targets. This PR removes the client-side validation that was preventing customers from using this feature.

Changes

  • Removed validation error in SqsQueue constructor that blocked messageGroupId for standard queues
  • Updated JSDoc to clarify that messageGroupId is now supported for both FIFO and standard queues
  • Updated test from expecting an error to verifying proper CloudFormation synthesis

Background

The EventBridge service API has always supported messageGroupId as an optional parameter for SqsParameters, but the service validation previously rejected it for standard queues. With the recent backend service change (CR-231214910), EventBridge now accepts messageGroupId for standard SQS queues, enabling customers to use this parameter for message grouping.

Testing

  • [x] Unit tests updated to verify messageGroupId works with standard queues
  • [x] Existing FIFO queue tests continue to work
  • [x] All existing SQS target tests pass

Checklist

  • [x] My code adheres to the CONTRIBUTING GUIDE
  • [x] Updated tests
  • [x] Updated documentation

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

ravilg-aws avatar Nov 14 '25 18:11 ravilg-aws

The integration test "destructive changes" are intentional and expected. I've added three new resources to the integration test to demonstrate the messageGroupId feature with standard (non-FIFO) SQS queues:

  • StandardQueue4A8B3C4D: A standard SQS queue
  • StandardQueuePolicyFB772D09: Queue policy granting EventBridge permissions
  • StandardQueueRule2E5F2E91: EventBridge rule configured with SqsParameters.MessageGroupId

These resources are necessary to validate that messageGroupId now works correctly with standard queues, which is the core functionality being added in this PR. The existing test only covered FIFO queues and encrypted queues with dead letter queues - this addition provides coverage for the new standard queue capability.

ravilg-aws avatar Nov 15 '25 19:11 ravilg-aws

@mergifyio update

aemada-aws avatar Dec 01 '25 22:12 aemada-aws

update

❌ Mergify doesn't have permission to update

For security reasons, Mergify can't update this pull request. Try updating locally. GitHub response: refusing to allow a GitHub App to create or update workflow .github/workflows/analytics-metadata-updater.yml without workflows permission

mergify[bot] avatar Dec 01 '25 22:12 mergify[bot]

TestsPassed ✅SkippedFailed
Security Guardian Results26 ran26 passed
TestResult
No test annotations available

github-actions[bot] avatar Dec 06 '25 21:12 github-actions[bot]

TestsPassed ✅SkippedFailed
Security Guardian Results with resolved templates26 ran26 passed
TestResult
No test annotations available

github-actions[bot] avatar Dec 06 '25 21:12 github-actions[bot]

This PR has been in the CHANGES REQUESTED state for 3 weeks, and looks abandoned. Note that PRs with failing linting check or builds are not reviewed, please ensure your build is passing

To prevent automatic closure:

  • Resume work on the PR
  • OR request an exemption by adding a comment containing 'Exemption Request' with justification e.x "Exemption Request: "
  • OR request clarification by adding a comment containing 'Clarification Request' with a question e.x "Clarification Request: "

This PR will automatically close in 14 days if no action is taken.

aws-cdk-automation avatar Dec 07 '25 00:12 aws-cdk-automation

Interesting, the PR linter validation considered it maintainerApproved because of this and removed the needs review label. I think this PR is all set.

evaluation:  {
  "draft": false,
  "mergeable_state": "behind",
  "maintainerRequestedChanges": false,
  "maintainerApproved": true,
  "communityRequestedChanges": false,
  "communityApproved": false,
  "userRequestsExemption": false
}
{
  addLabels: undefined,
  removeLabels: [ 'pr/needs-community-review', 'pr/needs-maintainer-review' ],
  requestChanges: undefined,
  deleteComments: undefined,
  dismissPreviousReview: true
}
Carrying out actions

pahud avatar Dec 10 '25 14:12 pahud

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

mergify[bot] avatar Dec 15 '25 18:12 mergify[bot]

Merge Queue Status

🚫 The pull request has left the queue (rule: default-squash) at 3e192ff7a1db28c59e8864f890384ab078a1855b

This pull request spent 5 seconds in the queue, with no time running CI.

Reason

The pull request can't be updated

For security reasons, Mergify can't update this pull request. Try updating locally. GitHub response: refusing to allow a GitHub App to create or update workflow .github/workflows/codebuild-pr-build.yml without workflows permission

Hint

You should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again. If you think this was a flaky issue, you can requeue the pull request, without updating it, by posting a @mergifyio requeue comment.

mergify[bot] avatar Dec 15 '25 18:12 mergify[bot]

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

mergify[bot] avatar Dec 15 '25 19:12 mergify[bot]

Merge Queue Status

✅ The pull request has been merged at 90475ff6cd387deb5e2218b64031fe8c29da813e

This pull request spent 5 seconds in the queue, with no time running CI. The checks were run in-place.

Required conditions to merge
  • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
    • [X] #36068
  • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
    • [X] #36068
  • [X] any of [🛡 GitHub branch protection]:
    • [X] check-success = validate-pr
    • [ ] check-neutral = validate-pr
    • [ ] check-skipped = validate-pr
  • [X] any of [🛡 GitHub branch protection]:
    • [X] check-success = build
    • [ ] check-neutral = build
    • [ ] check-skipped = build

mergify[bot] avatar Dec 15 '25 19:12 mergify[bot]

Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one.

github-actions[bot] avatar Dec 15 '25 19:12 github-actions[bot]