AppStream send custom logs to Cloudwatch using Cloudwatch agent

0

Hi

I am trying to send a custom application log from an AppStream fleet to Cloudwatch. I decided to give it a try like on a regular Windows EC2.

First thing: There is already a config file $Env:ProgramData\Amazon\AmazonCloudWatchAgent\amazon-cloudwatch-agent.json cofigure for AppStream itself. In a first run I tried editing this file and adding my own log file block. However strangely when I generate the AS Image and start a fleet, the config file no longer holds my edits (it seems to have reverted to the default config file)

I then tried leaving the default config file alone and just add a custom config file under $Env:ProgramData\Amazon\AmazonCloudWatchAgent\Configs directory. I know that at the end these will get consolidated in the toml file and it works well with EC2. In this case again it seems as if everything is reset when I generate the AS Image. I did find this blog post: https://aws.amazon.com/blogs/desktop-and-application-streaming/creating-custom-logging-and-amazon-cloudwatch-alerting-in-amazon-appstream-2-0/ but it look overly complicated for such simple thing I'm trying to achieve meaning pushing logs from a log file to cloudwatch

Any ideas how I can achieve this and why AS removes all customization I can make to the cloud watch config ?

profile picture
Amir
asked a year ago164 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions