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 AWS 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:
String
EventBuses:- EndpointEventBus
Name:String
ReplicationConfig:ReplicationConfig
RoleArn:String
RoutingConfig:RoutingConfig
Properties
Description
-
A description for the endpoint.
Required: No
Type: String
Pattern:
.*
Maximum:
512
Update requires: No interruption
EventBuses
-
The event buses being used by the endpoint.
Exactly:
2
Required: Yes
Type: Array of EndpointEventBus
Minimum:
2
Maximum:
2
Update requires: No interruption
Name
-
The name of the endpoint.
Required: No
Type: String
Pattern:
^[\.\-_A-Za-z0-9]+$
Minimum:
1
Maximum:
64
Update requires: Replacement
ReplicationConfig
-
Whether event replication was enabled or disabled for this endpoint. The default state is
ENABLED
which means you must supply aRoleArn
. If you don't have aRoleArn
or 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
Pattern:
^arn:aws[a-z-]*:iam::\d{12}:role\/[\w+=,.@/-]+$
Minimum:
1
Maximum:
256
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 Ref
function, Ref
returns Endpoint ID, such as
mystack-Endpoint-ABCDEFGHIJK
.
For more information about using the Ref
function, see Ref
.
Fn::GetAtt
Arn
-
The ARN of the endpoint.
EndpointId
-
The ID of the endpoint.
EndpointUrl
-
The URL of the endpoint.
State
-
The main Region of the endpoint.
StateReason
-
The reason the endpoint is in its current state.
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