AWS CloudFormation
User Guide (Version )

AWS::GameLift::Alias

The AWS::GameLift::Alias resource creates an alias for an Amazon GameLift (GameLift) fleet destination. There are two types of routing strategies for aliases: simple and terminal. A simple alias points to an active fleet. A terminal alias displays a message instead of routing players to an active fleet. For example, a terminal alias might display a URL link that directs players to an upgrade site. You can use aliases to define destinations in a game session queue or when requesting new game sessions.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::GameLift::Alias", "Properties" : { "Description" : String, "Name" : String, "RoutingStrategy" : RoutingStrategy } }

YAML

Type: AWS::GameLift::Alias Properties: Description: String Name: String RoutingStrategy: RoutingStrategy

Properties

Description

A human-readable description of the alias.

Required: No

Type: String

Minimum: 1

Maximum: 1024

Update requires: No interruption

Name

A descriptive label that is associated with an alias. Alias names do not need to be unique.

Required: Yes

Type: String

Minimum: 1

Maximum: 1024

Pattern: .*\S.*

Update requires: No interruption

RoutingStrategy

A routing configuration that specifies where traffic is directed for this alias, such as to a fleet or to a message.

Required: Yes

Type: RoutingStrategy

Update requires: No interruption

Return Values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the alias ID, such as alias-1111aaaa-22bb-33cc-44dd-5555eeee66ff.

For more information about using the Ref function, see Ref.

Examples

Create a Simple Alias

The following example creates a simple alias for a fleet. The template uses !Ref to reference a fleet resource, which can be declared elsewhere in the same template.

JSON

{ "Resources": { "AliasResource": { "Properties": { "Name": "MyAlias", "Description": "My Alias Description", "RoutingStrategy": { "Type": "SIMPLE", "FleetId": { "Ref": "FleetResource" } } }, "Type": "AWS::GameLift::Alias" } } }

YAML

Resources: AliasResource: Properties: Name: MyAlias Description: My Alias Description RoutingStrategy: Type: SIMPLE FleetId: !Ref FleetResource Type: AWS::GameLift::Alias

Create terminal alias

The following example creates a terminal alias with a generic terminal message.

JSON

{ "Resources": { "AliasResource": { "Type": "AWS::GameLift::Alias", "Properties": { "Name": "MyTerminalAlias", "Description": "A terminal alias", "RoutingStrategy": { "Type": "TERMINAL", "Message": "Terminal routing strategy message" } } } } }

YAML

Resources: AliasResource: Type: AWS::GameLift::Alias Properties: Name: MyTerminalAlias Description: A terminal alias RoutingStrategy: Type: TERMINAL Message: Terminal routing strategy message

See Also