AWS::Events::Endpoint
A global endpoint used to improve your application's availability by making it regional-fault tolerant. For more information about global endpoints, see Making applications Regional-fault tolerant with global endpoints and event replication in the Amazon EventBridge User Guide.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::Events::Endpoint", "Properties" : { "Description" :String, "EventBuses" :[ EndpointEventBus, ... ], "Name" :String, "ReplicationConfig" :ReplicationConfig, "RoleArn" :String, "RoutingConfig" :RoutingConfig} }
YAML
Type: AWS::Events::Endpoint Properties: Description:StringEventBuses:- EndpointEventBusName:StringReplicationConfig:ReplicationConfigRoleArn:StringRoutingConfig:RoutingConfig
Properties
Description-
A description for the endpoint.
Required: No
Type: String
Maximum:
512Pattern:
.*Update requires: No interruption
EventBuses-
The event buses being used by the endpoint.
Exactly:
2Required: Yes
Type: List of EndpointEventBus
Update requires: No interruption
Name-
The name of the endpoint.
Required: No
Type: String
Minimum:
1Maximum:
64Pattern:
[\.\-_A-Za-z0-9]+Update requires: Replacement
ReplicationConfig-
Whether event replication was enabled or disabled for this endpoint. The default state is
ENABLEDwhich means you must supply aRoleArn. If you don't have aRoleArnor you don't want event replication enabled, set the state toDISABLED.Required: No
Type: ReplicationConfig
Update requires: No interruption
RoleArn-
The ARN of the role used by event replication for the endpoint.
Required: No
Type: String
Minimum:
1Maximum:
256Pattern:
^arn:aws[a-z-]*:iam::\d{12}:role\/[\w+=,.@/-]+$Update requires: No interruption
RoutingConfig-
The routing configuration of the endpoint.
Required: Yes
Type: RoutingConfig
Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Reffunction, Refreturns Endpoint ID, such as
mystack-Endpoint-ABCDEFGHIJK.
For more information about using the Reffunction, see Ref.
Fn::GetAtt
Examples
Create a global endpoint with event replication
The following example creates a global endpoint with event replication enabled.
JSON
{ "AWSTemplateFormatVersion": "2010-09-09", "Description": "This template will create an Endpoint resource", "Resources": { "SampleEndpoint": { "Type": "AWS::Events::Endpoint", "Properties": { "Name": "CreateExampleEndpoint", "RoutingConfig": { "FailoverConfig": { "Primary": { "HealthCheck": { "arn:aws:route53:::healthcheck/0123456789abc" } }, "Secondary": { "Route": { "us-east-1" } } } }, "ReplicationConfig": { "State": "ENABLED" }, "RoleArn": { "arn:aws:iam::123456789012:role/EndpointReplicationRole" }, "EventBuses": [ { "EventBusArn": { "arn:aws:events:us-west-2:123456789012:event-bus/ExampleEventBus" } }, { "EventBusArn": { "arn:aws:events:us-east-1:123456789012:event-bus/ExampleEventBus" } } ] } } }, "Outputs": { "SampleEndpointName": { "Value": { "Ref": "SampleEndpoint" } } } }
YAML
AWSTemplateFormatVersion: "2010-09-09" Description: "This template will create an Endpoint resource" Resources: SampleEndpoint: Type: AWS::Events::Endpoint Properties: Name: CreateExampleEndpoint RoutingConfig: FailoverConfig: Primary: HealthCheck: "arn:aws:route53:::healthcheck/0123456789abc" Secondary: Route: "us-east-1" ReplicationConfig: State: "ENABLED" RoleArn: "arn:aws:iam::123456789012:role/EndpointReplicationRole" EventBuses: - EventBusArn: "arn:aws:events:us-west-2:123456789012:event-bus/ExampleEventBus" - EventBusArn: "arn:aws:events:us-east-1:123456789012:event-bus/ExampleEventBus" Outputs: SampleEndpointName: Value: !Ref SampleEndpoint
Create a global endpoint without event replication
The following example creates a global endpoint with event replication disabled.
JSON
{ "AWSTemplateFormatVersion": "2010-09-09", "Description": "This template will create an Endpoint resource", "Resources": { "SampleEndpoint": { "Type": "AWS::Events::Endpoint", "Properties": { "Name": "CreateExampleEndpoint", "RoutingConfig": { "FailoverConfig": { "Primary": { "HealthCheck": { "arn:aws:route53:::healthcheck/0123456789abc" } }, "Secondary": { "Route": { "us-east-1" } } } }, "ReplicationConfig": { "State": "DISABLED" }, "EventBuses": [ { "EventBusArn": { "arn:aws:events:us-west-2:123456789012:event-bus/ExampleEventBus" } }, { "EventBusArn": { "arn:aws:events:us-east-1:123456789012:event-bus/ExampleEventBus" } } ] } } }, "Outputs": { "SampleEndpointName": { "Value": { "Ref": "SampleEndpoint" } } } }
YAML
AWSTemplateFormatVersion: "2010-09-09" Description: "This template will create an Endpoint resource" Resources: SampleEndpoint: Type: AWS::Events::Endpoint Properties: Name: CreateExampleEndpoint RoutingConfig: FailoverConfig: Primary: HealthCheck: "arn:aws:route53:::healthcheck/0123456789abc" Secondary: Route: "us-east-1" ReplicationConfig: State: "DISABLED" EventBuses: - EventBusArn: "arn:aws:events:us-west-2:123456789012:event-bus/ExampleEventBus" - EventBusArn: "arn:aws:events:us-east-1:123456789012:event-bus/ExampleEventBus" Outputs: SampleEndpointName: Value: !Ref SampleEndpoint