Skip to content

(2026.06) Custom launch script fails to download when VDI starts with 403 Forbidden error #189

Description

@junbo75

Bug description

When using the "Run script when VDI starts" feature in a project, the custom launch script fails to download from S3 with a 403 Forbidden error. The VDI instance does not have the required S3 permissions to read the custom launch script, causing the script execution to fail during VDI startup. The "Run script when VDI is configured" feature is not affected.

Affected versions

2026.06

Mitigation

Create an IAM policy that grants S3 read access to objects tagged with your RES environment name, and attach it to your RES project:

  1. Open the IAM Console and create a new policy with the following JSON, replacing <environment-name> with the name of your RES environment:
{
       "Version": "2012-10-17",
       "Statement": [
           {
               "Effect": "Allow",
               "Action": [
                   "s3:GetObject"
               ],
               "Resource": "*",
               "Condition": {
                   "StringEquals": {
                       "s3:ExistingObjectTag/res:EnvironmentName": "<environment-name>"
                   }
               }
           }
       ]
   }
  1. Tag the IAM policy with the following tag so that RES can discover it:
    • Key: res:Resource
    • Value: vdi-host-policy
  2. In the RES web portal, navigate to your project settings and attach the IAM policy to the project under the Resource Configurations -> Advanced Options -> Add Policies section.
  3. Launch a new VDI from the project. The custom "on VDI started" script should now download and execute successfully.

Rollback

Remove the IAM policy from the project settings in the RES web portal. No other rollback steps are required.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions