All Products
Search
Document Center

Elastic Compute Service:Upload a file to multiple ECS instances with OOS

Last Updated:Jul 16, 2026

Use CloudOps Orchestration Service (OOS) to upload an on-premises file, OSS object, or HTTPS file to multiple ECS instances at a time.

Note

OOS is an automated O&M service provided by Alibaba Cloud for managing and executing O&M tasks. See What is CloudOps Orchestration Service?

Prerequisites

The target ECS instances are in the Running state.

Step 1: Select a file type

OOS supports the following file types. Select one based on your requirements.

File type

Description

Size limit

On-premises file

A file stored on an on-premises computer or server.

500 MB

OSS object

A file stored in an OSS bucket.

None

HTTPS file

A remote file accessible over HTTPS, typically hosted on a web server. The URL starts with https://.

None

Step 2: Prepare the upload environment

Complete the following preparations based on your selected file type.

  • On-premises file

    Note the storage path of the file on the on-premises computer or server.

  • OSS object

    1. Store the file in an OSS bucket. See Upload objects.

    2. Create an instance RAM role, attach a policy (such as AliyunOSSReadOnlyAccess) to grant OSS read permissions, and then attach the role to the ECS instances. See the Create a RAM role and attach it to an ECS instance section of the "Grant ECS access to resources of other Alibaba Cloud services by using instance RAM roles" topic.

      Attach an instance RAM role to multiple ECS instances at a time

      1. Log on to the OOS console.

      2. In the top navigation bar, select the region of the target ECS instances.

      3. In the left-side navigation pane, choose Automated Task > Common O&M Tasks. On the Batch Instance Operations tab, click Create.

      4. On the Create Task Batch Instance Operations page, configure the following parameters:

        • Task Type: Select Instance Operations.

        • Operations to Be Performed: Choose Add Role.

        • Role Name: Select the instance RAM role you created.

        • Select Instances: Select the target ECS instances.

      5. Click Create. In the Parameter Confirmation message, click OK.

        When Execution Status changes to Successful, the instance RAM role is attached to the selected ECS instances.

  • HTTPS file

    Obtain the URL of the HTTPS file and ensure the target ECS instances have Internet access. See Modify fixed public bandwidthModify the bandwidth of a subscription instance or Associate an EIP with a cloud resource.

Step 3: Upload a file to multiple ECS instances at a time

  1. Log on to the OOS console.

  2. In the top navigation bar, select the region of the target ECS instances.

  3. In the left-side navigation pane, choose Automated Task > Common O&M Tasks. On the Batch Instance Operations tab, click Create.

  4. On the Create Task Batch Instance Operations page, configure the following parameters.

    Note

    Use the default values for parameters not listed below.

    Parameter

    Description

    Task Type

    Select Batch Download Files.

    File Type

    Select an option based on the file type. In this example, local File is used.

    Select a file

    1. Select or drag the on-premises file to the Select a file area. In this example, the image.png file is used.

    2. Select I agree to store the file in the temporary OSS bucket that Alibaba Cloud provides.

      Note

      Alibaba Cloud temporarily stores the file in an OSS bucket. After the upload completes, the file is automatically deleted from the bucket. The file URL expires after 900 seconds.

    Save Path of File

    In this example, /root is used.

    Select Instances

    Select a filter method and choose one or more ECS instances. In this example, Select Instances Manually is selected.

    Note

    To upload the file to many ECS instances, select By Instance Tags or By Resource Group to filter instances by tag or resource group. See What is Tag? and What is Resource Group?.

  5. Click Create. In the Parameter Confirmation message, click OK.

    When Execution Status changes to Successful, the file is uploaded to the selected ECS instances.

  6. (Optional) Verify the file integrity and functionality.

    1. Connect to an ECS instance. See Choose a connection method.

    2. Verify the uploaded file. Example checks:

      • Compare the file size before and after the upload to check for changes.

      • Run the application or script in the file to verify it works as expected.

      • Open the media file or document to ensure it is not damaged and can be read correctly.

References

  • To execute uploaded scripts or applications on a schedule, use OOS to set up cron jobs. See Scheduled O&M and Cron expressions.

  • For data backup and restoration, you can create snapshots for disks to back up data on ECS instances after uploading files.