Teminating Rogue Game Sessions


Is it possible to terminate game sessions with 0 players? Either via the console or the AWS CLI? Thank you.

Unfortunately no, your server is responsible for letting Gamelift know that a sessions has ended.

There is no current mechanism to remotely terminate an individual game session. You need to terminate the process hosting the GameSessions, which involves either some invocation of ProcessEnding or EC2 termination.

The only reliable way to achieve this is to terminate the EC2 instance via a fleet scaling event; typically scaling the fleet to zero. You can build a remote kill into your server as well to achieve this.

GameLift has this a backlogged feature request.

I actually ran into the exact same problem the other day. What I did to terminate my server without dropping the fleet is to go into the Scaling tab, and under Instance Limits, set maximum instance count to 0, then save. This immediately terminated my server but kept my fleet intact.

Thanks for your replies. @pFaso I tried it, but for some reason or another my game sessions are still active (with no protection of the sessions). Guess I’ll terminate the fleet and create a new one.


I fogot to mention, I also adjusted the Manually adjust desired instance count to 0, under Auto-Scaling Policy. And just as an aside, dont forget to press the green check to save the change.

Hopefully that works for you if you havent already erased the fleets.

@pFaso Thanks for the suggestion, but it’s still exactly the same thing - Active instances: 1, Active servers: 5, Game sessions: 3 :-/ Would be awesome if it worked though :stuck_out_tongue:

Do you have game session protection enabled? If so, you’ve told GameLift to protect those game sessions from termination and GameLift is respecting your wishes and not terminating the instances hosting the game session.

You may need to remove it from the game sessions you need to destroy:

See that NewGameSessionProtectionPolicy param in CreateFleet

You can update a game session’s protection policy by calling:

aws gamelift update-game-session --game-session-id arn:aws:gamelift:us-west-2::gamesession/fleet-123456789/gsess-123456789--protection-policy NoProtection --region us-west-2

Hi, I did change the protection level to “no protection” for the fleet before trying to scale it to 0, but it didn’t work. Maybe the change in protection didn’t propagate to the running game sessions? Either way I have deleted the fleet and created a new one :wink: Thanks for your answer

Edit: Missed that I can update active game sessions, I’ll be sure to try that out of the problem arises again :wink: