Creating the Rules
Creating the “WaitingCompletion” rule
Step by Step Instructions
-
Go to the EventBridge console. From the AWS Management Console, select Services then select EventBridge Application Integration. Make sure your region is correct.
-
Choose Rules. Choose Create rule.
-
In Step 1 of the wizard:
- For the Name, enter OrderManagerWaitingCompletion.
- For Event bus, enter
Serverlesspresso
.
- Choose Next.
- In Step 2 of the wizard:
- For Event source, select Other.
- Ignore the Sample event panel.
- In the Event pattern panel, paste the following:
{
"source": ["awsserverlessda.serverlesspresso"],
"detail-type": ["OrderManager.WaitingCompletion"]
}
- In Step 3 of the wizard:
- In the Target 1 panel, choose AWS service.
- In the Select a target dropdown, choose SQS queue
- In the Queue dropdown, choose the SQS Queue
MetricsQueue-Cloudwatch
.
- This was deployed by the core stack in the setup module. Tip: you can start typing MetricsQueue-Cloudwatch into the field to find the queue.
- Choose Next.
-
In Step 4 of the wizard, choose Next.
-
In Step 5 of the wizard, check that the Define rule detail panel that the Event bus is Serverlesspresso
. Choose Create rule.