项目 / awsdocs/aws-doc-sdk-examples

awsdocs/aws-doc-sdk-examples

行业推荐
语言 Java标签 awsdocumentationexamplesjavacppdotnetjavascriptgophppythonrubyprogramming数据更新 2026-11-22 06:48:52 · 仓库 2026-11-21

一段话介绍

用来演示如何通过各语言 AWS SDK 调用 AWS 服务的代码示例库,其中不少示例会被写入 AWS 官方文档。需要先有 AWS 账号,再进入对应语言目录,按该目录中的说明运行示例。

本站整理,非 GitHub 官方 description。

官方 description(GitHub API 原样)
Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.md file below.
10,470累计星
5,836Fork
—峰值日增
0上榜次数
总榜
暂未入榜
日榜
暂未入榜
周榜
暂未入榜
月榜
暂未入榜

官方快照(gh_history.db,2026-11-25):总榜 未进 Top50 · 日榜 未进 Top50 · 周榜未满 7 天基线(官方不生成) · 月榜暂无官方口径;下方四卡为站内趋势聚合(周卡按上榜次数,非官方 7 日增量窗)。

行业与场景

按行业选型 →

智能题库与自动阅卷

适配系统:考试系统、题库系统 · 得分 1.3

提供组卷、作答与自动评分链路,可嵌入考试系统降低教师批改成本。

更多信息

以下三段按该项目自己的 GitHub README 章节摘录(可合理截断并标明);README 没有对应章节的留空,不编造。

我的用法
进入各语言 SDK 子目录,按目录内 SDK 特定说明调用示例;运行前需 AWS 账户,并用 AWS CLI 配置 AWS credentials。
特点或设计要点
示例按 SDK 语言分子目录,覆盖 .NET、C++、Go、Java、JavaScript、Kotlin、PHP、Python、Ruby、Rust、Swift 等,并区分不同主版本。各目录内有该 SDK 的阅读和调用说明;`applications`、`test`、`resources` 等目录分别存放跨服务应用组件、测试框架和共享资源。源文提醒:这些示例会调用可能产生费用的服务,也可能创建或删除资源,运行前需了解影响并备份重要数据。
局限和适用边界
这些AWS SDK示例代码可能与会产生费用的AWS服务交互,并可能修改或删除现有AWS资源,因此需确认资源影响、费用并备份重要数据。
星标走势还差一天的数据,明天就能看到曲线
每天 10:30 记一次星标,连续两天后自动生成曲线
首次发现 — · 最近在榜 2026-10-27 · 语言 Java · 贡献者 —
sdk

GitHub 项目主页介绍

来自 GitHub 仓库 README / 主页介绍正文,原样摘录,共 7,704 字节。

[![Build Status](https://github.com/aws/aws-sdk-ruby/workflows/CI/badge.svg)](https://github.com/awsdocs/aws-doc-sdk-examples/actions)
[![GitHub Super-Linter](https://github.com/awsdocs/aws-doc-sdk-examples/actions/workflows/super-linter.yml/badge.svg)](https://github.com/marketplace/actions/super-linter)
![[]](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue)

# AWS SDK Code Examples

This repository contains code examples that demonstrate how to use the [AWS SDKs](https://aws.amazon.com/developer/tools/) to interact with [AWS services](https://aws.amazon.com/products).

Many examples are injected into the [AWS Documentation](https://docs.aws.amazon.com).

## How this repository is organized

Code examples for each language's SDK can be found within the following subdirectories. The examples here demonstrate the most common uses of the SDK for each language.

|     SDK    |       folder      | SDK version |
|:----------:|:-----------------:|:-----------:|
| .NET       | [dotnetv3/](dotnetv3)         | 3.5+        |
| .NET       | [dotnet/](.dotnet)           | <3.5        |
| C++        | [cpp/](cpp)              | 1           |
| Go         | [gov2/](gov2)            | 2           |
| Go         | [go/](go)               | 1           |
| Java       | [javav2/](javav2)           | 2           |
| Java       | [java/](java)             | 1           |
| JavaScript | [javascriptv3/](javascriptv3)     | 3           |
| JavaScript | [javascript/](javascriptv)       | 2           |
| Kotlin     | [kotlin/](kotlin)           | 1             |
| PHP        | [php/](php)              | 3           |
| Python     | [pythonv4/](pythonv4)           | 4           |
| Python     | [python/](python)           | 3           |
| Ruby       | [ruby/](ruby)             | 3           |
| Rust       | [rustv1/](rustv1) | 1             |
| Swift      | [swift/](swift)            | preview           |

Within each directory, you will find SDK-specific instructions for understanding and invoking example code.

### NOTE
In alignment with our SDKs and Tools Maintenance Policy, the AWS SDK for Java v1.x will enter maintenance mode on July 31, 2024, and reach end-of-support on December 31, 2025.

For more information, see [Announcing end-of-support for AWS SDK for Java v1.x](https://aws.amazon.com/blogs/developer/announcing-end-of-support-for-aws-sdk-for-java-v1-x-on-december-31-2025/).


### Additional directories

| directory                     | purpose                                                                                                                                                     | usage                                                                                                                                                                                  |
|-------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [/applications](applications) | Contains the non-language-specific components of example applications, which show how the SDKs can be used in the context of a production-like application. | To view the language-specific components for each example application, see the `cross-service` folder in the sub-directory for your desired language (such as `python/cross-service`). |
| [/test](test)                 | Contains all components supporting the custom test automation framework used to routinely test the code in this repository.                                 | Deploys to AWS as a polyglot container-based integration testing solution. WARNING: Still under active construction as of 2023.                                                        |
| [/resources](resources)       | Contains shared components used by many code examples across this repository.                                                                               | Deploys as frontend ([/clients](/resources/clients)) or backend ([/cdk](/resources/cdk) or [/cfn](/resources/cfn)) components.                                                         


## Invoke example code

To invoke this example code, you must have an AWS account. For more information about creating an account, see [AWS Free Tier](https://aws.amazon.com/free/).

You must also have AWS credentials configured. For steps on using the AWS Command Line Interface (AWS CLI) to configure credentials, see [CLI Configuration basics](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html)

## ⚠️ Usage disclaimer

These code examples interact with services that may incur charges to your AWS account. For more information, see [AWS Pricing](https://aws.amazon.com/pricing/).

Additionally, example code might theoretically modify or delete existing AWS resources. As a matter of due diligence, do the following:

- Be aware of the resources that these examples create or delete.
- Be aware of the costs that might be charged to your account as a result.
- Back up your important data.

# Contributing

This repository thrives on your contributions! ❤️ To get involved, see the [CONTRIBUTING.md](CONTRIBUTING.md). 🙏

# Requests

Requests for examples can be made via [Issue tracker](https://github.com/awsdocs/aws-doc-sdk-examples/issues/new?assignees=octocat&labels=type%2Fenhancement&projects=&template=enhancement.yaml&title=%5BEnhancement%5D%3A+%3CDESCRIPTIVE+TITLE+HERE%3E).

## How we prioritize contributions and requests
Our team reviews all requests, evaluating them for the following:
- Clarity
- Relevance
- Feasibility

**All examples requests should be made as early as possible. For larger examples, this should be at least two months in advance of the required date.**

Based on the evaluation, we determine the priority of each request and allocate resources accordingly. We prioritize requests that are clear, relevant, and can be completed in a reasonable amount of time. An accompanying high quality PR increases the chance we can address the request.

Please note that some requests, such as bug fixes and security issues, take priority over new code examples. Additionally, we have finite resources and our own priorities that guide the development of code examples. If you have any questions or would like to contribute, please refer to our [contribution guide](https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/CONTRIBUTING.md).


## Tributaries

The AWS Documentation includes source code examples from several additional sources. These sources are called tributaries, flowing into the "river" of AWS Documentation.

* [awsdocs/aws-doc-sdk-examples](https://github.com/awsdocs/aws-doc-sdk-examples)
* [aws-samples/serverless-snippets](https://github.com/aws-samples/serverless-snippets)
* [aws/aws-tools-for-powershell](https://github.com/aws/aws-tools-for-powershell)

# Copyright and license

All content in this repository, unless otherwise stated, is
Copyright © Amazon Web Services, Inc. or its affiliates. All rights reserved.

Except where otherwise noted, all examples in this collection are licensed under the [Apache
license, version 2.0](https://www.apache.org/licenses/LICENSE-2.0) (the "License"). The full
license text is provided in the `LICENSE` file accompanying this repository.

Please include the following licensing text as a comment at top of all possible files:

*Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0*
↑