All Products
Search
Document Center

Simple Application Server:Implement service interconnection over the internal endpoint of an OSS resource

Last Updated:Mar 07, 2024

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 an OSS resource over the internal endpoint of the OSS resource, you are charged no fees. This topic describes how a simple application server accesses an OSS resource in the same region over the internal endpoint of the OSS resource to implement service interconnection.

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, helping you manage and reduce storage costs. For more information, see What is OSS?

Procedure

A simple application server can access an OSS resource in the same region over the internal endpoint of the OSS resource, but cannot access an OSS resource in another region over the internal endpoint of the OSS resource. A simple application server can access an OSS resource in a different region over the Internet.

  1. Obtain the internal endpoint of an OSS resource.

    1. Log on to the OSS console.

    2. In the left-side navigation pane, click Buckets.

    3. On the Buckets page, click the name of the desired bucket.

    4. In the left-side navigation pane, click Overview.

    5. In the Port section, view the endpoint and domain name of the bucket.

      image.png

  2. Access the OSS resource.

    1. Connect to a simple application server.

    2. Access the OSS resource from the simple application server over the internal endpoint of the OSS resource.

      You can access an OSS resource from a simple application server in the same region over the internal endpoint of the OSS resource by using one of the following methods:

      • Use URLs

        You can use the internal endpoint of an OSS resource for which you have permissions to access the OSS resource. 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 a 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 a Linux server, run the command wget http://test.oss-cn-hangzhou-internal.aliyuncs.com/test.txt to access the test.txt object.

        Warning

        To ensure data security, we recommend that you do not set the access control list (ACL) of your OSS resources to public-read or public-read-write. You can use bucket policies to authorize other users to access your OSS resources. For more information, see Authorize other users to access OSS by using bucket policies.

      • Use ossbrowser

        When you configure parameters for access to OSS resources by using ossbrowser, set Endpoint to the internal endpoint of OSS. For more information, see Use ossbrowser.

      • Use ossutil

        When you configure parameters for access to OSS resources by using ossutil, set Endpoint to the internal endpoint of OSS. For more information, see ossutil.

References

You can allow simple application servers to communicate with other Alibaba Cloud services such as Elastic Compute Service (ECS) and ApsaraDB that reside in virtual private clouds (VPCs). For more information, see Manage service interconnection.