Alibaba Cloud Object Storage Service: Quick Start
Alibaba Cloud Object Storage Service: Quick Start
Quick Start
Issue: 20200529
Object Storage Service Quick Start / Legal disclaimer
Legal disclaimer
Alibaba Cloud reminds you to carefully read and fully understand the terms and conditions
of this legal disclaimer before you read or use this document. If you have read or used this
document, it shall be deemed as your total acceptance of this legal disclaimer.
1. You shall download and obtain this document from the Alibaba Cloud website or other
Alibaba Cloud-authorized channels, and use this document for your own legal business
activities only. The content of this document is considered confidential information of
Alibaba Cloud. You shall strictly abide by the confidentiality obligations. No part of this
document shall be disclosed or provided to any third party for use without the prior
written consent of Alibaba Cloud.
3. The content of this document may be changed due to product version upgrades,
adjustments, or other reasons. Alibaba Cloud reserves the right to modify the content
of this document without notice and the updated versions of this document will be
occasionally released through Alibaba Cloud-authorized channels. You shall pay
attention to the version changes of this document as they occur and download and
obtain the most up-to-date version of this document from Alibaba Cloud-authorized
channels.
4. This document serves only as a reference guide for your use of Alibaba Cloud products
and services. Alibaba Cloud provides the document in the context that Alibaba Cloud
products and services are provided on an "as is", "with all faults" and "as available"
basis. Alibaba Cloud makes every effort to provide relevant operational guidance based
on existing technologies. However, Alibaba Cloud hereby makes a clear statement that it
in no way guarantees the accuracy, integrity, applicability, and reliability of the content
of this document, either explicitly or implicitly. Alibaba Cloud shall not bear any liability
for any errors or financial losses incurred by any organizations, companies, or individual
s arising from their download, use, or trust in this document. Alibaba Cloud shall not,
under any circumstances, bear responsibility for any indirect, consequential, exemplary
, incidental, special, or punitive damages, including lost profits arising from the use or
trust in this document, even if Alibaba Cloud has been notified of the possibility of such
a loss.
Issue: 20200529 I
Object Storage Service Quick Start / Legal disclaimer
5. By law, all the contents in Alibaba Cloud documents, including but not limited to
pictures, architecture design, page layout, and text description, are intellectual property
of Alibaba Cloud and/or its affiliates. This intellectual property includes, but is not
limited to, trademark rights, patent rights, copyrights, and trade secrets. No part of
this document shall be used, modified, reproduced, publicly transmitted, changed,
disseminated, distributed, or published without the prior written consent of Alibaba
Cloud and/or its affiliates. The names owned by Alibaba Cloud shall not be used,
published, or reproduced for marketing, advertising, promotion, or other purposes
without the prior written consent of Alibaba Cloud. The names owned by Alibaba Cloud
include, but are not limited to, "Alibaba Cloud", "Aliyun", "HiChina", and other brands
of Alibaba Cloud and/or its affiliates, which appear separately or in combination, as
well as the auxiliary signs and patterns of the preceding brands, or anything similar
to the company names, trade names, trademarks, product or service names, domain
names, patterns, logos, marks, signs, or special descriptions that third parties identify as
Alibaba Cloud and/or its affiliates.
6. Please contact Alibaba Cloud directly if you discover any errors in this document.
II Issue: 20200529
Object Storage Service Quick Start / Legal disclaimer
Document conventions
Style Description Example
> Closing angle brackets are used Click Settings > Network > Set
to indicate a multi-level menu network type.
cascade.
Courier font Courier font is used for commands. Run the cd /d C:/window
command to enter the Windows
system folder.
Issue: 20200529 I
Object Storage Service Quick Start / Document conventions
II Issue: 20200529
Object Storage Service Quick Start / Document conventions
Contents
Legal disclaimer......................................................................... I
Document conventions................................................................I
1 Get started with Object Storage Service.................................... 1
2 Sign up for OSS...................................................................... 3
3 Create buckets........................................................................ 4
4 Upload objects......................................................................10
5 Download objects................................................................. 13
6 Delete objects....................................................................... 16
7 Delete buckets...................................................................... 18
IV Issue: 20200529
Object Storage Service Quick Start / 1 Get started with Object Storage Service
Before you use OSS, we recommend that you familiarize with OSS usage limits. For more
information, see Limits.
OSS uploads data files as objects to a bucket. You can perform the following operations in
OSS:
• Create one or multiple buckets and upload one or multiple objects to each bucket.
• Configure the ACL for a bucket or object by modifying its attributes or metadata.
• Perform basic and advanced OSS operations in the OSS console or by using various
convenient tools and SDKs.
The following figure shows the steps to perform basic OSS operations in the OSS console.
1. Activate OSS.
2. Create a bucket.
3. Upload an object.
4. Download an object.
5. Delete an object.
6. Delete a bucket.
Use ossbrowser
ossbrowser is a graphical object management tool for OSS. This tool supports the Windows,
Linux, and Mac operating systems. You can use ossbrowser to view, upload, and download
objects and folders, upload or download objects in resumable mode, or perform GUI-based
policy authorization. As a desktop graphical tool, ossbrowser provides lower transmission
speed and performance than ossutil. For more information, see Quick start.
Issue: 20200529 1
Object Storage Service Quick Start / 1 Get started with Object Storage Service
Use ossutil
ossutil allows you to use command lines to manage OSS data and supports the following
operating systems: Windows, Linux, and Mac. ossutil provides simple commands to
efficiently manage buckets and objects and supports concurrent upload tasks. ossutil
supports the upload, download, and resumable transmission of objects and folders. For
more information, see Quick start.
OSS provides APIs and SDKs in multiple programming languages to facilitate secondary
development. For more information, see the following links:
For SDK examples in more programming languages, see OSS SDK introduction. For more
information about OSS APIs, see OSS API introduction.
Subsequent operations
For more information about advanced OSS operations, see the OSS Developer Guide.
2 Issue: 20200529
Object Storage Service Quick Start / 2 Sign up for OSS
Prerequisites
Procedure
4. Once OSS is activated, click Management Console in the Object Storage Service page to
access the OSS console.
You can also click Console in the upper right corner to access the Alibaba Cloud console,
and then select Object Storage Service in the left-side navigation pane to access the
OSS console.
What's next
Create a bucket
Issue: 20200529 3
Object Storage Service Quick Start / 3 Create buckets
3 Create buckets
After you activate Alibaba Cloud OSS, you must create a bucket in the OSS console to store
objects.
2. In the left-side navigation pane, click Buckets. On the page that appears, click Create
Bucket.
You can also click Overview. Click Create Bucket in the upper-right corner.
3. In the Create Bucket dialog box that appears, configure the parameters listed in the
following table.
Parameter Description
Bucket Name Set the name of the bucket. The name cannot be changed after the
bucket is created. The naming conventions are as follows:
Region Select the region for the bucket. The region cannot be changed
after the bucket is created. To access OSS from an ECS instance
over the internal network, select the region in which the ECS
instance is located. For more information, see Endpoints.
4 Issue: 20200529
Object Storage Service Quick Start / 3 Create buckets
Parameter Description
Note:
The Cold Archive storage class is in public preview in the
Australia (Sydney) region. You can contact technical support
to apply for a trial.
Issue: 20200529 5
Object Storage Service Quick Start / 3 Create buckets
Parameter Description
Notice:
This feature incurs extra costs and cannot be disabled after it
is enabled. Exercise caution when you enable this feature.
• Disable: After ZRS is disabled, the redundancy type of the
objects in the bucket is locally redundant storage (LRS). If the
storage class of the bucket is Standard, the objects in the bucket
are standard (LRS) objects by default.
6 Issue: 20200529
Object Storage Service Quick Start / 3 Create buckets
Parameter Description
Warning:
All Internet users can access objects in the bucket. This may
cause unexpected access to the data in your bucket, and
cause an increase in your fees. Exercise caution when you set
your bucket ACL to Public Read.
• Public Read/Write: All users, including anonymous users, can
perform read and write operations on objects in the bucket.
Warning:
All Internet users can access objects in the bucket and write
data to the bucket. This may cause unexpected access to the
data in your bucket, and cause an increase in your fees. If a
user uploads prohibited data or information, it may affect
your legitimate interests and rights. Therefore, if there are no
special requirements, we recommend that you do not set your
bucket ACL to Public Read/Write.
Issue: 20200529 7
Object Storage Service Quick Start / 3 Create buckets
Parameter Description
Notice:
Real-time Log Select whether to enable real-time log query for OSS.
Query
• Enable: enables real-time log query for OSS. OSS uses Log
Service to provide real-time OSS log queries for the last seven
days free of charge. After this feature is enabled, you can query
and analyze records of access to objects in OSS buckets by
using the OSS console in real time. For more information, see
Real-time log query.
• Disable: disables real-time log query.
8 Issue: 20200529
Object Storage Service Quick Start / 3 Create buckets
Parameter Description
Scheduled Backup Select whether to create a scheduled backup plan to back up your
OSS data by using Hybrid Backup Recovery (HBR).
Notice:
If HBR is not activated or not authorized to access OSS, scheduled
backup plans cannot be created. For more information, see
#unique_28.
4. Click OK.
Use ossutil
ossutil is a command line tool for OSS. You can use ossutil to create a bucket. For more
information, see mb.
OSS provides APIs and SDKs that use a variety of programming languages to facilitate
secondary development. For more information, see the following topics:
For more information about SDK examples in more programming languages, see
t22258.dita#concept_dcn_tp1_kfb.
What's next
Upload objects
Issue: 20200529 9
Object Storage Service Quick Start / 4 Upload objects
4 Upload objects
After a bucket is created, you can upload any type of object to it.
Prerequisites
A bucket has been created. For more information, see Create a bucket.
To upload an object to an OSS bucket in the OSS console, perform the following steps:
• New console: Click Buckets, and then click the name of the target bucket.
• Old console: In the left-side navigation pane, click the name of the target bucket.
4. In the Upload dialog box that appears, set the following parameters.
Parameter Description
10 Issue: 20200529
Object Storage Service Quick Start / 4 Upload objects
Parameter Description
File ACL Sets the ACL of the object to upload. Default value: Inherited from
Bucket.
Upload Drag and drop one or more objects to upload to this section, or
click Upload to select one or more objects to upload.
Notice:
5. After the upload is complete, close the Upload Tasks dialogue box.
Use ossbrowser
ossbrowser is a graphical object management tool for OSS. You can use ossbrowser to
upload an object to an OSS bucket. For more information, see #unique_11.
Use ossutil
ossutil is a command-line tool for OSS. You can use ossutil to upload an object to OSS. For
more information, see cp.
Issue: 20200529 11
Object Storage Service Quick Start / 4 Upload objects
• API operation:
• Go SDK: Overview
• C SDK: Overview
For more information about SDK examples in other programming languages, see Introducti
on.
Precautions
• You can use ossbrowser and ossutil to upload an object up to 48.8 TB in size.
• When you use #unique_47 to upload an object, the size of object that can be appended
each time and the size of the entire object cannot exceed 5 GB.
• If you use an SDK or API to perform Simple upload and Form upload, the size of the
object to upload cannot exceed 5 GB.
• If you use an SDK or API to perform Multipart upload and resumable upload the size of
the object to upload cannot exceed 48.8 TB.
What's next
• Images can be processed in OSS after they are uploaded. For more information, see
Image processing.
• Audio or video objects can be processed in OSS after they are uploaded. For more
information, see the "Media Processing" section in Cloud data processing.
• After objects are uploaded to OSS, you can use Upload callback to submit a callback
request to the specified application server and perform subsequent operations.
• You can also download objects that have been uploaded to OSS as needed. For more
information, see Download objects.
12 Issue: 20200529
Object Storage Service Quick Start / 5 Download objects
5 Download objects
This topic describes how to download one or more objects from a bucket in the OSS
console.
Prerequisites
Objects have been uploaded to the bucket. For more information, see Upload objects.
Click the Files tab. You can perform the operations listed in the following table.
Download Select one or more objects. Choose You can download up to 100
multiple Batch Operation > Download. objects at a time from the console.
objects at a
time
Issue: 20200529 13
Object Storage Service Quick Start / 5 Download objects
Preview an You can use one of the following If your bucket is bound to a custom
object methods to preview an object: domain name, find the Custom
Domain Name section in the View
• Preview an object from the
Details dialog box. Select the
console
bound custom domain name or
Click the name of an object, None from the drop-down list
or click View Details in the to generate different URLs of the
object. For more information about
Actions column corresponding
how to bind a custom domain
to the object. If your browser name, see #unique_55.
supports previews of objects in
• When you use a browser to
this format, you can preview the access web page objects of
object in the View Details dialog the HTM, HTML, JSP, PLG, HTX,
and STM formats by using an
box that appears.
unmodified URL generated
• Preview an object by using the
from an OSS domain name,
object URL
the objects are downloaded
Click the name of an object, or . However, if you use a URL
generated from a custom
click View Details in the Actions
domain name, you can preview
column corresponding to the the object in the browser.
object. In the View Details • When you access an image
dialog box that appears, click object by using an unmodified
URL:
Open File URL.
- If your bucket was created
before September 23, 2019
within the mainland China
regions, you can use an
object URL generated from
an OSS domain name or a
custom domain name to
preview the object in the
browser.
- If your bucket was created
after September 23, 2019
within the mainland China
regions, when you access
an image object through
the browser by using an
object URL generated from
an OSS domain name, the
image object is downloaded
as an attachment. If you
14 instead access anIssue:
image20200529
Share an Click the name of an object, or click If you want to share a private
object View Details in the Actions column object, you must set Validity Period
corresponding to the object. In (Seconds) during which the object
the View Details dialog box that can be shared. The default validity
appears, click Copy File URL. Send period of the URL is 3,600 seconds
the object URL to other visitors. (1 hour). The maximum validity
period is 32,400 seconds (9 hours).
To obtain a URL with a longer
validity period, we recommend
that you use ossutil, ossbrowser, or
SDKs.
Use ossbrowser
ossbrowser is a graphical object management tool for OSS. You can use ossbrowser to
download objects you need. For more information, see Quick start.
Use ossutil
ossutil is a command-line tool for OSS. You can use ossutil to download objects you need.
For more information, see cp.
OSS provides APIs and SDKs that use a variety of programming languages to facilitate
secondary development. For more information, see the following topics:
• Go SDK: Overview
• C SDK: Overview
For more information about SDK examples in other programming languages, see
Introduction.
Issue: 20200529 15
Object Storage Service Quick Start / 6 Delete objects
6 Delete objects
If you no longer need objects in a bucket, delete them from the bucket to avoid incurring
further fees.
Context
You can delete a single object or multiple objects by using the OSS console. You can delete
up to 100 objects at a time by using the console. You can select and delete objects in a
more flexible manner. For more information about how to delete more than 100 objects at
a time, see Delete objects in OSS Developer Guide.
Warning:
You cannot recover deleted objects. Exercise caution when you perform this operation.
To delete unnecessary objects by using the OSS console, perform the following steps:
3. Click Files.
4. Select one or multiple objects, and then choose Batch Operation > Delete.
You can also choose More > Delete in the Actions column corresponding to the target
object.
Use ossbrowser
ossbrowser is a graphical object management tool for OSS. You can use ossbrowser to
delete unnecessary objects. For more information, see #unique_11.
Use ossutil
ossutil is a command-line tool for OSS. You can use ossutil to delete unnecessary objects.
For more information, see rm.
16 Issue: 20200529
Object Storage Service Quick Start / 6 Delete objects
• API: DeleteObject
For more information about SDK examples for other programming languages, see
Introduction.
Issue: 20200529 17
Object Storage Service Quick Start / 7 Delete buckets
7 Delete buckets
If you no longer use a bucket, delete it to avoid incurring further fees.
Prerequisites
To delete a bucket, ensure that all objects in the bucket are deleted, including parts
generated from incomplete multipart upload tasks. Otherwise, the bucket cannot be
deleted.
• To delete all objects in a bucket, we recommend that you configure lifecycle rules for the
bucket.
• For more information about how to delete parts in a bucket, see #unique_74.
Warning:
Deleted objects cannot be recovered. We recommended that you proceed with caution
when you perform this operation.
• New console
• Old console
a. Click the Basic Settings tab. Find the Bucket Management section.
Use ossbrowser
ossbrowser is a graphical object management tool for OSS. You can use ossbrowser to
delete buckets. For more information, see #unique_11.
Use ossutil
ossutil is a command line tool for OSS. You can use ossutil to delete buckets. For more
information, see rm.
18 Issue: 20200529
Object Storage Service Quick Start / 7 Delete buckets
For more information about SDK examples in other programming languages, see Introducti
on.
Issue: 20200529 19