Using Route 53 ARC with Amazon EventBridge - Amazon Route 53 Application Recovery Controller

Using Route 53 ARC with Amazon EventBridge

Using Amazon EventBridge, you can set up event-driven rules that monitor your Amazon Route 53 Application Recovery Controller resources and initiate target actions that use other AWS services. For example, you can set a rule for sending out email notifications by signaling an Amazon SNS topic whenever a readiness check status changes from READY to NOT READY.

Note

Route 53 ARC only publishes EventBridge events in the US West (Oregon) (us-west-2) AWS Region. To receive EventBridge events for Route 53 ARC, create EventBridge rules in the US West (Oregon) Region.

You can create rules in Amazon EventBridge to act on any of the following Route 53 ARC events:

  • Recovery group readiness. The event specifies if recovery group readiness status changes, for example, from READY to NOT READY.

  • Cell readiness. The event specifies if cell readiness status changes, for example, from READY to NOT READY.

  • Readiness check readiness. The event specifies if readiness check status changes, for example, from READY to NOT READY.

To capture specific Route 53 ARC events that you're interested in, define event-specific patterns that EventBridge can use to detect the events. Event patterns have the same structure as the events that they match. The pattern quotes the fields that you want to match and provides the values that you're looking for.

Events are emitted on a best effort basis. They're delivered from Route 53 ARC to EventBridge in near real-time under normal operational circumstances. However, situations can arise that might delay or prevent delivery of an event.

For information about how EventBridge rules work with event patterns, see Events and Event Patterns in EventBridge.

Monitor a Route 53 ARC resource with EventBridge

With EventBridge, you can create rules that define actions to take when Route 53 ARC emits events for its resources. For example, you can create a rule that sends you an email message whenever the readiness status of a specific recovery group changes.

The EventBridge console has a Pre-defined pattern option for building Route 53 ARC event patterns. If you select this option in the EventBridge console when you create a rule, you can build a Route 53 ARC event pattern quickly. You only need to select the event fields and values. As you make selections, the console builds and displays the event pattern. Alternatively, you can manually edit the event pattern that you build and can save it as a custom pattern. The console also displays a detailed Sample Event that you can copy and paste to the event pattern that you're building.

If you prefer to type or copy and paste an event pattern into the EventBridge console, you can select to use the Custom pattern option in the console. By doing this, you don't need to go through the steps of selecting fields and values. This topic includes examples of both Route 53 ARC event-matching patterns and Route 53 ARC events that you can use.

To create a rule for a resource event

  1. Open the Amazon EventBridge console at https://console.aws.amazon.com/events/.

  2. Choose Create rule.

  3. Enter a Name for the rule, and, optionally, a description.

  4. Under Define pattern choose Event pattern.

  5. Under Event matching pattern, choose Pre-defined pattern by service.

    Note

    If you already have text for an event pattern and don't need the EventBridge console to build it for you, you can select Customer pattern. You can then either manually enter, or copy and paste, text into the Event Pattern box. Select Save, and then skip to Step 12.

  6. For Service provider, select AWS .

  7. For Service name, select Route 53 ARC.

  8. For Event type, select Status Change.

  9. For Environment select Any environment or Specific environment(s).

    • If you select Specific environment(s), you can choose one or more environments from the drop-down list. EventBridge adds all of environments that you select inside the EnvironmentName[ ] list in the detail section of the event pattern. Then, your rule filters all events to include only the specific environments that you choose.

    • If you select Any environment, then no environments are added to your event pattern. Because of this, your rule doesn't filter any of the Route 53 ARC events based on environment.

  10. The Select event bus section defaults to AWS default event bus. Leave the default selected and confirm that Enable the rule on the selected event bus is toggled on.

  11. Under Select targets, choose the target action to take when a resource state change event is received from Route 53 ARC.

    For example, you can use an Amazon Simple Notification Service (SNS) topic to send an email or text message when an event occurs. To do this, you need to create an Amazon SNS topic using the Amazon SNS console. To learn more, see Using Amazon SNS for user notifications.

    Important

    Some target actions might require the use of other services and incur additional charges, such as the Amazon SNS or Lambda service. For more information about AWS pricing, see https://aws.amazon.com/pricing/. Some services are part of the AWS Free Usage Tier. If you're a new customer, you can try using these services for free. For more information, see https://aws.amazon.com/free/.

  12. (Optional) Choose Add target to specify an additional target action for the event rule.

  13. Choose Create.

Example Route 53 ARC event patterns

Event patterns have the same structure as the events they match. The pattern quotes the fields that you want to match and provides the values that you're looking for.

  • Select all events from Route 53 ARC readiness check.

    { "source": [ "aws.route53-recovery-readiness" ] }
  • Select only events related to cells.

    { "source": [ "aws.route53-recovery-readiness" ], "detail-type": [ "Route 53 Application Recovery Controller cell readiness status change" ] }
  • Select only events related to a specific cell called MyExampleCell.

    { "source": [ "aws.route53-recovery-readiness" ], "detail-type": [ "Route 53 Application Recovery Controller cell readiness status change" ], "resources": [ "arn:aws:route53-recovery-readiness::111122223333:cell/MyExampleCell" ] }
  • Select only events when any recovery group, cell, or readiness check status becomes NOT READY.

    { "source":[ "aws.route53-recovery-readiness" ], "detail-type":{ "new-state":{ "readiness-status":[ "NOT_READY" ] } } }
  • Select only events when any recovery group, cell, or readiness check becomes anything except READY

    { "source":[ "aws.route53-recovery-readiness" ], "detail":{ "new-state":{ "readiness-status":[ { "anything-but":"READY" } ] } } }

Example Route 53 ARC events

The following is an example Route 53 ARC event for a recovery group readiness status change:

{ "version": "0", "account":"111122223333", "detail-type":"Route 53 Application Recovery Controller recovery group readiness status change", "source":"route53-recovery-readiness.amazonaws.com", "time":"2020-11-03T00:31:54Z", "id": "1234a678-1b23-c123-12fd3f456e78", "region": "us-west-2", "resources":[ "arn:aws:route53-recovery-readiness::111122223333:recovery-group/BillingApp" ], "detail": { "recovery-group-name": "BillingApp", "previous-state": { "readiness-status": "READY|NOT_READY|UNKNOWN|NOT_AUTHORIZED" }, "new-state": { "readiness-status": "READY|NOT_READY|UNKNOWN|NOT_AUTHORIZED" } } }

The following is an example Route 53 ARC event for a cell readiness status change:

{ "version": "0", "account":"111122223333", "detail-type":"Route 53 Application Recovery Controller cell readiness status change", "source":"route53-recovery-readiness.amazonaws.com", "time":"2020-11-03T00:31:54Z", "id": "1234a678-1b23-c123-12fd3f456e78", "region": "us-west-2", "resources":[ "arn:aws:route53-recovery-readiness::111122223333:cell/PDXCell" ], "detail": { "cell-name": "PDXCell", "previous-state": { "readiness-status": "READY|NOT_READY|UNKNOWN|NOT_AUTHORIZED" }, "new-state": { "readiness-status": "READY|NOT_READY|UNKNOWN|NOT_AUTHORIZED" } } }

The following is an example Route 53 ARC event for a readiness check status change:

{ "version": "0", "account":"111122223333", "detail-type":"Route 53 Application Recovery Controller readiness check status change", "source":"route53-recovery-readiness.amazonaws.com", "time":"2020-11-03T00:31:54Z", "id": "1234a678-1b23-c123-12fd3f456e78", "region": "us-west-2", "resources":[ "arn:aws:route53-recovery-readiness::111122223333:readiness-check/UserTableReadinessCheck" ], "detail": { "readiness-check-name": "UserTableReadinessCheck", "previous-state": { "readiness-status": "READY|NOT_READY|UNKNOWN|NOT_AUTHORIZED" }, "new-state": { "readiness-status": "READY|NOT_READY|UNKNOWN|NOT_AUTHORIZED" } } }