aws / aws/res

(2026.06) VDIs without a per-session schedule do not fall back to the global default schedule, and sessions using the Working Hours schedule type do not use the global default working hours configuration

Open
#185 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
115
Forks
35
PR merge metrics
No merged PRs in 30d

Description

## Bug description

VDIs without schedule configured does not use the global default schedule configured under `Desktop settings` -> `Schedules` -> `Default Schedule` . And working hours schedule type does not use the global default working hours configured under `Desktop settings` -> `Schedules` -> `Working Hours`.

## Affected versions
* 2026.06
## Mitigation

> **Tip:** We recommend running the following commands in [AWS CloudShell](https://console.aws.amazon.com/cloudshell/) in the same account and region where RES is deployed. CloudShell comes with pre-installed dependencies and helps eliminates other local environment conditions that may affect the patching process.

1. Set up a Python 3.12 virtual environment and install all dependencies:

```
sudo yum install -y python3.12
python3.12 -m venv /tmp/patch-env
source /tmp/patch-env/bin/activate
pip install boto3
```

2. Create an S3 bucket with ACLs disabled. If you already have an S3 bucket with ACLs disabled, you can skip this step. Otherwise, create one using either the console or the CLI:
1. Option A (AWS Console):
1. Follow the [Creating a bucket](https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-bucket.html) guide in the Amazon S3 User Guide. When configuring the bucket:
2. Enter a bucket name and select the region where RES is deployed
3. Under Object Ownership, keep the default setting ACLs disabled (Bucket owner enforced)
4. Configure the remaining settings as needed (block public access, versioning, etc.)
5. Click Create bucket
2. Option B (CLI):
1. Replace `` and `` with your values and run the command:

```
aws s3api create-bucket \
--bucket \
--region \
--create-bucket-configuration LocationConstraint= \
--object-ownership BucketOwnerEnforced
```
Note: If your region is us-east-1, omit the —create-bucket-configuration parameter.

3. Download `res_lambda_tool_2026.06.py` and `res_lambda_layer_tool_2026.06.py` and updated function code and lambda layer zip for version `2026.06` by replacing `` with the directory to download the patch script, `` with the name of your RES environment, `` with the name of a ACLs disabled S3 bucket under the account/region where RES is deployed, and `` with Classic or GovCloud:
1. The patch applies to 2026.06
2. Configure the AWS CLI for the account / region where RES is deployed and make sure that you have [Lambda permissions to update function code](https://docs.aws.amazon.com/lambda/latest/api/API_UpdateFunctionCode.html) and make sure that you have S3 permissions to read and write to the bucket provided through ``.

```
OUTPUT_DIRECTORY=
ENVIRONMENT_NAME=
PARTITION=
BUCKET_NAME=

mkdir -p ${OUTPUT_DIRECTORY}
curl https://research-engineering-studio-us-east-1.s3.us-east-1.amazonaws.com/releases/2026.06/patch_scripts/res_lambda_tool_2026.06.py --output ${OUTPUT_DIRECTORY}/res_lambda_tool_2026.06.py

curl https://research-engineering-studio-us-east-1.s3.us-east-1.amazonaws.com/releases/2026.06/patch_scripts/res_lambda_layer_tool_2026.06.py --output ${OUTPUT_DIRECTORY}/res_lambda_layer_tool_2026.06.py

curl https://research-engineering-studio-us-east-1.s3.us-east-1.amazonaws.com/releases/2026.06/patch_scripts/patches/backend-lambda-fb691742.zip --output ${OUTPUT_DIRECTORY}/backend-lambda-fb691742.zip

curl https://research-engineering-studio-us-east-1.s3.us-east-1.amazonaws.com/releases/2026.06/patch_scripts/patches/lambda-layer-fb691742.zip --output ${OUTPUT_DIRECTORY}/lambda-layer-fb691742.zip
```

4. Update the lambda function code and lambda layer by running the following patch command by replacing `` with the RES environment name, and `` with the root RES environment CloudFormation stack name:

```
ENVIRONMENT_NAME=
STACK_NAME=
LIBRARY_LAYER_NAME=$(aws lambda get-function --function-name ${ENVIRONMENT_NAME}-backend-lambda --query "Configuration.Layers[0].Arn" --output text | cut -d: -f7)

python3 ${OUTPUT_DIRECTORY}/res_lambda_tool_2026.06.py --zip-file ${OUTPUT_DIRECTORY}/backend-lambda-fb691742.zip --lambda-name ${ENVIRONMENT_NAME}-backend-lambda --s3-bucket ${BUCKET_NAME}

python3 ${OUTPUT_DIRECTORY}/res_lambda_layer_tool_2026.06.py --zip-file ${OUTPUT_DIRECTORY}/lambda-layer-fb691742.zip --environment-name ${ENVIRONMENT_NAME} --stack-name ${STACK_NAME} --lambda-layer ${LIBRARY_LAYER_NAME} --partition ${PARTITION} --s3-bucket ${BUCKET_NAME}

```

Once the patches have been applied the Last modified attribute of the Lambda function should be recent, and newly launched VDIs without schedule will use the global default schedule.

### Rollback

The patch scripts saved the original lambda function code and lambda layer within the S3 bucket you provided. To rollback, re-run the exact commands from the patching step with an extra `--rollback` flag.

1. If you are running this in a new terminal session, make sure to set up the variables again:

```
OUTPUT_DIRECTORY=
ENVIRONMENT_NAME=
PARTITION=
BUCKET_NAME=
STACK_NAME=
LIBRARY_LAYER_NAME=$(aws lambda get-function --function-name ${ENVIRONMENT_NAME}-backend-lambda --query "Configuration.Layers[0].Arn" --output text | cut -d: -f7)

python3 ${OUTPUT_DIRECTORY}/res_lambda_tool_2026.06.py --zip-file ${OUTPUT_DIRECTORY}/backend-lambda-fb691742.zip --lambda-name ${ENVIRONMENT_NAME}-backend-lambda --s3-bucket ${BUCKET_NAME} --rollback

python3 ${OUTPUT_DIRECTORY}/res_lambda_layer_tool_2026.06.py --zip-file ${OUTPUT_DIRECTORY}/lambda-layer-fb691742.zip --environment-name $(ENVIRONMENT_NAME) --stack-name ${STACK_NAME} --lambda-layer $(LIBRARY_LAYER_NAME) --partition $(PARTITION) --s3-bucket ${BUCKET_NAME} --rollback
```

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the mentioned res_lambda_tool_2026.06.py and res_lambda_layer_tool_2026.06.py scripts and the backend-lambda-fb691742.zip and lambda-layer-fb691742.zip patch artifacts. Compare their behavior with the 2026.06 scheduling flow; done means newly launched VDIs without a per-session schedule use the global default schedule and Working Hours sessions use the global default working hours configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
backend, cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.