By default, simple application servers and Object Storage Service (OSS) resources in the same region communicate with each other over the internal network. When a simple application server accesses OSS resources over the internal endpoint of OSS, you are charged no fees. This topic describes how a simple application server accesses OSS in the same region over the internal endpoint of OSS.

Prerequisites

  • A simple application server is created. For more information, see Create a server.
  • A bucket is created. For more information, see Create buckets.

Background information

OSS is a secure, cost-effective, and highly reliable cloud storage service that can store a large number of objects of all types. OSS supports elastic scaling of capacity and processing power, and provides multiple storage classes, to help you effectively optimize storage costs. For more information, see What is OSS? .

Procedure

A simple application server can access OSS resources that are in the same region as the server over the internal endpoint of OSS. A simple application server cannot directly access OSS resources in a different region over the internal endpoint of OSS. You can access OSS resources over the Internet.

  1. Obtain the internal endpoint of OSS.
    1. Log on to the Object Storage Service console.
    2. In the left-side navigation pane, click Buckets.
    3. Click the name of the bucket whose internal endpoint you want to obtain.
    4. In the left-side navigation pane, click Overview.
    5. In the Domain Names section, view the endpoint and domain name of the bucket.
      The following figure shows the details of the Domain Names section. ada
  2. Access OSS resources.
    1. Connect to the simple application server.
    2. The simple application server accesses OSS resources over the internal endpoint of OSS.
      The simple application server can access OSS resources that are in the same region as the server over the internal endpoint of OSS.
      • Use URLs
        You can use the internal endpoint of OSS to access OSS resources that you are authorized to access. For example, an object test.txt in the root directory of a bucket named test in the China (Hangzhou) region is in the public-read state. In this case, all simple application servers in the China (Hangzhou) region can access this object over http://test.oss-cn-hangzhou-internal.aliyuncs.com/test.txt.
        • If you use Windows server, enter http://test.oss-cn-hangzhou-internal.aliyuncs.com/test.txt in the browser to access the test.txt object.
        • If you use Linux server, run the command wget http://test.oss-cn-hangzhou-internal.aliyuncs.com/test.txt to access the test.txt object.
        Warning For data security reasons, we recommend that you do not set the ACL of your OSS resources to public-read or public-read-write. You can use bucket policies to authorize other users to access OSS resources. For more information, see Configure bucket policies to authorize other users to access OSS resources.
      • Use ossbrowser

        When you set the parameters for logging on to ossbrowser, set Endpoint to the internal endpoint of OSS. For more information, see ossbrowser.

      • Use ossutil

        When you set the parameters for logging on to ossutil, set Endpoint to the internal endpoint of OSS. For more information, see ossutil.