aws-doc-sdk-examples README

The project's README from github.com/awsdocs/aws-doc-sdk-examples. As one markdown file: README.md.

Build Status GitHub Super-Linter []

AWS SDK Code Examples

This repository contains code examples that demonstrate how to use the AWS SDKs to interact with AWS services.

Many examples are injected into the AWS Documentation.

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/ 3.5+
.NET dotnet/ <3.5
C++ cpp/ 1
Go gov2/ 2
Go go/ 1
Java javav2/ 2
Java java/ 1
JavaScript javascriptv3/ 3
JavaScript javascript/ 2
Kotlin kotlin/ 1
PHP php/ 3
Python pythonv1/ 1
Python python/ 3
Ruby ruby/ 3
Rust rustv1/ 1
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.

Additional directories

directory purpose usage
/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 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 Contains shared components used by many code examples across this repository. Deploys as frontend (/clients) or backend (/cdk or /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.

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

⚠️ Usage disclaimer

These code examples interact with services that may incur charges to your AWS account. For more information, see AWS Pricing.

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

Contributing

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

Requests

Requests for examples can be made via Issue tracker.

How we prioritize contributions and requests

Our team reviews all requests, evaluating them for the following:

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.

Tributaries

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

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 (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

aws-doc-sdk-examples (awsdocs/aws-doc-sdk-examples)

Searching Database…

Что это такое?Официальный репозиторий AWS с примерами кода, показывающими, как работать с сервисами AWS через AWS SDK. Многие из этих примеров вставлены прямо в документацию AWS и руководства разработчика по SDK.
Это одна большая свалка сниппетов или всё как-то организовано?Всё организовано по языковым SDK в виде подкаталогов, а таблица в README сопоставляет каждую папку с версией SDK: python/ — примеры для SDK 3, javav2/ — Java SDK 2, плюс javascriptv3/, dotnetv3/, gov2/, ruby/ и другие.
Как запустить один из этих примеров?Откройте папку для своего языка, например python/ или javascriptv3/, и следуйте инструкциям в ней по запуску примера с учётом особенностей конкретного SDK.
Чтобы запустить примеры, нужен аккаунт AWS?Да — нужен аккаунт AWS (для начала подойдёт бесплатный тариф Free Tier) и настроенные учётные данные; в README сказано настроить их через AWS CLI.
Запуск примеров будет стоить денег или может затронуть мои существующие ресурсы?И то, и другое возможно: код обращается к реальным сервисам AWS, за которые может начисляться плата, и примеры теоретически могут изменить или удалить существующие ресурсы. README советует понимать, что создаёт и удаляет каждый пример, и делать резервные копии важных данных.
Для кого это — для тех, кто учит AWS, или для разработчиков, которым нужен быстрый справочник?Для тех и других: каждый пример показывает самые типичные способы использования SDK для своего языка, так что репозиторий годится и как учебный материал, и как справочник с кодом, который можно копировать.
Можно ли скопировать этот код в свой проект?Да, по лицензии Apache License 2.0, если вы сохраните комментарий об авторских правах с SPDX-License-Identifier в начале каждого используемого файла.
Какие языки программирования охватывает репозиторий?Для .NET, C++, Go, Java, JavaScript, Kotlin, PHP, Python, Ruby, Rust и Swift есть отдельные папки, а таблица в README показывает, на какую версию SDK нацелена каждая папка.
Здесь есть полноценные примеры приложений или только маленькие сниппеты?Есть и то, и другое: папка /applications содержит примеры приложений, близкие к продакшену, а их части для конкретных языков лежат в папках cross-service каждого языка, например python/cross-service.
Всё ли здесь ещё актуально?Осторожно с устаревшими папками: у старых версий SDK есть свои каталоги (dotnet/, go/, javascript/, pythonv1/), а поддержка примеров для Java v1 закончилась 31 декабря 2025 года. Предпочтение отдавайте папкам v2/v3.
Примеры кода вообще тестируются?Да — собственный фреймворк автоматического тестирования в /test регулярно прогоняет примеры, разворачивая их на AWS как полиглотную интеграционную систему на базе контейнеров, хотя в README отмечается, что в 2023 году он ещё был в активной разработке.
Creator
awsdocs
Size
266 MB
Stars
10.5K
Updated
CommitOct 15
Age
10y
Commits · 90 Days