aws-sdk-python-usage

Write Python code using boto3 and botocore for AWS service operations.

Updated Sep 8, 2026
One-click install
npx skills add https://github.com/dennisvink/yolomancer --skill aws-sdk-python-usage-dennisvink
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aws-sdk-python-usage
Source: https://github.com/dennisvink/yolomancer/tree/main/skills/aws/core-skills/aws-sdk-python-usage
Command: npx skills add https://github.com/dennisvink/yolomancer --skill aws-sdk-python-usage-dennisvink

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires boto3, botocore, and includes references (resource) components.

What problem does it solve? Writing correct boto3/botocore code requires knowing dozens of SDK-specific patterns: client vs resource interfaces, credential chains, pagination, waiters, error handling, and service-specific quirks. This Skill provides those patterns so generated AWS Python code follows SDK best practices instead of common anti-patterns. ## Core Features & Use Cases - Client and Resource Patterns: Guidance on choosing between low-level clients and high-level resources, session management, and credential resolution including assume-role and profiles. - Operational Patterns: Correct usage of paginators with JMESPath filtering, waiters for resource state polling, and botocore Config for retries, timeouts, and connection pooling. - Service-Specific References: In-depth references for S3 transfers and presigned URLs, DynamoDB type marshalling and condition expressions, and structured error handling with typed exceptions. - Use Case: When asked to write a script that uploads files to S3 with progress callbacks and retries, the Skill ensures the code uses upload_file with TransferConfig, typed exception handling, and a clean main() structure. ## Quick Start Write a Python script using boto3 that lists all S3 objects under a prefix and downloads them with error handling.

Frequently Asked Questions about aws-sdk-python-usage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle pagination in boto3?

Use client.get_paginator() instead of manually looping with NextToken. Call paginate() to iterate pages, or use .search() with a JMESPath expression to extract and flatten specific fields across all pages.

What is the difference between boto3 client and resource?

Clients map directly to AWS APIs and return plain dicts, covering every service. Resources provide an object-oriented interface for select services like S3 and DynamoDB, with automatic type marshalling that is especially useful for DynamoDB.

How do I catch AWS errors in boto3?

Catch typed exceptions via client.exceptions, such as s3.exceptions.NoSuchKey, rather than matching error code strings. Import the generic ClientError from botocore.exceptions, not boto3, and only catch exceptions when you have an actionable response.

Why does DynamoDB return AttributeValue dicts in boto3?

The low-level client returns raw types like {"N": "42"}. Use boto3.resource("dynamodb") or resource.meta.client to auto-marshal values into native Python types like strings, Decimals, and sets.

How do I generate a presigned URL for S3 in Python?

Call s3.generate_presigned_url() with the operation name such as get_object or put_object, a Params dict with Bucket and Key, and ExpiresIn in seconds. For browser form uploads, use generate_presigned_post with conditions.

How do I configure retries and timeouts in boto3?

Pass a botocore.config.Config object to the client with retries settings (total_max_attempts and mode like standard or adaptive), connect_timeout, read_timeout, and max_pool_connections. Merge multiple configs with Config.merge().