

# 适用于使用 Amazon SDK 的 Lambda 的代码示例
<a name="service_code_examples"></a>

以下代码示例显示如何将 Lambda 与 Amazon 软件开发工具包（SDK）一起使用。

*基本功能*是向您展示如何在服务中执行基本操作的代码示例。

*操作*是大型程序的代码摘录，必须在上下文中运行。您可以通过操作了解如何调用单个服务函数，还可以通过函数相关场景的上下文查看操作。

*场景*是向您展示如何通过在一个服务中调用多个函数或与其他 Amazon Web Services 服务 服务结合来完成特定任务的代码示例。

*Amazon 社区贡献*就是由整个 Amazon 的多个团队创建和维护的示例。要提供反馈，请使用链接存储库中提供的机制。

有关 Amazon SDK 开发人员指南和代码示例的完整列表，请参阅 [将 Lambda 与 Amazon SDK 配合使用](sdk-general-information-section.md) 本主题还包括有关入门的信息以及有关先前的 SDK 版本的详细信息。

**Contents**
+ [基本功能](service_code_examples_basics.md)
  + [开始使用 Lambda](example_lambda_Hello_section.md)
  + [了解基本功能](example_lambda_Scenario_GettingStartedFunctions_section.md)
  + [操作](service_code_examples_actions.md)
    + [`CreateAlias`](example_lambda_CreateAlias_section.md)
    + [`CreateFunction`](example_lambda_CreateFunction_section.md)
    + [`DeleteAlias`](example_lambda_DeleteAlias_section.md)
    + [`DeleteFunction`](example_lambda_DeleteFunction_section.md)
    + [`DeleteFunctionConcurrency`](example_lambda_DeleteFunctionConcurrency_section.md)
    + [`DeleteProvisionedConcurrencyConfig`](example_lambda_DeleteProvisionedConcurrencyConfig_section.md)
    + [`GetAccountSettings`](example_lambda_GetAccountSettings_section.md)
    + [`GetAlias`](example_lambda_GetAlias_section.md)
    + [`GetFunction`](example_lambda_GetFunction_section.md)
    + [`GetFunctionConcurrency`](example_lambda_GetFunctionConcurrency_section.md)
    + [`GetFunctionConfiguration`](example_lambda_GetFunctionConfiguration_section.md)
    + [`GetPolicy`](example_lambda_GetPolicy_section.md)
    + [`GetProvisionedConcurrencyConfig`](example_lambda_GetProvisionedConcurrencyConfig_section.md)
    + [`Invoke`](example_lambda_Invoke_section.md)
    + [`ListFunctions`](example_lambda_ListFunctions_section.md)
    + [`ListProvisionedConcurrencyConfigs`](example_lambda_ListProvisionedConcurrencyConfigs_section.md)
    + [`ListTags`](example_lambda_ListTags_section.md)
    + [`ListVersionsByFunction`](example_lambda_ListVersionsByFunction_section.md)
    + [`PublishVersion`](example_lambda_PublishVersion_section.md)
    + [`PutFunctionConcurrency`](example_lambda_PutFunctionConcurrency_section.md)
    + [`PutProvisionedConcurrencyConfig`](example_lambda_PutProvisionedConcurrencyConfig_section.md)
    + [`RemovePermission`](example_lambda_RemovePermission_section.md)
    + [`TagResource`](example_lambda_TagResource_section.md)
    + [`UntagResource`](example_lambda_UntagResource_section.md)
    + [`UpdateAlias`](example_lambda_UpdateAlias_section.md)
    + [`UpdateFunctionCode`](example_lambda_UpdateFunctionCode_section.md)
    + [`UpdateFunctionConfiguration`](example_lambda_UpdateFunctionConfiguration_section.md)
+ [场景](service_code_examples_scenarios.md)
  + [使用 Lambda 函数自动确认已知用户](example_cross_CognitoAutoConfirmUser_section.md)
  + [使用 Lambda 函数自动迁移已知用户](example_cross_CognitoAutoMigrateUser_section.md)
  + [创建 REST API 以跟踪 COVID-19 数据](example_cross_ApiGatewayDataTracker_section.md)
  + [创建借阅图书馆 REST API](example_cross_AuroraRestLendingLibrary_section.md)
  + [创建 Messenger 应用程序](example_cross_StepFunctionsMessenger_section.md)
  + [创建无服务器应用程序来管理照片](example_cross_PAM_section.md)
  + [创建 Websocket 聊天应用程序](example_cross_ApiGatewayWebsocketChat_section.md)
  + [创建用于分析客户反馈的应用程序](example_cross_FSA_section.md)
  + [从浏览器调用 Lambda 函数](example_cross_LambdaForBrowser_section.md)
  + [使用 S3 对象 Lambda 转换数据](example_cross_ServerlessS3DataTransformation_section.md)
  + [使用 API Gateway 调用 Lambda 函数](example_cross_LambdaAPIGateway_section.md)
  + [使用 Step Functions 调用 Lambda 函数](example_cross_ServerlessWorkflows_section.md)
  + [使用计划的事件调用 Lambda 函数](example_cross_LambdaScheduledEvents_section.md)
  + [使用 Neptune API 查询图形数据](example_cross_Neptune_Query_section.md)
  + [在完成 Amazon Cognito 用户身份验证后使用 Lambda 函数写入自定义活动数据](example_cross_CognitoCustomActivityLog_section.md)
+ [无服务器示例](service_code_examples_serverless_examples.md)
  + [使用 Lambda 函数连接到 Amazon RDS 数据库](example_serverless_connect_RDS_Lambda_section.md)
  + [通过 Kinesis 触发器调用 Lambda 函数](example_serverless_Kinesis_Lambda_section.md)
  + [通过 DynamoDB 触发器调用 Lambda 函数](example_serverless_DynamoDB_Lambda_section.md)
  + [通过 Amazon DocumentDB 触发器调用 Lambda 函数](example_serverless_DocumentDB_Lambda_section.md)
  + [通过 Amazon MSK 触发器调用 Lambda 函数](example_serverless_MSK_Lambda_section.md)
  + [通过 Amazon S3 触发器调用 Lambda 函数](example_serverless_S3_Lambda_section.md)
  + [通过 Amazon SNS 触发器调用 Lambda 函数](example_serverless_SNS_Lambda_section.md)
  + [通过 Amazon SQS 触发器调用 Lambda 函数](example_serverless_SQS_Lambda_section.md)
  + [通过 Kinesis 触发器报告 Lambda 函数批处理项目失败](example_serverless_Kinesis_Lambda_batch_item_failures_section.md)
  + [通过 DynamoDB 触发器报告 Lambda 函数批处理项目失败](example_serverless_DynamoDB_Lambda_batch_item_failures_section.md)
  + [报告使用 Amazon SQS 触发器进行 Lambda 函数批处理项目失败](example_serverless_SQS_Lambda_batch_item_failures_section.md)
+ [Amazon 社区贡献](service_code_examples_aws_community_contributions.md)
  + [构建和测试无服务器应用程序](example_tributary-lite_serverless-application_section.md)