

文档 AWS SDK 示例 GitHub 存储库中还有更多 [S AWS DK 示例](https://github.com/awsdocs/aws-doc-sdk-examples)。

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 使用 Amazon EC2 的场景 AWS SDKs
<a name="ec2_code_examples_scenarios"></a>

以下代码示例向您展示了如何使用 AWS 软件开发工具包在 Amazon EC2 中实现常见场景。这些场景演示了如何通过调用 Amazon EC2 中的多个函数或与其他 AWS 服务结合来完成特定任务。每个场景都包含完整源代码的链接，您可以在其中找到有关如何设置和运行代码的说明。

场景以中等水平的经验为目标，可帮助您结合具体环境了解服务操作。

**Topics**
+ [构建和管理弹性服务](ec2_example_cross_ResilientService_section.md)
+ [配置 Amazon ECS Service Connect](ec2_example_ecs_ServiceConnect_085_section.md)
+ [创建基本 VPC](ec2_example_vpc_GettingStartedCLI_section.md)
+ [创建 Fargate 启动类型的 Amazon ECS Linux 任务](ec2_example_ecs_GettingStarted_086_section.md)
+ [创建 EC2 启动类型的 Amazon ECS 服务](ec2_example_ecs_GettingStarted_018_section.md)
+ [创建 Amazon RDS 数据库实例](ec2_example_rds_GettingStarted_036_section.md)
+ [创建和管理 Amazon EBS 卷](ec2_example_ec2_GettingStarted_020_section.md)
+ [创建和管理VPC莱迪思服务网络](ec2_example_vpc_lattice_GettingStarted_055_section.md)
+ [开始使用 Aws Direct Connect](ec2_example_directconnect_GettingStarted_051_section.md)
+ [开始使用 Marketplace 买家](ec2_example_ec2_GettingStarted_030_section.md)
+ [开始使用亚马逊 DocumentDB](ec2_example_docdb_GettingStarted_025_section.md)
+ [Amazon EC2 入门](ec2_example_ec2_GettingStarted_013_section.md)
+ [亚马逊 EMR 入门](ec2_example_emr_GettingStarted_037_section.md)
+ [开始使用亚马逊 ElastiCache](ec2_example_ec2_GettingStarted_065_section.md)
+ [Amazon MSK 入门](ec2_example_ec2_GettingStarted_057_section.md)
+ [Amazon Neptune 入门](ec2_example_ec2_GettingStarted_064_section.md)
+ [亚马逊 VPC Transit Gateway 入门](ec2_example_vpc_TransitGatewayGettingStarted_section.md)
+ [Elastic Load Balancing 入门](ec2_example_elastic_load_balancing_v2_GettingStarted_058_section.md)
+ [Elemental 入门 MediaConnect](ec2_example_mediaconnect_GettingStarted_081_section.md)
+ [使用 FIS 在 EC2 实例上运行 CPU 压力测试](ec2_example_iam_GettingStarted_069_section.md)
+ [带有 IPAM 的 VPC](ec2_example_vpc_GettingStartedIpam_section.md)
+ [带有私有服务器的 VPC](ec2_example_vpc_GettingStartedPrivate_section.md)
+ [使用 Amazon EBS 加密、快照和卷初始化](ec2_example_ec2_GettingStarted_022_section.md)
+ [使用 VPC 对等连接](ec2_example_ec2_GettingStarted_015_section.md)