You could try, if you can emulate keyboard or mouse movement to keep the session active. You can register a powershell script to be called regularly (maybe once every 10 minutes) and move the mouse by 1 point.
Add-Type -AssemblyName System.Windows.Forms [System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x, $y)
This could be done conditionally (on high CPU-load only). That should not interfere with the user too much.
Get-WmiObject Win32_Processor | Measure-Object -Property LoadPercentage -Average | Select Average
However, I am not sure, if that approach to programmatically move the mouse keeps the session alive. That would need to be tested.
I would not recommend trying to change the behavior of the session timers beyond what is documented. https://docs.aws.amazon.com/appstream2/latest/developerguide/set-up-stacks-fleets.html#set-up-stacks-fleets-create
Photon Agent is responsible for communicating the session state to the backend service. You can't interfere or communicate with the process to extend the session.
The session is considered active only if there is keyboard and mouse interaction, otherwise the session is considered idle and idle timeout will trigger. CPU utilization on instance isn't considered active session. Once the idle timeout value expires, the session is disconnected. Next, the backend service evaluates the "Disconnect Timeout", if it has expired the session is terminated.
Is it possible to restrict AppStream session users access to my application folder in S3asked a month ago
What happens with AppStream session in case of instance failureasked 2 months ago
Bastion Host vs Session Manager vs AWS AppStreamAccepted Answerasked 3 years ago
The screen does not show up in AppStream 2.0asked 5 months ago
Is there a way to force load earlier versions of Office Apps in AppStream Image BuilderAccepted Answerasked 7 months ago
Is there a way to prevent instances from terminating?asked a month ago
AppStream: Your session is taking longer than expected to prepare - failsasked a year ago
Which service/process deems when to kill an ongoing AppStream session?asked 10 days ago
How users can reconnect to an active AppStream sessionasked 7 days ago
s3 buckets to sync to Appstream directoryasked 3 months ago