Updated on 2026-11-19 GMT+08:00

FAQ

How Is CDN Acceleration for Files in OBS Buckets Billed?

Using CDN to accelerate delivery of files in OBS buckets incurs both CDN and OBS charges.

CDN charges are incurred for traffic delivered from CDN PoPs to users.

OBS charges are incurred for origin-pull traffic from OBS to CDN.

The following figure shows the billing process.

Why Isn't Origin Pull Traffic Deducted from My Origin Pull Traffic Package?

For OBS buckets of version 3.0 or later accessed through the OBS bucket domain name, origin pull traffic can be deducted from an OBS origin pull traffic package. If you have purchased a pull traffic package but the origin pull traffic is not deducted from it, the possible causes are as follows:

  1. The OBS bucket and the purchased package are in different regions. In this case, purchase a pull traffic package in the same region.
  2. Type is set to Domain name instead of OBS bucket. Ensure that Type is set to OBS bucket.
  3. The OBS bucket version is earlier than 3.0. In this case, origin pull traffic cannot be covered by the package and is billed at standard CDN origin pull traffic rates. Ensure that the OBS bucket version is 3.0 or later.

Why Does Accessing a File Through CDN Display All Files in the OBS Bucket?

A user that has the read permission on an OBS bucket can read the object list of the bucket. When the user requests the domain name added to CDN, OBS returns the object list by default. You can use any of the following solutions:

  1. If you use an OBS public bucket, perform the following steps to rectify the fault:
    1. Enable static website hosting on OBS. For details, see Configuring Static Website Hosting.
    2. Select Static website hosting on the origin server settings page.
      1. Click the target domain name on the Domains page.
      2. On the Origin Settings tab, locate the corresponding OBS bucket origin server in the Origin Server Settings area.
      3. Click Edit in the Operation column of the origin server and select Static website hosting.
      4. Click OK.

        When Static website hosting is enabled, the object list of the bucket may still be displayed due to cache on PoPs. In this case, purge the cache of the homepage URL.

        • (Recommended) Set Type to URL when purging the cache of homepage URL.
        • Setting Type to Directory will refresh all content in the directory, so CDN will need to pull content from the origin server, increasing the load on the origin server.
  2. If your origin server is an OBS private bucket with an OBS agency of the old version, you can replace the old OBS agency permissions with new ones.
  3. If you use an OBS private bucket, create a policy for the CDNAccessPrivateOBS agency to deny listing objects in the bucket.
    1. In the navigation pane of the IAM console, choose Agencies. In the Operation column of CDNAccessPrivateOBS, click Authorize.
    2. On the Authorize Agency page, click Create Policy and set required parameters.
      Table 1 Parameters

      Parameter

      Description

      Policy Name

      Enter a policy name, for example, deny ListBucket.

      Policy View

      Select Visual editor.

      Policy Content

      Effect

      Select Deny.

      Cloud service

      Select Object Storage Service (OBS).

      Actions

      Select obs:bucket:ListBucket.

      Resources

      Select All.

      Request condition

      -

    3. Click Next.
    4. On the Select Policy/Role page, select the created policy and click Next.
    5. On the Select Scope page, click OK. The authorization takes effect 15 to 20 minutes later.
    6. After the authorization takes effect, refresh the CDN cache and try again.

Why Does CDN Prompt Me to Switch to the New OBS Agency After Login?

Since April 2, 2025 (Beijing Time), Huawei Cloud CDN has enabled the new OBS agency. It has fewer permissions than the old one. For details about their differences, see Table 2.

If you have enabled the OBS agency of the old version, you can reduce permissions by referring to How Do I Replace the Old OBS Agency Permissions with New Ones?

Table 2 Comparison of OBS agency permissions

Version

Permissions Granted to CDN After the Agency Is Enabled

Old

All permissions of the IAM system-defined role Tenant Guest. For details, see IAM Permissions.

New

obs:object:GetObject for obtaining object content and metadata.

Why Is a File in an OBS Bucket Automatically Downloaded When I Access It Through CDN?

This issue occurs because online preview is not enabled. To enable online preview, log in to the CDN console and choose Domains in the navigation pane. Click the target domain name, click the Advanced Settings tab, and click Edit next to HTTP Headers. Then, set Content-Disposition to inline.

How Do I Use CDN to Accelerate a Non-Huawei Cloud Object Storage Bucket?

A non-Huawei Cloud object storage bucket can also be used as an origin server for CDN acceleration. Pay attention to the following:

  1. Only public buckets from non-Huawei Cloud object storage can be connected to CDN for acceleration; private buckets are not supported.
  2. To connect a non-Huawei Cloud object storage bucket to CDN, set Type to Domain name and enter the domain name of the object storage bucket.
  3. By default, the host for origin pull is your acceleration domain name. If you configure an object storage bucket as your origin server, change the host to the domain name of that object storage bucket. Otherwise, origin pull will fail.