- 新しい順
- 投票が多い順
- コメントが多い順
Hi,
GameLift team has recently added a metadata file in GameLift instances containing the information you need, and we are working on getting this documented. (GLIFT-15647)
In the meantime, you can be unblocked by reading the a metadata JSON file from this path:
- /local/gamemetadata/gamelift-metadata.json (In Linux)
- C:\GameMetadata\gamelift-metadata.json (In Windows)
This metadata contains the following fleet attributes as of this writing:
BuildArn
BuildId
FleetArn
FleetId
Description
Name // AKA Fleet Name
ScriptArn // If you are using Realtime Server
ScriptId // If you are using Realtime Server
FleetType
InstanceType
InstanceRoleArn // if you provide an instance role during fleet creation
This file is created prior to install.sh is run, so it is guaranteed to be readable by your install script. You could potentially add your build environment (test, dev, live, etc.) as a part of the fleet name, or make an additional call to DescribeBuild to get the build name instead.
Thanks, James
Just FYI, here is an example of the JSON file content (after formatting, originally it's just a single line without spaces):
{
"buildArn":"arn:******
"buildId":"build-11223344-5566-7788-aabbcceeffgg",
"fleetArn":"arn:******
"fleetId":"fleet-******
"description":"MyFleetDescription",
"name":"MyFleetName",
"fleetType":"ON_DEMAND",
"instanceType":"c5.large"
}
Here is the doc update: https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-fleetinfo.html
関連するコンテンツ
- AWS公式更新しました 1年前