AWS SDK Rules & Best Practices Summary
This is the index for the SDK Rules section. It condenses every checklist into one review sheet.
Busque em todas as páginas da documentação
This is the index for the SDK Rules section. It condenses every checklist into one review sheet.
Each best practice below is a one-line rule that links to the full enumerated page behind it. Keep this open during code review and jump to the checklist the change touches.
Authorization header, or secret values.Full detail: Authentication & Credential Rules Checklist.
ClientError with a code in boto3 and typed exception classes in SDK v3.max_attempts / maxAttempts, and capture the request id on every failure.Full detail: Error Handling & Retry Rules Checklist.
Full detail: Cost-Aware SDK Usage Rules.
destroy() on a v3 client you are done with; init clients outside the Lambda handler.Full detail: Resource Cleanup & Teardown Rules.
Full detail: Security Rules for SDK-Calling Services.
The cross-cutting index for the SDK Rules section. It condenses every checklist into one best-practice per category and links each to its full page.
Credentials and authentication, error handling and retries, cost-aware usage, cleanup and teardown, and security.
Credentials and least privilege come first because they cap the blast radius of every other mistake. Error handling is next, since it governs reliability and cost.
Pick the category the change touches and open its checklist next to the pull request. Most reviews need only two or three categories.
The authentication and credential checklist and the error handling and retry checklist. They cover the highest-impact security and reliability failure modes.
Yes. Every rule holds identically for both. Only the syntax differs, such as ClientError in Python versus typed exception classes in TypeScript.
With the Why page for the reasoning, then the Quickstart for the map, then the authentication checklist for the highest-impact rules.
No. Credential and cost rules apply to every script. A leaked key or a tight loop in a throwaway job costs just as much as one in production.
It is the safety net. Even when another rule is broken, tightly scoped permissions limit how much damage the resulting bug or leak can do.
No. It only condenses and links the rules enumerated in the five checklists. Use it as an index, and follow the links for the full detail.
Stack versions: This page was written for boto3 1.43.x (Python 3.10+) and the AWS SDK for JavaScript v3 (Node.js 18+).
Revisado por Chris St. John·Última atualização: 23 de jul. de 2026