AWS::GameLift::ContainerGroupDefinition
The properties that describe a container group resource. You can update all properties of a container group definition properties. Updates to a container group definition are saved as new versions.
Used with: CreateContainerGroupDefinition
Returned by: DescribeContainerGroupDefinition, ListContainerGroupDefinitions, UpdateContainerGroupDefinition
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::GameLift::ContainerGroupDefinition", "Properties" : { "ContainerGroupType" :
String
, "GameServerContainerDefinition" :GameServerContainerDefinition
, "Name" :String
, "OperatingSystem" :String
, "SourceVersionNumber" :Integer
, "SupportContainerDefinitions" :[ SupportContainerDefinition, ... ]
, "Tags" :[ Tag, ... ]
, "TotalMemoryLimitMebibytes" :Integer
, "TotalVcpuLimit" :Number
, "VersionDescription" :String
} }
YAML
Type: AWS::GameLift::ContainerGroupDefinition Properties: ContainerGroupType:
String
GameServerContainerDefinition:GameServerContainerDefinition
Name:String
OperatingSystem:String
SourceVersionNumber:Integer
SupportContainerDefinitions:- SupportContainerDefinition
Tags:- Tag
TotalMemoryLimitMebibytes:Integer
TotalVcpuLimit:Number
VersionDescription:String
Properties
ContainerGroupType
-
The type of container group. Container group type determines how Amazon GameLift deploys the container group on each fleet instance.
Required: No
Type: String
Allowed values:
GAME_SERVER | PER_INSTANCE
Update requires: Replacement
GameServerContainerDefinition
-
The definition for the game server container in this group. This property is used only when the container group type is
GAME_SERVER
. This container definition specifies a container image with the game server build.Required: No
Type: GameServerContainerDefinition
Update requires: No interruption
Name
-
A descriptive identifier for the container group definition. The name value is unique in an AWS Region.
Required: Yes
Type: String
Pattern:
^[a-zA-Z0-9-]+$
Minimum:
1
Maximum:
128
Update requires: Replacement
OperatingSystem
-
The platform that all containers in the container group definition run on.
Note
Amazon Linux 2 (AL2) will reach end of support on 6/30/2025. See more details in the Amazon Linux 2 FAQs
. For game servers that are hosted on AL2 and use Amazon GameLift server SDK 4.x, first update the game server build to server SDK 5.x, and then deploy to AL2023 instances. See Migrate to Amazon GameLift server SDK version 5. Required: Yes
Type: String
Allowed values:
AMAZON_LINUX_2023
Update requires: No interruption
SourceVersionNumber
Property description not available.
Required: No
Type: Integer
Minimum:
0
Update requires: No interruption
SupportContainerDefinitions
-
The set of definitions for support containers in this group. A container group definition might have zero support container definitions. Support container can be used in any type of container group.
Required: No
Type: Array of SupportContainerDefinition
Minimum:
1
Maximum:
10
Update requires: No interruption
Property description not available.
Required: No
Type: Array of Tag
Minimum:
0
Maximum:
200
Update requires: No interruption
TotalMemoryLimitMebibytes
-
The amount of memory (in MiB) on a fleet instance to allocate for the container group. All containers in the group share these resources.
You can set a limit for each container definition in the group. If individual containers have limits, this total value must be greater than any individual container's memory limit.
Required: Yes
Type: Integer
Minimum:
4
Maximum:
1024000
Update requires: No interruption
TotalVcpuLimit
-
The amount of vCPU units on a fleet instance to allocate for the container group (1 vCPU is equal to 1024 CPU units). All containers in the group share these resources. You can set a limit for each container definition in the group. If individual containers have limits, this total value must be equal to or greater than the sum of the limits for each container in the group.
Required: Yes
Type: Number
Minimum:
0
Maximum:
10
Update requires: No interruption
VersionDescription
-
An optional description that was provided for a container group definition update. Each version can have a unique description.
Required: No
Type: String
Minimum:
1
Maximum:
1024
Update requires: No interruption
Return values
Ref
Fn::GetAtt
ContainerGroupDefinitionArn
-
The Amazon Resource Name (ARN) that is assigned to an Amazon GameLift
ContainerGroupDefinition
resource. It uniquely identifies the resource across all AWS Regions. Format isarn:aws:gamelift:[region]::containergroupdefinition/[container group definition name]:[version]
. CreationTime
-
A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example
"1469498468.057"
). Status
-
Current status of the container group definition resource. Values include:
-
COPYING
-- Amazon GameLift is in the process of making copies of all container images that are defined in the group. While in this state, the resource can't be used to create a container fleet. -
READY
-- Amazon GameLift has copied the registry images for all containers that are defined in the group. You can use a container group definition in this status to create a container fleet. -
FAILED
-- Amazon GameLift failed to create a valid container group definition resource. For more details on the cause of the failure, seeStatusReason
. A container group definition resource in failed status will be deleted within a few minutes.
-
StatusReason
-
Additional information about a container group definition that's in
FAILED
status. Possible reasons include:-
An internal issue prevented Amazon GameLift from creating the container group definition resource. Delete the failed resource and call CreateContainerGroupDefinitionagain.
-
An access-denied message means that you don't have permissions to access the container image on ECR. See IAM permission examples for help setting up required IAM permissions for Amazon GameLift.
-
The
ImageUri
value for at least one of the containers in the container group definition was invalid or not found in the current AWS account. -
At least one of the container images referenced in the container group definition exceeds the allowed size. For size limits, see Amazon GameLift endpoints and quotas.
-
At least one of the container images referenced in the container group definition uses a different operating system than the one defined for the container group.
-
VersionNumber
-
Indicates the version of a particular container group definition. This number is incremented automatically when you update a container group definition. You can view, update, or delete individual versions or the entire container group definition.