Skip to content

Commit b092923

Browse files
author
kurt.tometich
committed
updated README and pattern file based on PR comments to include full service names and other minor fixes
1 parent 23ba47c commit b092923

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

eventbridge-pipes-dynamic-message-group-id/README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Assigning a dynamic message group ID from the message body using EventBridge Pipes
1+
# Assigning a dynamic message group ID from the message body using Amazon EventBridge Pipes
22

3-
EventBridge, a serverless event bus service, and SQS, a managed message queuing service, work together in event-driven architectures to route and process messages between AWS services and applications. While EventBridge routes messages to SQS queues for processing by microservices, FIFO queues can be used for strict message ordering. Although EventBridge cannot directly set message group IDs for organizing related messages, EventBridge Pipes provides a solution by allowing dynamic message group ID assignment based on event properties, enabling ordered processing for specific users, applications, or locations without additional coding.
3+
Amazon EventBridge, a serverless event bus service, and Amazon SQS, a managed message queuing service, work together in event-driven architectures to route and process messages between AWS services and applications. While Amazon EventBridge routes messages to Amazon SQS queues for processing by microservices, FIFO queues can be used for strict message ordering. Although Amazon EventBridge cannot directly set message group IDs for organizing related messages, Amazon EventBridge Pipes provides a solution by allowing dynamic message group ID assignment based on event properties, enabling ordered processing for specific users, applications, or locations without additional coding.
44

5-
Learn more about this pattern at Serverless Land Patterns: https://serverlessland.com/patterns/eventbridge-pipes-dynamic-message-group-id
5+
Learn more about this pattern at Serverless Land Patterns: https://serverlessland.com/patterns/Amazon EventBridge-pipes-dynamic-message-group-id
66

77
> [!Important]
88
> This application uses various AWS services and there are costs associated with these services after the Free Tier usage - please see the [AWS Pricing page](https://aws.amazon.com/pricing/) for details. You are responsible for any AWS costs incurred. No warranty is implied in this example.
@@ -22,55 +22,55 @@ Learn more about this pattern at Serverless Land Patterns: https://serverlesslan
2222
```
2323
2. Change directory to the pattern directory:
2424
```
25-
cd eventbridge-pipes-dynamic-message-group-id
25+
cd Amazon EventBridge-pipes-dynamic-message-group-id
2626
```
2727
2828
3. Build and deploy the SAM application
2929
```bash
30-
sam build && sam deploy --guided
30+
sam deploy --guided
3131
```
3232

3333
During the prompts:
3434
* Enter a stack name
3535
* Enter the desired AWS Region
3636
* Allow SAM CLI to create IAM roles with the required permissions.
3737

38-
You can accept all other defaults. Copy down the SQS Output Queue URL. You'll use this later in testing.
38+
You can accept all other defaults. Copy down the Amazon SQS Output Queue URL. You'll use this later in testing.
3939

4040
Once you have run `sam deploy --guided` mode once and saved arguments to a configuration file (samconfig.toml), you can use `sam deploy` in future to use these defaults.
4141

4242
## How it works
43-
![AWS Architecture EventBridge rule to SQS FIFO Queue to EventBridge Pipe to SQS FIFO Queue with message group ID set](assets/architecture.png)
43+
![AWS Architecture Amazon EventBridge rule to Amazon SQS FIFO Queue to Amazon EventBridge Pipe to Amazon SQS FIFO Queue with message group ID set](assets/architecture.png)
4444

45-
This project implements an event processing pipeline using AWS EventBridge and SQS FIFO queues. The pipeline consists of:
45+
This project implements an event processing pipeline using Amazon EventBridge and Amazon SQS FIFO queues. The pipeline consists of:
4646

47-
- An EventBridge rule that captures events from "my-custom-app" source
48-
- An input SQS FIFO queue that receives events from the EventBridge rule
49-
- An EventBridge pipe that processes messages from the input queue and dynamically sets the message group ID for the target SQS FIFO queue
50-
- An output SQS FIFO queue that receives processed messages
47+
- An Amazon EventBridge rule that captures events from "my-custom-app" source
48+
- An input Amazon SQS FIFO queue that receives events from the Amazon EventBridge rule
49+
- An Amazon EventBridge pipe that processes messages from the input queue and dynamically sets the message group ID for the target Amazon SQS FIFO queue
50+
- An output Amazon SQS FIFO queue that receives processed messages
5151

5252
A key component of this pattern is the syntax in the EventBrige Pipe Target to obtain the correct property value to set the message group id. The following shows an example in the AWS Console. You can also view this configuration in the SAM template under the CustomEventPipe resource.
53-
![EventBridge Pipe Target Configuration](assets/pipeTargetConfiguration.png)
53+
![Amazon EventBridge Pipe Target Configuration](assets/pipeTargetConfiguration.png)
5454

5555
## Testing
5656

57-
To test, you'll send an event from a custom source to EventBridge, which will trigger the EventBridge rule to send the event to an SQS FIFO Queue. You'll then wait for the EventBridge pipe to process and finally verify the message within the destination SQS FIFO queue with the message group ID set.
57+
To test, you'll send an event from a custom source to Amazon EventBridge, which will trigger the Amazon EventBridge rule to send the event to an Amazon SQS FIFO Queue. You'll then wait for the Amazon EventBridge pipe to process and finally verify the message within the destination Amazon SQS FIFO queue with the message group ID set.
5858

59-
1. Send a test event to EventBridge. Take a look at the event structure and attributes. The account attribute will be used as the message group ID.
59+
1. Send a test event to Amazon EventBridge. Take a look at the event structure and attributes. The account attribute will be used as the message group ID.
6060
```bash
6161
aws events put-events --entries file://events/test-event.json
6262
```
6363

64-
2. Wait for a couple seconds for the EventBridge pipe to process the message, then check the output queue. Make sure you replace the queue-url value with the correct output queue URL from deployment.
64+
2. Wait for a couple seconds for the Amazon EventBridge pipe to process the message, then check the output queue. Make sure you replace the queue-url value with the correct output queue URL from deployment.
6565
```bash
66-
aws sqs receive-message \
66+
aws Amazon SQS receive-message \
6767
--queue-url <OUTPUT_QUEUE_URL> \
6868
--attribute-names All \
6969
--message-attribute-names All \
7070
--max-number-of-messages 10
7171
```
7272

73-
You should see a list of messages. View the event and take note of the MessageGroupID under the Attributes section. This originally came from your event input "accountId" property. The EventBridge Pipe is what allows us to perform this modification. Feel free to modify the event, send additional events to EventBridge and review the output queue messages.
73+
You should see a list of messages. View the event and take note of the MessageGroupID under the Attributes section. This originally came from your event input "accountId" property. The Amazon EventBridge Pipe is what allows us to perform this modification. Feel free to modify the event, send additional events to Amazon EventBridge and review the output queue messages.
7474

7575
## Cleanup
7676

eventbridge-pipes-dynamic-message-group-id/example-pattern.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"title": "EventBridge Pipes Dynamic Message Group Id",
3-
"description": "Uses EventBridge Pipes to dynamically retrieve and set the message group ID for a SQS FIFO destination queue",
4-
"language": "",
2+
"title": "Set an Amazon SQS FIFO queue's message group ID with an EventBridge Pipe",
3+
"description": "Uses Amazon EventBridge Pipes to dynamically retrieve and set the message group ID for a SQS FIFO destination queue",
4+
"language": "YAML",
55
"level": "200",
66
"framework": "AWS SAM",
77
"introBox": {
88
"headline": "How it works",
99
"text": [
10-
"This pattern demonstrates how to use EventBridge rules, EventBridge Pipes and SQS FIFO queues to dynamically retrieve and set a message group ID from the message body for an SQS FIFO queue."
10+
"This pattern demonstrates how to use an Amazon EventBridge rule, Amazon EventBridge Pipes and Amazon SQS FIFO queues to dynamically retrieve and set a message group ID from the message body for an Amazon SQS FIFO queue."
1111
]
1212
},
1313
"gitHub": {
@@ -21,15 +21,15 @@
2121
"resources": {
2222
"bullets": [
2323
{
24-
"text": "AWS EventBridge Pipes",
24+
"text": "Amazon EventBridge Pipes",
2525
"link": "https://aws.amazon.com/eventbridge/pipes/"
2626
},
2727
{
28-
"text": "AWS EventBridge Pipes SQS Source",
28+
"text": "Amazon EventBridge User Guide",
2929
"link": "https://docs.aws.amazon.com/eventbridge/latest/userguide/"
3030
},
3131
{
32-
"text": "AWS SQS FIFO Queues",
32+
"text": "Amazon SQS (Simple Queue Service) FIFO (First-In-First-Out) Queues",
3333
"link": "https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-fifo-queues.html"
3434
}
3535
]
@@ -52,7 +52,7 @@
5252
"authors": [
5353
{
5454
"name": "Kurt Tometich",
55-
"image": "https://drive.google.com/uc?export=view&id=16K9snJRzXYTI7O0nYbzrKVYP58xOxciB",
55+
"image": "https://raw.githubusercontent.com/boomtown15/static-references/refs/heads/main/kurt-tometich.jpeg",
5656
"bio": "Kurt is a Sr. Solutions Architect based in Colorado who enjoys building lean, mean serverless solutions.",
5757
"linkedin": "kurt-tometich",
5858
"twitter": ""

0 commit comments

Comments
 (0)