A PowerShell script on the instance reads user metadata and passes session information to a Lambda function. The Lambda function then calls the DescribeSessions API and returns the MaxExpirationTime of the user's session to the PowerShell script, which displays the expiration time and countdown timer.
The date and time are displayed according to the time and locale configured by the user. For more information, see Configure Regional Settings. The window updates once per minute. When the session has less than 10 minutes remaining, the Time remaining text becomes bold and the window remains in the foreground.
See Display session expiration and a countdown timer in Amazon AppStream 2.0 on the AWS Desktop and Application Streaming blog for deployment instructions.
IAM role
Parameter | Default | Description |
---|---|---|
Create fleet IAM role | Yes |
Whether or not to create an IAM role (and inline policy) for use by AppStream 2.0 fleets. Possible values: No and Yes . |
Lambda function
Parameter | Default | Description |
---|---|---|
Python logging level | INFO |
Possible values: CRITICAL , ERROR , WARNING , INFO , and DEBUG . |
Log retention period | 7 |
Days to retain function logs. Possible values: 1 , 3 , 5 , 7 , 14 , 30 , 60 , 90 , 120 , 150 , 180 , 365 , 400 , 545 , 731 , 1827 , 2192 , 2557 , 2922 , 3288 , and 3653 . |
Timeout | 5 |
The amount of time (in seconds) that Lambda allows the function to run before stopping it. Minimum: 1 , maximum: 900 . |
Architecture | arm64 |
See Lambda instruction set architectures for more information. |
You are responsible for the cost of the AWS services used while running this solution. The total cost of running this solution depends on the number of streaming sessions. As of May 2023, the cost for running this solution with default settings in the US East (N. Virginia) Region is approximately $0.01 per month for 10,000 streaming sessions.
This solution is licensed under the MIT-0 License. See the LICENSE file.