Best practice for uploading new server builds to Gamelift

0

I'm trying to understand the proper protocol for uploading new server builds to gamelift. My understanding is as follows

  1. Package the server locally
  2. Upload a build to gamelift
  3. Delete existing fleets
  4. Create a new fleet with the same configuration as the old fleet, except with the newer build
  5. Replace references to fleets within lambdas. (here's an example of an official AWS source providing a script with a hardcoded fleet ID linked to from this tutorial)
  6. Redeploy lambdas

This seems excessive - deleting and deploying a new fleet both take a long time. Since each fleet will have the same configuration as the last one, manually re-entering this information and having to replace code in lambdas seems prone to human error.

Is there no way to update the build on a fleet? Should I be programmatically fetching the fleet ID somehow in my lambdas? If I am forced to delete and re-create new fleets with identical configurations, is there a good way to ensure new fleets are configured correctly?

Vedgy
已提問 16 天前檢視次數 44 次
1 個回答
1
已接受的答案

You are correct, that replacing an existing build with a new one requires you to create a new Fleet. However, you don't necessarily need to replace the fleet ID in your backend systems (such as AWS Lambda), if you use a Fleet Alias. With an alias, you can reference the alias in your Lambda function instead, and just change the fleet that the alias references.

Another option is to register your fleet to a GameLift queue, and use the StartGameSessionPlacement API to create new game sessions. In this model, you would switch the fleet registered to the Queue when doing a new deployment. This also allows you to introduce latency-based session placement to multi-region fleets, and use the placement events for receiving the state of game session creation.

Out of these two options, alias is the faster and smaller change to your implementation. You can introduce GameLift queues if you find some of the additional features beneficial.

Juho_J
已回答 14 天前
profile picture
專家
Toni_S
已審閱 14 天前
  • Thanks. I'll look into these features. :)

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南