# Amazon S3 API

Amazon S3 API 是 Amazon Simple Storage Service 的 Web 服务接口，定义了客户端如何通过 HTTP 创建存储桶、存储和获取对象，以及管理访问权限、版本控制、复制和元数据。其当前版本标识为 2006-03-01，出自该服务 2006 年 3 月 14 日上线前后，当年针对该 API 编写的代码至今仍可原样运行。<sup>[1](https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html)</sup><sup> • </sup><sup>[2](https://aws.amazon.com/blogs/aws/twenty-years-of-amazon-s3-and-building-whats-next/?refid=launch_TWITTER)</sup> 二十多年来，这一接口已成为对象存储的事实标准，被云服务商、设备厂商和开源项目广泛重新实现。<sup>[3](https://www.autoritedelaconcurrence.fr/sites/default/files/attachments/2023-09/23a08_EN.pdf)</sup>

| 关键事实 | 详情 |
|---|---|
| API 版本 | 当前 Amazon S3 API 版本为 `2006-03-01`。<sup>[1](https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html)</sup> |
| 主要协议 | 基于 HTTP 的 REST，使用标准 HTTP 头和状态码；基于 HTTP 的 SOAP 已弃用，仅通过 HTTPS 提供，且不再获得新功能。<sup>[1](https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html)</sup> |
| 上线时间 | S3 于 2006 年 3 月 14 日上线，提供 SOAP 和 REST 接口，最大对象 5 GB，设计目标为 99.99% 的数据可用性。<sup>[4](https://aws.amazon.com/blogs/aws/amazon_s3/)</sup> |
| 请求速率 | 每个 S3 前缀至少支持每秒 3,500 次写入请求和每秒 5,500 次读取请求。<sup>[5](https://aws.amazon.com/documentation-overview/s3/)</sup> |
| 一致性 | 强读写后一致性：成功写入或覆盖后，任何后续读取立即获得最新版本，列表操作立即反映变更。<sup>[5](https://aws.amazon.com/documentation-overview/s3/)</sup> |
| 认证 | 请求分为已认证和匿名两类；已认证请求必须签名，已弃用的签名版本 2 已被 SigV4 取代，后者派生一个特定于服务、区域和日期的签名密钥。<sup>[6](https://aws.amazon.com.cdn.amazon.com/blogs/aws/amazon-s3-update-sigv2-deprecation-period-extended-modified/)</sup><sup> • </sup><sup>[21](https://docs.aws.amazon.com/AmazonS3/latest/developerguide/MakingRequests.html)</sup><sup> • </sup><sup>[22](https://docs.aws.amazon.com/AmazonS3/latest/developerguide/AuthUsingAcctOrUserCredentials.html)</sup> |
| 行业采用 | API Evangelist 目录中有 58 家提供商声称兼容 S3；12 家在已发布的 OpenAPI 中声明了 S3 操作，5 家可证明达到定义的核心层级。<sup>[7](https://apis.io/standards/s3/)</sup> |
| 价格历史 | 存储价格从上线时的每 GB-月 15 美分降至略高于 2 美分，20 年间降幅约 85%。<sup>[2](https://aws.amazon.com/blogs/aws/twenty-years-of-amazon-s3-and-building-whats-next/?refid=launch_TWITTER)</sup> |

## 设计与核心操作

该 API 围绕三个概念对存储建模：对象、存储桶和键。数据以对象形式存储在存储桶中；每个对象对 S3 而言是不透明的，携带用户定义的键/值元数据，由存储桶与键的组合来定位。一个存储桶可以存放单个对象，也可以存放数百万个对象，对象数量没有限制。<sup>[8](https://www.techradar.com/pro/20-years-of-amazon-s3)</sup> [Amazon Web Services](https://www.edgepedia.org/zh/amazon-web-services) 副总裁兼杰出工程师 Andy Warfield 曾描述，该接口的动词以现有 HTTP 动词为指导，因此客户端可以用 PUT 存储对象、用 GET 获取对象，他认为这正是该服务易于采用的原因。<sup>[9](https://www.itpro.com/cloud/cloud-storage/after-20-years-simplicity-remains-the-singular-most-important-aspect-of-amazon-s3)</sup>

REST 接口使用标准 HTTP 头和状态码，使普通浏览器和工具包能够按预期工作；AWS 对 HTTP 的扩展——例如添加支持访问控制的头——也遵循标准 HTTP 风格。任何支持 HTTP 的工具包都可以驱动该 API，浏览器可以获取匿名可读的对象。<sup>[1](https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html)</sup>

操作面庞大且持续增长。官方参考列出了存储桶管理操作（CreateBucket、DeleteBucket、ListBuckets，以及大量用于版本控制、生命周期、复制、加密、标签和策略的配置调用）、对象操作（PutObject、GetObject、HeadObject、DeleteObject、CopyObject、标签、ACL 和法律保留）以及分段上传（CreateMultipartUpload、CompleteMultipartUpload、AbortMultipartUpload、ListMultipartUploads）。<sup>[10](https://docs.aws.amazon.com/AmazonS3/latest/API/API_Operations.html)</sup> 2006 年 6 月的一次升级——距上线仅两个月——通过 HTTP Host 头将存储桶映射到 s3.amazonaws.com 的子域，增加了虚拟主机支持；增加了使用分隔符的键层级列表；并增加了对 Content-Encoding 头的控制。<sup>[11](https://aws.amazon.com/blogs/aws/new_amazon_s3_f/)</sup>

## 认证与寻址

已认证请求必须签名以证明真实性，匿名请求则不需要签名。<sup>[6](https://aws.amazon.com.cdn.amazon.com/blogs/aws/amazon-s3-update-sigv2-deprecation-period-extended-modified/)</sup><sup> • </sup><sup>[21](https://docs.aws.amazon.com/AmazonS3/latest/developerguide/MakingRequests.html)</sup><sup> • </sup><sup>[22](https://docs.aws.amazon.com/AmazonS3/latest/developerguide/AuthUsingAcctOrUserCredentials.html)</sup> 当前使用的签名版本 4 从长期 AWS 访问密钥派生一个特定于服务、区域和日期的专用签名密钥，从而隔离服务和区域并防止密钥重用；其实现还可以缓存认证检查结果以降低延迟。AWS 延长了 SigV2 的弃用期，以便旧应用程序有时间迁移，并建议通过 CloudTrail 数据事件或 S3 服务器访问日志识别遗留的 SigV2 流量。<sup>[6](https://aws.amazon.com.cdn.amazon.com/blogs/aws/amazon-s3-update-sigv2-deprecation-period-extended-modified/)</sup>

客户端以两种风格寻址存储桶。虚拟主机风格将存储桶置于主机名中，支持基于 DNS 的路由和负载均衡，并按来源分离 Web 请求，但对于包含点号的存储桶名称无法使用 SSL，因为证书通配符只覆盖单级子域。路径风格寻址更简单，但不支持任何基于 DNS 的功能，且 AWS 正将其列入弃用路径；实践中，S3 服务实现者必须同时支持两种风格，因为许多工具只假定其中一种。<sup>[12](https://www.snia.org/blog/2025/s3-compatibility-testing-qa-expert-insights)</sup>

## 性能与一致性保证

性能按前缀扩展：每个前缀至少支持每秒 3,500 次写请求和 5,500 次读请求，前缀数量没有限制，因此应用程序通过跨前缀并行化来扩展吞吐量，而无需随机化对象名称。<sup>[5](https://aws.amazon.com/documentation-overview/s3/)</sup>

该 API 的一致性模型是其标志性的客户端可见属性之一。S3 旨在为所有应用程序提供强读写后一致性：成功写入新对象或覆盖后，任何后续读取立即返回最新版本，列表操作立即反映写入。AWS 表示这在不改变性能或可用性、不牺牲区域隔离、不增加额外成本的情况下成立。<sup>[5](https://aws.amazon.com/documentation-overview/s3/)</sup>

## 事实标准与兼容生态系统

该接口的影响远超 AWS 本身。2023 年 AWS 提交给英国竞争与市场管理局的一份文件指出，S3 API 以开源许可证公开提供，已被 Google、IBM 和 Oracle 复制；Microsoft 建议客户使用实现 S3 API 的公开第三方代码；包括 Linode Object Storage、DigitalOcean Spaces、Wasabi 和 [Vultr](https://www.edgepedia.org/zh/vultr) 在内的提供商积极营销 S3 兼容存储以吸引迁移客户。<sup>[13](https://assets.publishing.service.gov.uk/media/656dfdf59462260705c568c4/AWS_Response_to_CMA_s_Issues_Statement_dated_23_November_2023.pdf)</sup> 法国竞争管理局观察到，所有云服务提供商现在都提供兼容的对象存储服务，遵循与 S3 API 相同的语法和操作，且 AWS 提供详细的公开文档以支持兼容性工作。<sup>[3](https://www.autoritedelaconcurrence.fr/sites/default/files/attachments/2023-09/23a08_EN.pdf)</sup>

实践中的兼容性是部分的，而非二元的。SNIA 的 S3 兼容性工作报告称，各实现在功能上存在差异，若不将声明分解为具体功能集，就很难称某项服务兼容 S3，并建议客户针对具体产品测试其实际工作负载以识别关键问题。<sup>[12](https://www.snia.org/blog/2025/s3-compatibility-testing-qa-expert-insights)</sup><sup> • </sup><sup>[14](https://www.snia.org/blog/2024/complexities-object-storage-compatibility-qa)</sup> Seagate 高级总监 Gregory Touretsky 在 SNIA 的一次会议上，记录了替代实现中的真实不兼容情况，包括响应头缺失或错误、不支持的 API 调用以及意外行为。<sup>[15](https://www.snia.org/sniadeveloper/session/18582)</sup> Cloudflare 的 R2 就是这样一个实现，它发布了逐操作的兼容性矩阵，使用区域值 `auto`（空值和 `us-east-1` 均为该值的别名），并在账户特定端点提供 API；例如其校验和支持仅在 FULL_OBJECT 类型中实现 CRC64NVME，仅在 COMPOSITE 类型中实现 CRC32、CRC32C、SHA-1 和 SHA-256。<sup>[16](https://developers.cloudflare.com/r2/api/s3/api/)</sup>

衡量生态系统本身就很困难。API Commons S3 配置文件由 Amazon 自己的 botocore 服务模型生成，记录了 58 家声称兼容的提供商，但只有 12 家发布了声明 S3 操作的机器可读 OpenAPI；32 家仅依赖文字描述。在评级的 116 个操作中，8 个构成核心层级（ListBuckets、ListObjects、DeleteBucket、DeleteObject、GetObject、CreateBucket、HeadObject、PutObject），8 个为扩展层级，100 个为厂商专有；46 个记录的采用者中只有 5 个可证明达到核心层级或更好：CubeFS、Filebase、Oracle Cloud Infrastructure、Rook 和 Fastly。该配置文件无法评级实时行为，因为 S3 服务器在路由操作之前验证签名，因此未认证的调用者无法区分支持的操作和不支持的操作。<sup>[7](https://apis.io/standards/s3/)</sup><sup> • </sup><sup>[17](https://github.com/api-commons/storage)</sup> SNIA 的云对象存储测试工具技术工作组调查了开源 S3 API 测试工具，以支持多厂商互操作性测试，<sup>[18](https://www.snia.org/educational-library/open-source-multi-vendor-s3-interoperability-tools-ecosystem-and-improvements)</sup> 而 MSST-S3 套件等社区框架汇集了数百项测试来比较各实现。<sup>[19](https://github.com/linux-kdevops/msst-s3)</sup>

## 上线以来的演进

API 面在保持向后兼容的同时不断增长。上线时最大对象为 5 GB；到 2026 年上限为 50 TB，增长了 10,000 倍。<sup>[4](https://aws.amazon.com/blogs/aws/amazon_s3/)</sup><sup> • </sup><sup>[20](https://aws-news.com/article/2026-03-13-twenty-years-of-amazon-s3-and-building-whats-next)</sup> 较新的接口扩展了同一服务：S3 批量操作接受单个 S3 API 请求，在存储桶之间复制对象、替换标签集、修改访问控制或从 S3 Glacier 恢复归档对象。<sup>[5](https://aws.amazon.com/documentation-overview/s3/)</sup> 当前 API 参考还涵盖相关控制面，例如用于控制面操作的 Amazon S3 Control、S3 on Outposts、用于 [Apache Parquet](https://www.edgepedia.org/zh/apache-parquet) 格式表格数据的 S3 Tables，以及将存储桶作为由 EFS 支持的文件系统暴露的 S3 Files。<sup>[1](https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html)</sup>

AWS 本身将这种连续性视为该接口的主要成就：二十多年来，S3 API 已成为整个存储行业的参照点，2006 年为 S3 编写的代码至今仍然有效。<sup>[2](https://aws.amazon.com/blogs/aws/twenty-years-of-amazon-s3-and-building-whats-next/?refid=launch_TWITTER)</sup> 同样的连续性对实现者而言是一种成本；一家云服务提供商告诉法国竞争管理局，AWS 的单方面修改是经常性的，有时是重大的，为至少保持与 S3 API 的兼容性带来了显著的运营成本。<sup>[3](https://www.autoritedelaconcurrence.fr/sites/default/files/attachments/2023-09/23a08_EN.pdf)</sup>

## References

1. [Welcome - Amazon S3 API Reference, AWS Documentation](https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html)
2. [Twenty years of Amazon S3 and building what's next, AWS News Blog (13 March 2026)](https://aws.amazon.com/blogs/aws/twenty-years-of-amazon-s3-and-building-whats-next/?refid=launch_TWITTER)
3. [Amazon's standard "S3" service, Autorité de la concurrence (2023)](https://www.autoritedelaconcurrence.fr/sites/default/files/attachments/2023-09/23a08_EN.pdf)
4. [Amazon S3, AWS News Blog (14 March 2006)](https://aws.amazon.com/blogs/aws/amazon_s3/)
5. [Amazon S3 Documentation, AWS](https://aws.amazon.com/documentation-overview/s3/)
6. [Amazon S3 Update - SigV2 Deprecation Period Extended & Modified, AWS News Blog](https://aws.amazon.com.cdn.amazon.com/blogs/aws/amazon-s3-update-sigv2-deprecation-period-extended-modified/)
7. [The S3 Interface - a de facto API standard, APIs.io / API Commons](https://apis.io/standards/s3/)
8. [Celebrating 20 years of Amazon S3, TechRadar](https://www.techradar.com/pro/20-years-of-amazon-s3)
9. [After 20 years, simplicity remains the 'singular most important aspect' of Amazon S3, ITPro](https://www.itpro.com/cloud/cloud-storage/after-20-years-simplicity-remains-the-singular-most-important-aspect-of-amazon-s3)
10. [Actions - Amazon S3 API Reference, AWS Documentation](https://docs.aws.amazon.com/AmazonS3/latest/API/API_Operations.html)
11. [New Amazon S3 Features, AWS News Blog (14 June 2006)](https://aws.amazon.com/blogs/aws/new_amazon_s3_f/)
12. [S3 Compatibility Testing Q&A, SNIA](https://www.snia.org/blog/2025/s3-compatibility-testing-qa-expert-insights)
13. [AWS Response to CMA Issues Statement, 23 November 2023](https://assets.publishing.service.gov.uk/media/656dfdf59462260705c568c4/AWS_Response_to_CMA_s_Issues_Statement_dated_23_November_2023.pdf)
14. [Complexities of Object Storage Compatibility Q&A, SNIA](https://www.snia.org/blog/2024/complexities-object-storage-compatibility-qa)
15. [Beyond S3 Compatibility Claims: A Deep Dive into Real-World Incompatibilities, SNIA](https://www.snia.org/sniadeveloper/session/18582)
16. [S3 API compatibility, Cloudflare R2 docs](https://developers.cloudflare.com/r2/api/s3/api/)
17. [api-commons/storage repository, GitHub](https://github.com/api-commons/storage)
18. [Open-Source Multi-Vendor S3 Interoperability Tools, SNIA white paper](https://www.snia.org/educational-library/open-source-multi-vendor-s3-interoperability-tools-ecosystem-and-improvements)
19. [MSST-S3: Multi-vendor S3 Storage Test Suite, GitHub](https://github.com/linux-kdevops/msst-s3)
20. [Twenty years of Amazon S3 and building what's next, The AWS News Feed](https://aws-news.com/article/2026-03-13-twenty-years-of-amazon-s3-and-building-whats-next)
21. [Making requests - Amazon Simple Storage Service](https://docs.aws.amazon.com/AmazonS3/latest/developerguide/MakingRequests.html)
22. [Making requests using AWS account or IAM user credentials - Amazon Simple Storage Service](https://docs.aws.amazon.com/AmazonS3/latest/developerguide/AuthUsingAcctOrUserCredentials.html)

---
*Initially written Oct 26, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Databases and data systems

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/amazon-s3-api

English original: https://www.edgepedia.org/amazon-s3-api
