New advertisers: 50% off your first month with code FIRSTMONTHSee slots
aws avatar

Aws Sdk Python Usage

Python SDK patterns for boto3 and botocore covering clients, resources, error handling, pagination, and waiters.

skills.sh installs
8.6K
GitHub stars
3.5K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers client versus resource selection, session and client creation, API call patterns, and parameter casing rules
  • Includes typed exception handling, a main() script structure, paginators with JMESPath .search(), and waiters
  • Enforces reuse of client instances, letting exceptions propagate, and no sys.exit() inside business logic
  • Designed for Python developers writing code that imports boto3 or botocore to call AWS services

Install

$ npx -y skills add aws/agent-toolkit-for-aws --skill aws-sdk-python-usage -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Do not use emojis in any code, comments, or output when this skill is active.

AWS SDK for Python (boto3)

boto3 is the high-level Python SDK for AWS. It wraps botocore (the low-level SDK) and provides two distinct interfaces: clients (low-level, 1:1 API mapping) and resources (high-level, object-oriented). Understanding which to use and when is essential.

Client vs Resource

Clients map directly to AWS service APIs. Every service has a client. Responses are plain dicts.

Resources provide an object-oriented interface with attributes and actions. Only some services have resources (S3, DynamoDB, EC2, IAM, SQS, SNS, CloudFormation, CloudWatch, Glacier). Resources auto-marshal types (especially useful for DynamoDB).

import boto3

# Client - low-level, all services
s3_client = boto3.client("s3")
response = s3_client.list_buckets()
buckets = response["Buckets"]  # plain dicts

# Resource - high-level, select services
s3_resource = boto3.resource("s3")
for bucket in s3_resource.buckets.all():
    print(bucket.name)  # attribute access, not dict keys

Details

Repository
github.com/aws/agent-toolkit-for-aws
Categories
Python, DevOps & Cloud
First seen
May 16, 2026

More from aws/agent-toolkit-for-aws

All 54

Similar to Aws Sdk Python Usage

More Python