AWS::GameLift::Alias - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

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 Amazon 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

Pattern: .*\S.*

Minimum: 1

Maximum: 1024

Update requires: No interruption

RoutingStrategy

The routing configuration, including routing type and fleet target, for the alias.

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.

Fn::GetAtt

AliasId

A unique identifier for the alias. For example, arn:aws:gamelift:us-west-1::alias/alias-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912

Alias IDs are unique within a Region.

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