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
posta un anno fa459 visualizzazioni
1 Risposta
1
Risposta accettata

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.

AWS
Juho_J
con risposta un anno fa
profile pictureAWS
ESPERTO
Toni_S
verificato un anno fa
  • Thanks. I'll look into these features. :)

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande