API Reference

Boto3

AWS SDK for Python to create and manage services like S3, DynamoDB and SQS with paginators and waiters.

Official Documentation ↗
CompatibilityThis documentation covers version boto3 1.34+ / Python 3.8+. Check the official docs for the latest API surface.

Installation

pippip install boto3

Methods

Overview

Boto3 is the official AWS SDK for Python. Clients provide one-to-one API access, resources add higher-level abstractions, and paginators and waiters simplify listing and polling.

Core Methods

Create clients or resources, call operations, and use paginators for list APIs and waiters for state transitions. Session and Config objects control credentials, region and retries.

Usage Notes

Prefer IAM roles over long-lived keys, use paginators for any list call, and configure retries and timeouts. Use S3 transfer utilities for efficient large uploads.

Common Pitfalls

Hardcoded keys leak secrets. Iterating only the first page silently truncates results. Resource abstractions can lag behind new API features, so clients are needed for the latest operations.

FAQ

How are credentials resolved?
Boto3 follows a chain: explicit arguments, environment variables, shared credentials files, container and instance roles. Never hardcode keys; prefer roles in deployed environments.
When should I use resource versus client?
Resources offer object-oriented helpers and automatic pagination for convenience, while clients expose the full low-level API and all new features. Use clients when a feature or control is not yet wrapped.
How do I reduce request cost or throttling?
Batch operations, use paginators instead of repeated calls, and implement retries with backoff. Boto3 has configurable retry modes for throttling and transient errors.