Skip to main content

S3

Limits

itemspece.g.
key1024 bytesa/b/c
key segment255 bytesa
bucket63 bytes

bucket name

(?!(^xn--|.+-s3alias$))^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$
(?!(^((2(5[0-5]|[0-4][0-9])|[01]?[0-9]{1,2})\.){3}(2(5[0-5]|[0-4][0-9])|[01]?[0-9]{1,2})$|^xn--|.+-s3alias$))^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$

headers

  • x-amz-meta-
  • x-amz-acl
  • x-amz-server-side-encryption-
  • x-amz-server-side-encryption
  • x-amz-storage-class
content-type
cache-control
content-encoding
content-disposition
content-language
x-amz-website-redirect-location

Content-MD5: ${BASE64}

# SigV4 - Signature Version 4
# UNSIGNED-PAYLOAD 不计算 payload hash
x-amz-content-sha256: UNSIGNED-PAYLOAD
x-amz-content-sha256: ${hex(sha256)}

# 自动处理
x-amz-sdk-checksum: SHA256

API

Profile

~/.aws/credentials
[default]
aws_access_key_id = YOUR_ACCESS_KEY
aws_secret_access_key = YOUR_SECRET_KEY

[your_profile_name]
aws_access_key_id = YOUR_ACCESS_KEY
aws_secret_access_key = YOUR_SECRET_KEY
aws --profile project01 --endpoint-url http://localhost:9000 s3 ls s3://my-bucket01/

FAQ