aws-sdk-python-usage
Skill2.8k starsChanged 6 months agoApache-2.0View on GitHub
AWS SDK for Python (boto3/botocore) development patterns. You MUST use this skill when writing Python code that uses AWS services via boto3 or botocore. This includes creating service clients or resources, configuring sessions and credentials, handling errors with ClientError, using paginators and waiters, S3 file transfers and presigned URLs, DynamoDB table operations, and any boto3/botocore client configuration. Use this skill whenever Python code imports boto3 or botocore, or when the user asks about AWS operations in Python.
1 other project uses a version of this, 1 of them edited.
Trending
Less talk lately.about the whole repository
Most recently taken up by
- delorenj/skillsedited, first seen Oct 2, 2026
Who's talking about aws/agent-toolkit-for-aws
- A Hacker News story“Agent Toolkit for AWS”Hacker News · Jun 8, 2026 · 5 points
- @yug1224.com“AIエージェントがAWS環境の構築や運用を効率よく行うための公式ツールキットらしい ClaudeやCursorなどのエージェントに導入して開発を自動化するのが楽しみ yug1224 starred …”Bluesky · Jun 27, 2026 · 2 likes
- @librecanada.bsky.social“GitHub - Webpage "GitHub - aws/agent-toolkit-for-aws: Official, AWS-supported MCP servers, skills, and …”Bluesky · May 10, 2026 · 2 likes
- @yug1224.com“AIエージェントにAWSの操作や開発をサポートさせるためのツールキットらしい 実務でAIを活用してインフラ構築を効率化するのに使えそう yug1224 starred aws/agent-toolkit-for-aws…”Bluesky · Jun 27, 2026 · 1 likes
- sudosubin/agents.nix“agent-skills.github.aws.agent-toolkit-for-aws: 0-unstable-2026-10-03 → 0-unstable-2026-10-05”GitHub · Oct 5, 2026
The biggest 5 of 44 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 44
Talked about on GitHub, Bluesky and Hacker News (44 times).
On GitHub · 39
- Oct 5, 2026agent-skills.github.aws.agent-toolkit-for-aws: 0-unstable-2026-10-03 → 0-unstable-2026-10-05 — sudosubin/agents.nix0 reactions
- Oct 4, 2026codex-plugins.github.aws.agent-toolkit-for-aws: init at 0-unstable-2026-10-03 — sudosubin/agents.nix0 reactions
- Oct 4, 2026codex-marketplaces.github.aws.agent-toolkit-for-aws: init at 0-unstable-2026-10-03 — sudosubin/agents.nix0 reactions
- Oct 4, 2026claude-code-plugins.github.aws.agent-toolkit-for-aws: init at 0-unstable-2026-10-03 — sudosubin/agents.nix0 reactions
- Oct 4, 2026agent-plugins.github.aws.agent-toolkit-for-aws: init at 0-unstable-2026-10-03 — sudosubin/agents.nix0 reactions
34 more on GitHub
- Oct 3, 2026agent-skills.github.aws.agent-toolkit-for-aws: init at 0-unstable-2026-10-03 — sudosubin/agents.nix0 reactions
- Oct 3, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Oct 1, 2026docs(aws): update EFS performance guidance — mouadja02/skills0 reactions
- Sep 30, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 28, 2026aws-skills: upstream update — robomotionio/robomotion-skills0 reactions
- Sep 24, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 23, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 23, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 19, 2026Agent toolkit for AWS — freeflow-community/skill-explorer0 reactions · 1 comment
- Sep 19, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 19, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 8, 2026aws-core: marketplace pins agent-toolkit-for-aws to a pre-fix commit — asm-exec resolves no secrets (fixed upstream, PR #296) — anthropics/claude-plugins-official0 reactions
- Sep 8, 2026feat(telemetry): hook-driven migration telemetry emitter with on-disk attribution — awslabs/startups0 reactions · 1 comment
- Sep 3, 2026(aws-api-mcp-server): MIGRATION.md lists aws___call_aws as a live tool, AWS removed it on 2026-08-31 — awslabs/mcp0 reactions
- Aug 25, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 21, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 18, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 14, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 11, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 7, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 7, 2026Skills 需补充 references 参考文档(对标 AWS agent-toolkit) — huaweicloud-mate/huaweicloud-devkit0 reactions
- Aug 4, 2026fix: discover skills nested under two categories — vercel-labs/skills0 reactions
- Aug 4, 2026Expand development environment sections — aws/aws-durable-execution-docs0 reactions · 1 comment
- Aug 4, 2026Schedule Batch: Media Host port (JPG convert, S3 upload/delete) with fake + live adapter — SandroBlunt/OrganicGrowthLegacy0 reactions
- Aug 3, 2026add agent skill for using this package — correspondMerchant/LAGO-R-Package0 reactions
- Jul 31, 2026[docs]: Remove Duplicated Kiro Power Content — aws/aws-durable-execution-docs0 reactions
- Jul 25, 2026Install and configure APM tool — scalasm/strands-agents0 reactions
- Jul 7, 2026feat: add Claude Platform on AWS migration skill (.claude/skills/) — aws-samples/anthropic-on-aws0 reactions · 5 comments
- Jul 6, 2026Add weekly AWS resources - 2026-07-06 — sebastianmarines/awesome-aws0 reactions
- Jun 26, 2026agent-toolkit-for-aws: AWS 환경을 위한 MCP 서버 및 도구 모음 — roomedia/ax-trend0 reactions
- Jun 26, 2026Add aws/agent-toolkit-for-aws to Awesome Open Source AI — alvinreal/awesome-opensource-ai0 reactions
- Jun 23, 2026Sandbox backend: AWS Lambda microVMs (Firecracker) — sseshachala/conductai0 reactions
- Jun 17, 2026Agent skills — ryandam9/Explorer0 reactions
- May 14, 2026[Bug]: Cannot install skill using the `npx skills add` command — vercel-labs/skills0 reactions
On Bluesky · 4
- Jun 27, 2026AIエージェントがAWS環境の構築や運用を効率よく行うための公式ツールキットらしい ClaudeやCursorなどのエージェントに導入して開発を自動化するのが楽しみ yug1224 starred aws/agent-toolkit-for-aws… — @yug1224.com2 likes and reposts · 1 reply
- May 10, 2026GitHub - Webpage "GitHub - aws/agent-toolkit-for-aws: Official, AWS-supported MCP servers, skills, and plugins to help AI agents build on… — @librecanada.bsky.social2 likes and reposts
- Jun 27, 2026AIエージェントにAWSの操作や開発をサポートさせるためのツールキットらしい 実務でAIを活用してインフラ構築を効率化するのに使えそう yug1224 starred aws/agent-toolkit-for-aws… — @yug1224.com1 likes and repost
- May 8, 2026aws/agent-toolkit-for-aws: Official, AWS-supported MCP servers, skills, and plugins to help AI agents build on AWS #devopsish — @chrisshort.net0 likes and reposts · 1 reply
On Hacker News · 1
- Jun 8, 2026Agent Toolkit for AWS5 points
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- delorenj/skills★ 1599% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository185 other files it gives its agents.
- analyzing-release-readinessSkill
- chatting-with-aws-devops-agentSkill
- coordinating-multi-space-devops-agentSkill
- diff-scanning-with-aws-security-agentSkill
- investigating-incidents-with-aws-devops-agentSkill
- pentesting-with-aws-security-agentSkill
- remediating-with-aws-security-agentSkill
- running-release-testsSkill
- scanning-with-aws-security-agentSkill
- setup-devops-agentSkill
- setup-security-agentSkill
- setupSkill
- threat-modeling-with-aws-security-agentSkill
- agents-buildSkill
- agents-connectSkill
- agents-debugSkill
- agents-deploySkill
- agents-get-startedSkill
- agents-hardenSkill
- agents-optimizeSkill
- agents-paySkill
- agents-paySkill
- amazon-bedrockSkill
- aws-ai-mlSkill
- aws-authSkill
- aws-billing-and-cost-managementSkill
- aws-blocksSkill
- aws-cdkSkill
- aws-cloudformationSkill
- aws-computeSkill
- aws-containersSkill
- aws-databaseSkill
- aws-deploymentSkill
- aws-iamSkill
- aws-messaging-and-streamingSkill
- aws-networkingSkill
- aws-observabilitySkill
- aws-sdk-js-v3-usageSkill
- aws-sdk-swift-usageSkill
- aws-secrets-managerSkill
- aws-securitySkill
- aws-serverlessSkill
- aws-storageSkill
- aws-well-architected-reviewSkill
- launch-with-awsSkill
- signing-in-to-awsSkill
- amazon-opensearch-serviceSkill
- authoring-mwaa-workflowSkill
- connecting-to-data-sourceSkill
- creating-data-lake-tableSkill
- debugging-mwaa-workflowSkill
- exploring-data-catalogSkill
- finding-data-lake-assetsSkill
- ingesting-into-data-lakeSkill
- querying-data-lakeSkill
- redshift-guideSkill
- storing-and-querying-vectorsSkill
- testing-mwaa-workflowSkill
- upgrading-mwaa-environmentsSkill
- agent-advisorSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 7 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Only some services have resources (S3, DynamoDB, EC2, IAM, SQS, SNS, CloudFormation, CloudWatch, Glacier).
- Distinctive: line 40
Use clients when you need full API coverage or the service has no resource interface.
- Distinctive: line 62
Do not create clients inside loops - reuse a single client instance.
- Distinctive: line 83
Only catch exceptions when you have something actionable to do - return a fallback value, retry, take a different code path.
- Very specific: line 88
When you do catch, prefer typed exceptions on the client over generic ClientError with string code matching through the client.exceptions …
- Very specific: line 104
Use generic ClientError only as a catch-all in a top-level error handler, not in business logic functions.
- Very specific: line 124
When asked to write a script that uses boto3 or botocore, keep if __name__ == "__main__" to a single function call.
- Very specific: line 146
Never call sys.exit() from a business logic function -- it makes the function untestable and unusable as a library.
- Very specific: line 152
Never manually loop with NextToken -- use paginators.
- Distinctive: line 166
When you need the full response object per item, or need per-page control (e.g.
- Distinctive: line 179
Wait for a resource to reach a desired state:
- Very specific: line 193
Use botocore.config.Config for retries, timeouts, and connection pool settings, etc.:
- Very specific: line 208
When creating custom configuration for a client, see references/configuration.md.
- Distinctive: line 246
When writing any Python code that uses the following services, you MUST load these additional reference files for best practices and custom …
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
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 keysUse clients when you need full API coverage or the service has no resource interface. Use resources when they exist and simplify your code (especially DynamoDB and S3).
Session and Client Creation
import boto3
# Default session implicitly created
client = boto3.client("s3")
resource = boto3.resource("dynamodb")
# Explicit session use when you need to customize how
# clients are created, use an explicit profile, etc.
session = boto3.Session(
profile_name="my-profile",
region_name="us-west-2",
)
client = session.client("s3")Do not create clients inside loops - reuse a single client instance. Clients are thread safe and can be shared across threads once they're instantiated.
Making API Calls
# Client - pass parameters as keyword arguments, get dicts back
response = client.get_object(Bucket="my-bucket", Key="my-key")
data = response["Body"].read()
# Resource - use object methods and attributes
obj = s3_resource.Object("my-bucket", "my-key")
response = obj.get()
data = response["Body"].read()Parameter names match the exact casing of the AWS API, which is typically PascalCase, not snake_case.
Error Handling
Only catch exceptions when you have something actionable to do - return a fallback value, retry, take a different code path. Catching an exception just to print it and swallow it is wrong: it hides the real error and prevents callers from reacting. Let exceptions propagate by default.
When you do catch, prefer typed exceptions on the client over generic
ClientError with string code matching through the client.exceptions
attribute:
lambda_client = boto3.client("lambda")
def get_function_config(name: str) -> dict | None:
"""Return function configuration, or None if it doesn't exist."""
try:
return lambda_client.get_function_configuration(FunctionName=name)
except lambda_client.exceptions.ResourceNotFoundException:
return None # actionable: convert missing function to None
# Everything else propagates - caller or main() handles itUse generic ClientError only as a catch-all in a top-level error handler, not
in business logic functions. It lives in botocore, not boto3:
from botocore.exceptions import ClientError
def main() -> int:
try:
result = do_the_work()
print(result)
return 0
except ClientError as e:
print(f"Error: {e}", file=sys.stderr)
return 1For the full error hierarchy and botocore exceptions, see references/error-handling.md.
Script Structure
When asked to write a script that uses boto3 or botocore, keep if __name__
== "__main__" to a single function call. Argument parsing, error presentation,
and exit codes belong in main(), not scattered across business logic
functions:
def main() -> int:
parser = argparse.ArgumentParser()
parser.add_argument("bucket")
args = parser.parse_args()
try:
do_the_work(args.bucket)
return 0
except ClientError as e:
print(f"Error: {e}", file=sys.stderr)
return 1
if __name__ == "__main__":
sys.exit(main())Never call sys.exit() from a business logic function -- it makes the function
untestable and unusable as a library. Raise an exception or return an error
value instead, and let main() decide how to present it.
Pagination
Never manually loop with NextToken -- use paginators. When you only need
specific fields, use .search() with a JMESPath expression to extract and
flatten across pages:
paginator = iam.get_paginator("list_users")
for name in paginator.paginate().search("Users[].UserName"):
print(name)
# Filter and project
for arn in paginator.paginate().search("Users[?Path == '/admin/'][].Arn"):
print(arn)When you need the full response object per item, or need per-page control (e.g. counting pages, batching by page), iterate pages directly:
for page in paginator.paginate():
for user in page.get("Users", []):
process(user)For more details on pagination, see: references/pagination.md.
Waiters
Wait for a resource to reach a desired state:
waiter = client.get_waiter("bucket_exists")
waiter.wait(
Bucket="my-bucket",
WaiterConfig={"Delay": 5, "MaxAttempts": 20},
)For more details on waiters, see references/waiters.md.
Client Configuration
Use botocore.config.Config for retries, timeouts, and connection pool
settings, etc.:
from botocore.config import Config
config = Config(
retries={"total_max_attempts": 2, "mode": "adaptive"},
connect_timeout=5,
read_timeout=10,
max_pool_connections=50,
)
client = boto3.client("s3", config=config)When creating custom configuration for a client, see references/configuration.md.
Logging
Both boto3 and botocore use the standard library logging module. You can
configure logging through the standard logging APIs, or you can use
helpers provided by boto3 and botocore for convenience:
# Quick: log all botocore wire-level details to stderr
boto3.set_stream_logger("") # root logger -- everything
boto3.set_stream_logger("botocore") # just botocore
# Botocore, log all botocore details
import logging
from botocore.session import Session
session = Session()
session.set_stream_logger('botocore', logging.DEBUG)
# OR: Configure logging to a file.
session.set_file_logger(logging.DEBUG, '/tmp/botocore.log')set_stream_logger(name, level=logging.DEBUG) adds a
StreamHandler to the named logger. This is the idiomatic way to get
request/response debug output from the SDK.
Common Issues
Issue: ClientError import location
Wrong: from boto3.exceptions import ClientError
Right: from botocore.exceptions import ClientError
Service specific customizations
When writing any Python code that uses the following services, you MUST load these additional reference files for best practices and custom high level APIs:
- S3 - you MUST load
references/s3.md. - Dynamodb - you MUST load
references/dynamodb.md.
References
- Client configuration (retries, timeouts, endpoints):
references/configuration.md - Credentials and sessions:
references/credentials.md - Error handling patterns:
references/error-handling.md - Pagination:
references/pagination.md - Waiters:
references/waiters.md - S3 transfers and presigned URLs:
references/s3.md - DynamoDB operations:
references/dynamodb.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

