startStreamSession
This action initiates a new stream session and outputs connection information that clients can use to access the stream. A stream session refers to an instance of a stream that Amazon GameLift Streams transmits from the server to the end-user. A stream session runs on a compute resource that a stream group has allocated.
To start a new stream session, specify a stream group and application ID, along with the transport protocol and signal request settings to use with the stream. You must have associated at least one application to the stream group before starting a stream session, either when creating the stream group, or by using AssociateApplications.
For stream groups that have multiple locations, provide a set of locations ordered by priority using a Locations
parameter. Amazon GameLift Streams will start a single stream session in the next available location. An application must be finished replicating in a remote location before the remote location can host a stream.
If the request is successful, Amazon GameLift Streams begins to prepare the stream. Amazon GameLift Streams assigns an Amazon Resource Name (ARN) value to the stream session resource and sets the status to ACTIVATING
. During the stream preparation process, Amazon GameLift Streams queues the request and searches for available stream capacity to run the stream. This results in one of the following:
Amazon GameLift Streams identifies an available compute resource to run the application content and start the stream. When the stream is ready, the stream session's status changes to
ACTIVE
and includes stream connection information. Provide the connection information to the requesting client to join the stream session.Amazon GameLift Streams doesn't identify an available resource within a certain time, set by
ClientToken
. In this case, Amazon GameLift Streams stops processing the request, and the stream session object status changes toERROR
with status reasonplacementTimeout
.