Filtering GameSessions with PlayerSessionCreationPolicy: 'DENY_ALL'


I’ll be using the PlayerSessionCreationPolicy to effectively lock games once they’re in progress. However, if I set PlayerSessionCreationPolicy to DENY_ALL and filter by hasAvailablePlayerSessions=true, the DENY_ALL sessions are returned in the result. That would be fine if I could also filter by PlayerSessionCreationPolicy, but that does not appear to be an option. Additionally, my queue will rapidly get choked once I hit 20 active games as that is the maximum results returned. I’d argue that a status of DENY_ALL would also mean there are no available player sessions.

Do I have any options? Thank you.


Thanks for bringing this to our attention. We’ve looked into this and have logged a bug to address this issue.

In the meantime, we recommend continuing to retrieve all game sessions where hasAvailablePlayerSessions=true and then filtering on the client-side to remove any game sessions where playerSessionCreationPolicy=‘DENY_ALL’. If no results are found, submit another request to SearchGameSessions with the returned nextToken from the previous call.

Sounds good, thanks Justin. I’ve got some time before it would be a showstopper.

Sorry to bump a 2 year old thread but is this still the recommended way of handling this issue?
I still see game sessions with PlayerSessionCreationPolicy=‘DENY_ALL’ when searching for game sessions with hasAvailablePlayerSessions=true. Trying to add a filter of playerSessionCreationPolicy still returns invalid operand.