All Products
Search
Document Center

Elastic Compute Service:Transfer files to an ECS instance using OSS

Last Updated:Jan 27, 2026

Use Object Storage Service (OSS) as an intermediary to transfer large files to an Elastic Compute Service (ECS) instance or to an instance without a public IP address.

Overview

image

This process has two main steps:

  1. Upload the file to an OSS Bucket in the same region as the ECS instance.

  2. From the ECS instance, download the file from OSS over the internal network.

Billing

  • Storing files in OSS incurs storage fees.

  • Uploading files to OSS incurs no data transfer fees.

  • Using the OSS internal network endpoint to download files to an ECS instance in the same region incurs no data transfer fees.

  • Uploading files to or downloading files from OSS incurs request fees.

For more information about OSS billing, see Billable items.

Step 1: Upload the file to OSS

First, upload the file to a Bucket in OSS. The Bucket must be in the same region as the ECS instance. You can install the ossbrowser tool on your local computer to upload the file.

Important

Transferring large files (10 GB or more) with the ossbrowser tool over a public network may fail due to network instability. For such transfers, use Multipart upload.

  1. Activate Object Storage Service.

  2. Install and log on to ossbrowser.

    For more information, see Install ossbrowser 2.0 and Log on to ossbrowser 2.0.

  3. Create a bucket.

    1. In the upper-left corner of the page, click Create Bucket. On the Create Bucket page, configure the following parameters and use the default values for the rest.

      • Bucket Name: Enter a name for the Bucket as prompted.

      • Region: First, select Specific Region, and then select the region where your ECS instance is located. To view the region of your instance, see View instance information.

        image

    2. After you complete the configuration, click Create.

  4. Upload the file to the bucket.

    1. Find the bucket you created and click its name.

      image

    2. In the upper-left corner of the page, click Upload. Follow the on-screen instructions to upload your file.

      image

  5. Get the file's download URL.

    1. After the file is uploaded, find the uploaded file. In the Actions column, click image > Obtain URL.

    2. On the Obtain URL page, click Generate, and then click Copy URL.

      image

Step 2: Download the file from OSS

After you upload the file to OSS, you can log on to your instance and download the file over the internal network.

  1. Convert the download URL to an internal network URL.

    The URL you obtained is a public network URL. To convert it to an internal network URL, add -internal before .aliyuncs.com. Instances in the same region can use this internal URL to access the file, which avoids data transfer fees.

    Note

    For example, the internal download URL for the original address https://****.oss-cn-hangzhou.aliyuncs.com/demo-1.0.jar?****** is https://****.oss-cn-hangzhou-internal.aliyuncs.com/demo-1.0.jar?******.

  2. Download the file to the instance over the internal network.

    Windows instance

    1. Connect to the Windows instance. This topic uses Workbench to connect to the instance. For more information, see Connect to a Windows instance using Workbench.

    2. On the instance, open a web browser and enter the internal network URL. The file will then download to your instance.

      You can also install ossbrowser or ossutil on your Windows instance to download files. For more information, see Simple download.

    Linux instance

    1. Connect to the Linux instance. This topic uses Workbench to connect to the instance. For more information, see Connect to a Linux instance using Workbench.

    2. To download the file, run the following command. This topic uses the wget command as an example. You can use any command-line tool you prefer.

      wget -O <filename> '<file_internal_url>'

      Before you run the command, replace <filename> with your desired filename and <file_internal_url> with the internal network URL from Step 1. For example, to download the file from the internal URL https://****.oss-cn-hangzhou-internal.aliyuncs.com/demo-1.0.jar?****** and save it as demo.jar, run the following command:

      wget -O demo.jar 'https://****.oss-cn-hangzhou-internal.aliyuncs.com/demo-1.0.jar?******'

(Optional) Step 3: Clean up resources

To avoid further storage fees, delete the file from the OSS Bucket after you download it. For more information, see Delete objects.

References

To learn more about OSS, see What is Object Storage Service (OSS)?