Skip to content

(2025.09) Cost dashboard not retrieving total sessions #127

Description

@julianallenderussek

Bug description

During RES cost dashboard loading, the backend API attempts to retrieve all user sessions via DynamoDB scan before accounting for service limits. This causes inaccurate number of session in the cost dashboard for users with large session datasets when the scan hits record/size limitations.

Affected versions

2025.09

Mitigation

  1. Download the following files patch.py , cost_dashboard_cluster_manager.patch , cost_dashboard_virtual_desktop_controller.patch by replacing with the directory to download the patch script and patch file and with the name of your RES environment in the command below:
    a. The patch applies to RES 2025.09
    b. The patch script requires AWS CLI v2, Python 3.9.16 or above, and Boto3.
    c. Configure the AWS CLI for the account / region where RES is deployed, and make sure that you have S3 permissions to write to the bucket created by RES.
OUTPUT_DIRECTORY=<output-directory>
ENVIRONMENT_NAME=<environment-name>
RES_VERSION=<res-version>
PARTITION=<partition> # e.g. aws (for Classic), aws-us-gov (for GovCloud)
ACCOUNT_ID=<account-id>

mkdir -p ${OUTPUT_DIRECTORY}
curl https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/${RES_VERSION}/patch_scripts/patch.py --output ${OUTPUT_DIRECTORY}/patch.py
curl https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/${RES_VERSION}/patch_scripts/patches/cost_dashboard_cluster_manager.patch --output ${OUTPUT_DIRECTORY}/cost_dashboard_cluster_manager.patch
  1. Navigate to the directory where the patch script and patch file are downloaded. Run the following patch commands:
python3 ${OUTPUT_DIRECTORY}/patch.py --environment-name ${ENVIRONMENT_NAME} --res-version ${RES_VERSION} --module cluster-manager --patch ${OUTPUT_DIRECTORY}/cost_dashboard_cluster_manager.patch
  1. Restart the Cluster Manger instance for your environment. You may also terminate the instance from the Amazon EC2 Management Console.
INSTANCE_ID=$(aws ec2 describe-instances \
            --filters \
            Name=tag:Name,Values=${ENVIRONMENT_NAME}-cluster-manager \
            Name=tag:res:EnvironmentName,Values=${ENVIRONMENT_NAME}\
            --query "Reservations[0].Instances[0].InstanceId" \
            --output text)

aws ec2 terminate-instances --instance-ids ${INSTANCE_ID}
  1. Wait a 10-15 for the new Cluster Manager to be provisioned. Then proceed to verify that your environment is stable and working correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions