huawei-cloud-obs-bucket-create
huaweicloud/huaweicloud-skills
Create and configure Huawei Cloud OBS storage buckets with validation and permission setup.
What is huawei-cloud-obs-bucket-create?
This skill automates bucket creation on Huawei Cloud Object Storage Service (OBS), handling name validation, region selection, access control, and storage class configuration. Use it when setting up new cloud storage infrastructure on Huawei Cloud.
- Validates bucket names against OBS naming rules (3-63 chars, lowercase, hyphens, dots)
- Creates buckets with configurable region, ACL, and storage class
- Configures access permissions (private, public-read, public-read-write)
- Sets storage class (standard, warm, cold, deep-archive) based on access patterns
- Batch creates multiple buckets via script
- Lists and inspects bucket properties post-creation
How to install huawei-cloud-obs-bucket-create
npx skills add https://github.com/huaweicloud/huaweicloud-skills --skill huawei-cloud-obs-bucket-create- Huawei Cloud CLI (hcloud/KooCLI) version 3.2.0 or higher
- Valid Huawei Cloud OBS credentials (AK/SK pair) configured in ~/.obsutilconfig
- Network access to Huawei Cloud OBS service endpoints
- Sufficient OBS bucket quota on the Huawei Cloud account
How to use huawei-cloud-obs-bucket-create
- 1.Provide or confirm the bucket name (3-63 characters, lowercase letters/numbers/hyphens/dots, no leading/trailing hyphens or dots)
- 2.Specify the region (e.g., cn-north-4) or use the default from ~/.obsutilconfig
- 3.Optionally set ACL (private/public-read/public-read-write), storage class (standard/warm/cold/deep-archive), and availability zone
- 4.Run `hcloud OBS mb obs://bucket-name` with desired options
- 5.Verify creation by running `hcloud OBS ls` and `hcloud OBS stat obs://bucket-name`
Use cases
- Setting up new cloud storage for a project on Huawei Cloud
- Creating region-specific buckets for data residency compliance
- Batch provisioning storage buckets across multiple regions
- Configuring tiered storage (standard/warm/cold/deep-archive) for cost optimization
- Establishing bucket access policies during infrastructure setup
- Cloud infrastructure engineers
- DevOps professionals managing Huawei Cloud deployments
- System administrators setting up object storage
- Teams migrating to or standardizing on Huawei Cloud OBS
huawei-cloud-obs-bucket-create FAQ
No, the region is immutable once the bucket is created. Choose the region carefully before creation.
Standard is for frequent access, warm for infrequent access, cold for rarely accessed data, and deep-archive for very rarely accessed data. Choose based on your access patterns to optimize costs.
Yes, bucket names are globally unique across all Huawei Cloud OBS users. If a name is taken, you must choose a different one.
Use the `batch_create_buckets.sh` script with a bucket-name prefix and regions list. Exit code 6 from the Huawei Cloud CLI is normal behavior in batch operations.
3-63 characters, start with a letter or number, use only lowercase letters, numbers, hyphens, and dots. Cannot start/end with hyphens or dots, no adjacent dots or dot-hyphen combinations, and cannot be in IP address format.
Full instructions (SKILL.md)
Source of truth, from huaweicloud/huaweicloud-skills.
name: huawei-cloud-obs-bucket-create description: | Skill specialized for creating buckets on Huawei Cloud OBS. Use this skill when users need to create OBS buckets, set bucket properties, configure access permissions, or need guidance on the bucket creation process. Trigger conditions: "创建OBS桶", "华为云存储桶", "存储空间创建", "create OBS bucket", "Huawei Cloud storage bucket", "OBS bucket", "Huawei Cloud bucket", "storage creation" or when setting up Huawei Cloud object storage. tags: [huawei-cloud, obs, storage, bucket]
Huawei Cloud OBS Bucket Create Skill
Overview
This skill is used for creating buckets on Huawei Cloud Object Storage Service (OBS). It provides a simple, interactive bucket creation process, including bucket name validation, region selection, access permission configuration, and other advanced options.
Applicable Scenarios:
- Creating new buckets on Huawei Cloud OBS
- Setting bucket access permissions and policies
- Configuring bucket region and storage class
- Validating bucket names against specifications
- Batch creation of multiple buckets
Prerequisites
1. Huawei Cloud CLI Tool Installed
Required check: Huawei Cloud CLI (hcloud / KooCLI) >= 3.2.0
# Check if installed
hcloud version
If not installed, or version is lower than 3.2.0, refer to cli-installation-guide.md for KooCLI installation. KooCLI has built-in obsutil tool, if KooCLI version check passes, obsutil check can be skipped.
2. Huawei Cloud Credentials Configured
- Valid Huawei Cloud OBS credentials (AK/SK mode)
# View configuration
hcloud obs ls -s
# Configuration file location ~/.obsutilconfig
If Huawei Cloud credentials are not configured, prompt the user to execute the following command:
# Configure Huawei Cloud credentials
hcloud OBS config -i="<Your AK>" -k="<Your SK>" -e="obs.<Region>.myhuaweicloud.com"
Huawei Cloud OBS credentials do not inherit from Huawei Cloud credentials and need to be set separately.
- Security Rules:
- 🚫 Do not directly enter AK/SK values in plain text.
- 🚫 Never expose AK/SK values, do not extract AK/SK from hcloud configuration files.
- ✅ Only use
hcloud configure listto check credential status.
Core Workflow
Bucket name bucket-name is a required condition for creating an OBS bucket. If the context does not specify a bucket name, prompt the user that a specific bucket name is needed, no other text prompts required.
Step 1: Validate Bucket Name
Bucket name rules are as follows:
- 3-63 characters, starting with a number or letter, supporting lowercase letters, numbers, "-", ".".
- IP address format is not allowed.
- Cannot start or end with "-" or ".".
- Two adjacent "." are not allowed (e.g., "my..bucket").
- Adjacent "." and "-" are not allowed (e.g., "my-.bucket" and "my.-bucket")."
If the bucket name does not comply with the specification. Remind the user to reset the bucket name.
Step 2: Select Region
Get the region for the OBS bucket to be created from the context. If no region is specified, use the "endpoint" parameter in the ~/.obsutilconfig file as the region by default. Return prompt text:
Once a bucket is created successfully, the region cannot be changed, please choose carefully. The region you want to create the bucket in is ${region}
Step 3: Create Bucket
# Create with recommended configuration
hcloud OBS mb obs://bucket-name [-acl=xxx] [-location=xxx] [-fs] [-az=xxx] [-sc=xxx]
# Batch create multiple buckets. Script exit code 6 from Huawei Cloud CLI is normal behavior, not an execution error
./scripts/batch_create_buckets.sh <bucket-name-prefix> <regions>
Step 4: Validate Success (Optional)
# List all buckets to confirm creation success
hcloud OBS ls
# Check bucket properties
hcloud OBS stat obs://bucket-name
If the bucket list contains the bucket name created this time and the bucket information is output normally, prompt that the creation is successful and list the basic information of the bucket.
Core Commands
Create Storage Bucket
hcloud OBS mb obs://bucket-name [-acl=xxx] [-location=xxx] [-fs] [-az=xxx] [-sc=xxx]
| Option | Description | Possible Values |
|---|---|---|
-acl=xxx | Access Control List | private, public-read, public-read-write |
-location=xxx | Region | cn-north-4, cn-east-2, etc. |
-az=xxx | Availability Zone | multi-az |
-sc=xxx | Default Storage Class | standard, warm, cold, deep-archive |
List Storage Buckets
hcloud OBS ls
View Storage Bucket Properties
hcloud OBS stat obs://${bucket-name}
Parameter Confirmation
Required Parameters
- bucket-name: Storage bucket name, must comply with OBS naming convention (3-63 characters, lowercase letters, numbers, hyphens, dots, not starting or ending with hyphen or dot)
Optional Parameters
- region: Region code, such as cn-north-4 (North China-Beijing 4), cn-east-2 (East China-Shanghai 2)
- acl: Access permission, default private
- storage-class: Storage class, default standard
- az: Availability zone, default single availability zone, can be set to multi-az (multi-availability zone)
Best Practices
- Naming Convention: Use meaningful bucket names, such as
project-name-environment-purpose-20250527 - Region Selection: Choose the region closest to users to reduce latency, Beijing 4 (cn-north-4) is a commonly used region
- Access Control: Use private ACL by default, only open public-read when needed
- Storage Class: Choose based on access frequency:
- Standard storage (standard): Frequently accessed data
- Infrequent access storage (warm): Infrequently accessed data
- Archive storage (cold): Rarely accessed data
- Deep archive storage (deep-archive): Very rarely accessed data
- Batch Creation: Use
batch_create_buckets.shscript to batch create multiple buckets - Version Control: Consider enabling bucket version control to prevent accidental deletion
Notes
- Bucket Name Uniqueness: Bucket name is globally unique in Huawei Cloud OBS, cannot be duplicated with other users
- Region Immutability: Cannot change the bucket region after creation
- Cost: Storage buckets are free, but storing data, requests, and traffic will incur costs
- Security: Do not hard-code AK/SK in scripts, use environment variables or configuration files
- Permissions: Ensure the user executing the command has sufficient OBS permissions
- Network: Ensure network can access Huawei Cloud OBS service endpoints
- Quota: Check account's OBS bucket quantity quota
- Deletion Protection: Important buckets can enable deletion protection to prevent accidental deletion
Reference Documentation
| Document | Description |
|---|---|
| KooCLI Installation Guide | KooCLI installation guide |
| Common Errors and Solutions | Error troubleshooting |
Related skills
More from huaweicloud/huaweicloud-skills and the wider catalog.

huawei-cloud-obs-stats
Query Huawei Cloud OBS bucket statistics, download traffic, and request metrics with month-over-month comparison.

huawei-cloud-obs-upload
Upload files and directories to Huawei Cloud OBS buckets, list bucket stats, and schedule periodic syncs.

huawei-cloud-obs-website-host
Enable Huawei Cloud OBS static website hosting with custom domain and DNS configuration.

huawei-cloud-openviking-agent-integration
Integrate OpenViking long-term memory into 8 coding agents via native mechanisms (MCP, HTTP, config).

huawei-cloud-openviking-embedding-switch
Switch OpenViking's embedding model to a local llama-server or OpenAI-compatible endpoint with automatic vectordb index rebuild.

huawei-cloud-storage-query
Query Huawei Cloud storage resources (EVS, OBS, SFS, CBR) without write operations.