Messaging Documentation
API Docs
  • Introduction
  • Getting started
    • Transitioning from v2 to v4
  • Message structure
    • Entity messages
      • Message group
      • Action
      • Example messages
    • Configuration messages
      • Message group
      • Action
      • Example messages
    • Financial messages
      • Message group
      • Action
      • Example messages
    • Batch Messages
      • Message group
      • Action
      • Example messages
  • Sample projects
  • Message metrics
  • FAQ
  • SQS - Queues
    • Overview
    • Setting up an SQS message integration
    • SQS queue names
  • SNS - PUB/SUB
    • Overview
    • Setting up an SNS message integration
    • SNS topic names
    • Message attributes
  • 🆕EventBridge
    • Overview
    • Setting up an EventBridge integration
Powered by GitBook
On this page
  • 1. Create a Standard AWS SQS queue
  • 2. Contact your Rightsline representative
  • 3. Create an AWS EventBridge event bus (AWS CLI)
  • 4. Granting access for your SQS queue to receive messages from the Event Bus Rule

Was this helpful?

  1. EventBridge

Setting up an EventBridge integration

PreviousOverview

Last updated 11 months ago

Was this helpful?

1. Create a Standard AWS SQS queue

  1. Log in to the .

  2. Open Amazon SQS from the Services dropdown or the Services search bar at the top of the page.

  3. Click Create queue.

  4. Select Standard queue type.

  5. Give your SQS queue a name, and click Create queue.

  6. Make note of the ARN of the newly created queue.

2. Contact your Rightsline representative

  1. Provide them with your AWS Account ID and the AWS region that you would like to set up your EventBridge integration.

  2. Your Rightsline representative will provide you with your AWS EventBridge event source name. You will use this name to create your AWS EventBridge event bus.

3. Create an AWS EventBridge event bus (AWS CLI)

Because the event bus name has to start with aws.partner/rightsline.com/ it cannot be created in the UI. You must create your AWS EventBridge event bus via the AWS CLI. To do so, run the following commands:

aws events create-event-bus --name aws.partner/rightsline.com/{{EVENT_SOURCE_NAME}} --event-source-name aws.partner/rightsline.com/{{EVENT_SOURCE_NAME}} --region {{REGION}}

At this point the remainder of the setup can continue to be done via the CLI or you can scroll down to see how it can be set up in the Console.

In the above command, replace {{EVENT_SOURCE_NAME}} with the event source name provided by Rightsline in the above. Replace {{REGION}} with the desired region provided to Rightsline in the above.

aws events put-rule --cli-input-json file://rule.json --region {{REGION}}
rule.json
{
    "Description": "Rule Description",
    "EventBusName": "aws.partner/rightsline.com/{{EVENT_SOURCE_NAME}}",
    "EventPattern": "{\"source\": [{\"prefix\": \"aws.partner/rightsline.com/{{EVENT_SOURCE_NAME}}\"}]}",
    "Name": "RuleName",
    "State": "ENABLED"
}
aws events put-targets --cli-input-json file://targets.json --region {{REGION}}
targets.json
{
    "Rule": "RuleName",
    "EventBusName": "aws.partner/rightsline.com/{{EVENT_SOURCE_NAME}}",
    "Targets": [{
            "Id": "1",
            "Arn": "{{SQS_QUEUE_ARN}}"
        }
    ]
}

Create an AWS EventBridge Rule (Console)

Once the steps above have been completed to create the event bus via the CLI, the Rule setup can happen in the console as follows:

  1. Open Rules in the left sidebar menu.

  2. Select your new Event bus from the dropdown, and click Create rule.

  3. Give your rule a name, and make sure Rule with an event pattern is selected. Click Next.

  4. Under Event source, select AWS events or EventBridge partner events.

  1. Under Event pattern, select EventBridge partners, and select Rightsline as the partner. For Event type, select All Events. Click Next.

  1. Add any relevant Tags. Click Next.

  2. Click Create Rule.

4. Granting access for your SQS queue to receive messages from the Event Bus Rule

Once the SQS queue, the Event Bus, and the Event Bus Rule are created, you need to modify the access policy on the SQS queue to allow it to receive messages from your new Event Bus Rule. Navigate to your new SQS queue in the AWS Console, click on Access Policy, then Edit. Your access policy will need to include the following Statement:

{
  "Sid": "sampleStatment",
  "Effect": "Allow",
  "Principal": {
    "Service": "events.amazonaws.com"
  },
  "Action": "sqs:SendMessage",
  "Resource": "{{SQS_QUEUE_ARN}}",
  "Condition": {
    "ArnEquals": {
      "aws:SourceArn": "{{EVENT_BUS_RULE_ARN}}"
    }
  }
}

In the above Statement, replace {{SQS_QUEUE_ARN}} with the ARN of the SQS queue, and {{EVENT_BUS_RULE_ARN}} with the ARN of the Event Bus Rule. This should grant your new Event Bus Rule to forward messages to your SQS queue.

In the above command, replace {{REGION}} with the desired region provided to Rightsline in the above. The file://rule.json file must exist in the directory you are running the command. The file should look like the following:

In the above command, replace {{EVENT_SOURCE_NAME}} with the event source name provided by Rightsline in the above.

In the above command, replace {{REGION}} with the desired region provided to Rightsline in the above. The file://targets.json file must exist in the directory you are running the command. The file should look like the following:

In the above command, replace {{EVENT_SOURCE_NAME}} with the event source name provided by Rightsline in the above. Replace {{SQS_QUEUE_ARN}} with the SQS queue ARN from the above.

Under Target 1, select AWS service, SQS queue, and the queue name created from the . Click Next.

🆕
AWS Console
second section
second section
second section
second section
second section
second section
first section
first section
Rightsline event source
Rightsline event pattern