1 Answer
- Newest
- Most votes
- Most comments
0
- Realtime logs (e.g. from GameLift instances directly to CloudWatch) is not officially supported by Amazon GameLift yet, though it is a highly requested feature and is tracked in our worklog. However, you can implement your own realtime logging solution, and the recommended approach is to use CloudWatch agent. GameLift Solutions Architect has already provided an example on how to set it up: https://github.com/aws-samples/aws-gamelift-and-serverless-backend-sample/blob/master/LinuxServerBuild/install.sh#L4. Essentially, on each instance startup, you can run a daemon that watches targeted log files and periodically pushes logs to your account's CloudWatch by providing the IAM role.
- You should be able achieve that with CloudWatch agent as well (https://aws.amazon.com/about-aws/whats-new/2018/09/amazon-cloudwatch-agent-adds-custom-metrics-support/), or you could potentially include the AWS SDK in your game server and call CloudWatch::putMetricData directly. NOTE: you'll need to pass your IAM role during fleet creation so the EC2 instances can assume your IAM role to put metrics into the CloudWatch on your account. See https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-resources.html
No problem! Glad to help
answered 3 years ago
Relevant content
- asked a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a year ago