Files
nexus/wiki/concepts/Boto3.md
2026-04-18 20:02:44 +08:00

40 lines
905 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
id: boto3
title: "Boto3"
type: concept
tags:
- AWS
- Python
- SDK
last_updated: 2026-04-18
---
## Summary
AWS SDK for Python用于通过 Python 代码与 AWS 服务交互。
## Definition
Boto3 是 Amazon 官方提供的 Python SDK允许开发者通过 Python 代码调用 AWS API管理 AWS 资源和服务。
## Key Attributes
- **类型**AWS SDK
- **语言**Python
- **安装方式**pip install boto3
- **认证方式**IAM 凭证、环境变量、AWS CLI 配置
## Core Concepts
### Clients vs Resources
- **Clients**:底层服务 API提供精确控制
- **Resources**:高层次、面向对象的抽象
### Waiters
自动轮询服务响应直到特定状态
### Paginators
自动处理分页结果
## Common Use Cases
- 扫描 EC2 实例、安全组、负载均衡器
- 创建、修改、删除 S3 存储桶
- 触发 Lambda 函数
- 查询 CloudWatch 指标