You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See [Managing how game servers are launched for hosting](https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-multiprocess.html)
163
+
in the *Amazon GameLift Developer Guide*.
164
+
165
+
### Defining an instance type
166
+
167
+
GameLift uses Amazon Elastic Compute Cloud (Amazon EC2) resources, called
168
+
instances, to deploy your game servers and host game sessions for your players.
169
+
When setting up a new fleet, you decide what type of instances your game needs
170
+
and how to run game server processes on them (using a runtime configuration). All instances in a fleet use the same type of resources and the same runtime
171
+
configuration. You can edit a fleet's runtime configuration and other fleet
172
+
properties, but the type of resources cannot be changed.
173
+
174
+
```ts
175
+
declareconst build:gamelift.Build;
176
+
newgamelift.BuildFleet(this, 'Game server fleet', {
// Actions can also be grantted through dedicated method
312
+
fleet.grant(role, 'gamelift:ListFleets');
313
+
```
314
+
315
+
### Monitoring your Fleet
316
+
317
+
GameLift is integrated with CloudWatch, so you can monitor the performance of
318
+
your game servers via logs and metrics.
319
+
320
+
#### Metrics
321
+
322
+
GameLift Fleet sends metrics to CloudWatch so that you can collect and analyze
323
+
the activity of your Fleet, including game and player sessions and server
324
+
processes.
325
+
326
+
You can then use CloudWatch alarms to alert you, for example, when matches has
327
+
been rejected (potential matches that were rejected by at least one player
328
+
since the last report) exceed a certain thresold which could means that you may
329
+
have an issue in your matchmaking rules.
330
+
331
+
CDK provides methods for accessing GameLift Fleet metrics with default configuration,
332
+
such as `metricActiveInstances`, or `metricIdleInstances` (see [`IFleet`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-gamelift.IFleet.html)
333
+
for a full list). CDK also provides a generic `metric` method that can be used
334
+
to produce metric configurations for any metric provided by GameLift Fleet,
335
+
Game sessions or server processes; the configurations are pre-populated with
336
+
the correct dimensions for the matchmaking configuration.
337
+
338
+
```ts
339
+
declareconst fleet:gamelift.BuildFleet;
340
+
// Alarm that triggers when the per-second average of not used instances exceed 10%
0 commit comments