TL;DR

  • Scenario: Enterprises and individuals migrating images/audio/video/static resources to Aliyun OSS need stable operations and cost control
  • Conclusion: Configure precisely by region and permissions, combine hotlink protection/CNAME/logs to balance availability and cost
  • Output: A deployable error quick reference covering common configurations and troubleshooting

Basic Introduction

Alibaba Cloud Object Storage Service (OSS) is a massive, secure, low-cost, highly reliable cloud storage service provided by Alibaba Cloud. Its data design durability is no less than 99.9999999999% (12 nines), and service design availability or business continuity is no less than 99.995%.

Basic Concepts

Storage Space (Bucket)

A storage space is a container for users to store Objects, and all objects must belong to some storage space.

Naming Rules:

  • Can only include lowercase letters, numbers, and hyphens
  • Must start and end with a lowercase letter or number
  • Length must be between 3-63 bytes

Object/File (Object)

An object is the basic unit for storing data in OSS, also known as an OSS file. An object consists of metadata (Object Meta), user data (Data), and filename (Key).

Region

Represents the physical location of OSS data centers. Users can choose the appropriate region to create a Bucket based on cost and request source.

Feature Details

If the Bucket is set to public-read permission, external users can access the Object. The external link address composition rules are as follows:

http://<your-bucket-name>.<data-center-service-domain>/<your-object-name>

OSS supports hotlink protection based on the Referer field in HTTP headers.

Details Analysis:

  • Hotlink verification is only performed when accessing Object via URL signature or anonymous access
  • One Bucket can support multiple referer parameters, separated by newlines in configuration
  • Referer parameters support wildcards * and ?

Custom Domain (CNAME)

OSS supports users binding custom domain names to their Buckets.

Error Quick Reference

SymptomRoot CauseDiagnosisFix
403 Forbidden (anonymous external link access denied)Referer not in whitelist/empty Referer not allowedConsole Permissions → Hotlink ProtectionAdd domain to whitelist or use signed URL
403 AccessDenied (cannot read object)Bucket is private and request is not signedConsole ACLGenerate server-side signed URL or change to public-read
403 SignatureDoesNotMatchClient time drift/signature string calculation errorPacket capture comparisonNTP time sync; review Canonical header
301/404Wrong Endpoint/Region usedConsole check Bucket RegionSwitch to correct regional Endpoint
409 BucketAlreadyExistsName globally unique conflictCreate return codeChange to globally unique name
Custom domain 404/certificate exceptionCNAME not生效/not boundnslookup; browser certificate chainComplete console binding and certificate deployment
Downstream cost surgeHotlinking or hot resources without cacheAccess log analysisEnable hotlink protection; add CDN cache in front