Alibaba Cloud
Cloud Platform
Alibaba Cloud
Overview
Alibaba Cloud is the cloud computing platform provided by Alibaba Group. As China's largest cloud provider and a major player in the Asia-Pacific region, it offers innovative services particularly in AI, machine learning, and big data processing, while accelerating its global expansion beyond its dominant position in the Chinese domestic market.
Details
Alibaba Cloud began its services in 2009 and now operates globally across 29 regions with 87 availability zones. Built around core services like ECS (Elastic Compute Service), Object Storage Service, CDN, and AI Platform, it has particularly strong performance in e-commerce, fintech, and IoT sectors in China. Key 2025 features include massive AI enhancements at Spring Launch 2025, expansion of the Qwen model series (QwQ-Plus reasoning model, QVQ-Max visual reasoning model), Platform for AI (PAI) distributed inference capabilities, SaaS AI products like AI Doc and Smart Studio, and a three-year $53 billion AI and cloud infrastructure investment plan.
Key Features
- ECS (Elastic Compute Service): High-performance and flexible virtual cloud servers
- AI & Machine Learning: Comprehensive AI solutions through the Qwen model series and extensive AI Platform
- Big Data Processing: Large-scale data analytics platform using MaxCompute and DataWorks
- China Market Advantage: Regulatory compliance and optimized networking for the Chinese domestic market
- Global Expansion: Strong presence in Asia-Pacific, Europe, and North America
Latest 2025 Features
- Qwen Model Enhancement: QwQ-Plus reasoning model, QVQ-Max visual reasoning model, Qwen2.5-Omni-7b
- Platform for AI (PAI) Upgrade: Distributed inference capabilities, 92% concurrency improvement, 91% TPS enhancement
- SaaS AI Products: AI Doc (document processing), Smart Studio (content creation)
- Massive Investment: $53 billion AI and cloud infrastructure investment over three years
- Global Expansion: Second data center in South Korea (scheduled to open by end of June 2025)
Pros and Cons
Pros
- Number one market share and proven track record in the Chinese market
- Complete compliance with Chinese regulations (Data Protection Law, Cybersecurity Law)
- Advanced solutions leveraging Alibaba Group's e-commerce and fintech technologies
- Excellent network connectivity and latency in the Asia-Pacific region
- Innovative technologies and service portfolio in AI and machine learning
- Cost-effective pricing structure
- Multi-language support (Chinese, English, Japanese, etc.)
Cons
- Usage restrictions and concerns in some countries/regions due to its Chinese corporate nature
- More limited global expansion compared to AWS, Azure, and GCP
- Insufficient technical documentation and support in English/Japanese compared to Chinese
- Fewer enterprise adoption cases in Western markets compared to other major clouds
- Some services are provided exclusively for the Chinese domestic market
- Data sovereignty and compliance requirements vary by region
Reference Pages
- Alibaba Cloud Official Site
- Alibaba Cloud Documentation
- Alibaba Cloud Pricing Calculator
- Alibaba Cloud ECS (Elastic Compute Service)
- Alibaba Cloud Free Trial
- Alibaba Cloud Certification & Training
Code Examples
Basic Setup and Account Configuration
# Install Alibaba Cloud CLI
wget https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz
tar -xzf aliyun-cli-linux-latest-amd64.tgz
sudo mv aliyun /usr/local/bin/
# Initialize CLI configuration
aliyun configure set \
--profile default \
--mode AK \
--region cn-hangzhou \
--access-key-id <your-access-key-id> \
--access-key-secret <your-access-key-secret>
# Check configuration
aliyun configure list
# List available regions
aliyun ecs DescribeRegions
# Check resource groups
aliyun resourcemanager ListResourceGroups
# Test API call
aliyun ecs DescribeInstances --PageSize 10
# Check CLI help
aliyun ecs --help
Compute Services (VMs, Containers)
package main
import (
"context"
"fmt"
"log"
"github.com/aliyun/alibabacloud-oss-go-sdk-v2/oss"
"github.com/aliyun/alibabacloud-oss-go-sdk-v2/oss/credentials"
)
func main() {
// Configure Alibaba Cloud authentication
provider := credentials.NewEnvironmentVariableCredentialsProvider()
cfg := oss.LoadDefaultConfig().
WithCredentialsProvider(provider).
WithRegion("cn-hangzhou")
// Create ECS instance (using CLI)
// aliyun ecs RunInstances \
// --ImageId ubuntu_20_04_x64_20G_alibase_20210420.vhd \
// --InstanceType ecs.t6-c1m2.large \
// --SecurityGroupId sg-xxxxxxxxx \
// --VSwitchId vsw-xxxxxxxxx \
// --InstanceName "my-ecs-instance" \
// --InternetMaxBandwidthOut 5
// Create Container Service for Kubernetes (ACK) cluster
// aliyun cs CreateCluster \
// --name "my-k8s-cluster" \
// --cluster-type "ManagedKubernetes" \
// --region-id "cn-hangzhou" \
// --kubernetes-version "1.28.3-aliyun.1" \
// --runtime "containerd" \
// --vpcid "vpc-xxxxxxxxx" \
// --container-cidr "172.16.0.0/16" \
// --service-cidr "172.17.0.0/16" \
// --worker-instance-types "ecs.g6.xlarge" \
// --num-of-nodes 3
// Create Function Compute (serverless) service
// aliyun fc CreateService \
// --serviceName "my-fc-service" \
// --description "My serverless service"
// Create Function
// aliyun fc CreateFunction \
// --serviceName "my-fc-service" \
// --functionName "hello-world" \
// --runtime "python3.9" \
// --handler "index.handler" \
// --code '{"zipFile":"UEsDBAoAAAAAABcAQllFLMHrVwAAAFcAAAAIAAAAaW5kZXgucHmwAgo="}' \
// --timeout 60 \
// --memorySize 128
}
Storage and Database Services
package main
import (
"context"
"fmt"
"log"
"bytes"
"github.com/aliyun/alibabacloud-oss-go-sdk-v2/oss"
"github.com/aliyun/alibabacloud-oss-go-sdk-v2/oss/credentials"
)
func main() {
// Configure Object Storage Service (OSS)
provider := credentials.NewEnvironmentVariableCredentialsProvider()
cfg := oss.LoadDefaultConfig().
WithCredentialsProvider(provider).
WithRegion("cn-hangzhou")
client := oss.NewClient(cfg)
// Create bucket
result, err := client.PutBucket(context.TODO(), &oss.PutBucketRequest{
Bucket: oss.Ptr("my-alibaba-bucket"),
Acl: oss.BucketACLPrivate,
CreateBucketConfiguration: &oss.CreateBucketConfiguration{
StorageClass: oss.StorageClassStandard,
},
})
if err != nil {
log.Fatalf("failed to create bucket: %v", err)
}
fmt.Printf("Bucket created: %v\n", result)
// Upload object
putResult, err := client.PutObject(context.TODO(), &oss.PutObjectRequest{
Bucket: oss.Ptr("my-alibaba-bucket"),
Key: oss.Ptr("sample.txt"),
Body: bytes.NewReader([]byte("Hello, Alibaba Cloud!")),
})
if err != nil {
log.Fatalf("failed to upload object: %v", err)
}
fmt.Printf("Object uploaded: %v\n", oss.ToString(putResult.ETag))
// Download object
getResult, err := client.GetObject(context.TODO(), &oss.GetObjectRequest{
Bucket: oss.Ptr("my-alibaba-bucket"),
Key: oss.Ptr("sample.txt"),
})
if err != nil {
log.Fatalf("failed to download object: %v", err)
}
defer getResult.Body.Close()
// Create ApsaraDB for RDS (MySQL) instance (using CLI)
// aliyun rds CreateDBInstance \
// --Engine "MySQL" \
// --EngineVersion "8.0" \
// --DBInstanceClass "mysql.n2.medium.1" \
// --DBInstanceStorage "20" \
// --DBInstanceStorageType "cloud_essd" \
// --PayType "Postpaid" \
// --SecurityIPList "0.0.0.0/0" \
// --DBInstanceDescription "My MySQL Database"
// Create AnalyticDB for PostgreSQL
// aliyun gpdb CreateDBInstance \
// --RegionId "cn-hangzhou" \
// --ZoneId "cn-hangzhou-i" \
// --Engine "gpdb" \
// --EngineVersion "6.0" \
// --DBInstanceClass "gpdb.group.segsdx2" \
// --DBInstanceGroupCount "2" \
// --DBInstanceDescription "My AnalyticDB for PostgreSQL"
}
Networking and Security
# Create VPC (Virtual Private Cloud)
aliyun vpc CreateVpc \
--RegionId "cn-hangzhou" \
--CidrBlock "192.168.0.0/16" \
--VpcName "my-vpc" \
--Description "My VPC for development"
# Create VSwitch (subnet)
aliyun vpc CreateVSwitch \
--VpcId "vpc-xxxxxxxxx" \
--ZoneId "cn-hangzhou-i" \
--CidrBlock "192.168.1.0/24" \
--VSwitchName "my-vswitch"
# Create security group
aliyun ecs CreateSecurityGroup \
--RegionId "cn-hangzhou" \
--GroupName "my-security-group" \
--Description "My security group" \
--VpcId "vpc-xxxxxxxxx"
# Add security group rule (SSH)
aliyun ecs AuthorizeSecurityGroup \
--SecurityGroupId "sg-xxxxxxxxx" \
--RegionId "cn-hangzhou" \
--IpProtocol "tcp" \
--PortRange "22/22" \
--SourceCidrIp "0.0.0.0/0" \
--Policy "accept"
# Add security group rule (HTTP)
aliyun ecs AuthorizeSecurityGroup \
--SecurityGroupId "sg-xxxxxxxxx" \
--RegionId "cn-hangzhou" \
--IpProtocol "tcp" \
--PortRange "80/80" \
--SourceCidrIp "0.0.0.0/0" \
--Policy "accept"
# Add CDN (Content Delivery Network) domain
aliyun cdn AddCdnDomain \
--DomainName "example.com" \
--CdnType "web" \
--Sources '[{"content":"origin.example.com","type":"domain","priority":"20","port":80,"weight":"10"}]'
# Create WAF (Web Application Firewall) instance
aliyun waf-openapi CreateInstance \
--SubscriptionType "Subscription" \
--Period "1" \
--RenewalStatus "ManualRenewal" \
--RenewPeriod "1"
Serverless and Functions
# Create Function Compute service
aliyun fc CreateService \
--serviceName "my-serverless-app" \
--description "My serverless application" \
--role "acs:ram::123456789:role/AliyunFCDefaultRole"
# Create Python function
cat > index.py << 'EOF'
def handler(event, context):
import json
return {
'statusCode': 200,
'body': json.dumps({
'message': 'Hello from Alibaba Cloud Function Compute!',
'event': event
})
}
EOF
# Create function code zip file
zip function.zip index.py
# Deploy function
aliyun fc CreateFunction \
--serviceName "my-serverless-app" \
--functionName "hello-function" \
--runtime "python3.9" \
--handler "index.handler" \
--codeZipFile "function.zip" \
--timeout 60 \
--memorySize 128
# Test function execution
aliyun fc InvokeFunction \
--serviceName "my-serverless-app" \
--functionName "hello-function" \
--Payload '{"test": "data"}'
# API Gateway integration
aliyun apigateway CreateApi \
--GroupId "xxxxxxxxx" \
--ApiName "my-api" \
--Visibility "PRIVATE" \
--RequestConfig '{"RequestProtocol":"HTTP","RequestHttpMethod":"GET","RequestPath":"/hello","BodyFormat":"FORM"}' \
--ServiceConfig '{"ServiceProtocol":"FunctionCompute","ServiceAddress":"my-serverless-app.hello-function","ServiceTimeout":"3000","ServicePath":"","ServiceHttpMethod":"GET","ContentTypeCatagory":"DEFAULT","ContentTypeValue":"application/x-www-form-urlencoded; charset=UTF-8"}' \
--ResultType "JSON"
Monitoring and DevOps Integration
# CloudMonitor alarm configuration
aliyun cms PutContactGroup \
--ContactGroupName "dev-team" \
--Describe "Development team contact group" \
--Contacts.1.Name "admin"
# Create CPU usage monitoring alarm rule
aliyun cms PutResourceMetricRule \
--RuleId "cpu-usage-alarm" \
--RuleName "High CPU Usage" \
--MetricName "CPUUtilization" \
--Namespace "acs_ecs_dashboard" \
--Resources '[{"instanceId":"i-xxxxxxxxx"}]' \
--Escalations.Critical.Statistics "Average" \
--Escalations.Critical.Threshold "80" \
--Escalations.Critical.ComparisonOperator "GreaterThanThreshold" \
--ContactGroups "dev-team"
# Create Log Service project
aliyun log CreateProject \
--project "my-log-project" \
--description "My application logs"
# Create logstore
aliyun log CreateLogstore \
--project "my-log-project" \
--logstore "app-logs" \
--ttl "30" \
--shardCount "1"
# Create CodePipeline (CI/CD) pipeline
aliyun devops CreatePipeline \
--organizationId "xxxxxxxxx" \
--name "my-ci-cd-pipeline" \
--content '{
"sources": [{
"type": "codeup",
"name": "source",
"data": {
"uri": "https://codeup.aliyun.com/my-repo.git",
"branch": "main"
}
}],
"stages": [{
"name": "build",
"jobs": [{
"name": "build-job",
"type": "build",
"steps": [{
"step": "multi_lang_build@1",
"inputs": {
"run": ["npm install", "npm run build"]
}
}]
}]
}]
}'
# Create Container Registry (ACR) repository
aliyun cr CreateRepository \
--RegionId "cn-hangzhou" \
--RepoNamespace "my-namespace" \
--RepoName "my-app" \
--Summary "My application container repository" \
--RepoType "PRIVATE"
# AI Platform PAI (2025 new feature) model training
aliyun pai CreateTrainingJob \
--DisplayName "my-model-training" \
--AlgorithmSpec.TrainingImage "registry.cn-hangzhou.aliyuncs.com/pai-dlc/tensorflow:2.8.0-gpu-py38-cu111-ubuntu18.04" \
--RoleArn "acs:ram::123456789:role/AliyunPAIDefaultRole" \
--InputChannels.1.Name "training" \
--InputChannels.1.DataSource.Type "OSS" \
--InputChannels.1.DataSource.Location "oss://my-bucket/training-data/" \
--OutputChannels.1.Name "model" \
--OutputChannels.1.DataSource.Type "OSS" \
--OutputChannels.1.DataSource.Location "oss://my-bucket/model-output/"