AWS Calls That Still Work on Page Two
A comment scaffold that makes generated AWS SDK code paginate, retry, and stop inventing method names.
What it is for
A comment header you put at the top of a file so inline suggestions come out paginated, retried, and free of hardcoded credentials, plus a short check to run before accepting each one. On the name: CodeWhisperer stopped existing as a separate product on 30 April 2024, when AWS folded it into Amazon Q Developer; AWS has since closed new sign-ups (15 May 2026) and set end of support for the Q Developer IDE plugins and paid subscriptions at 30 April 2027, pointing IDE users to Kiro instead. So treat the assistant as replaceable and this block as the part you keep — it names no panel, setting or model and works with whichever completion tool you end up on. It stops the classic failure where generated code reads only the first page of results and works fine until the account has real data in it.
The skill
Put this block at the top of the file before you write the function signature, so the suggestions are constrained before they start. It is plain text and works with whichever inline-completion assistant is in your editor. The lines below are prefixed with # for Python — use // for Java, TypeScript, Go, C# or Rust. # Context for code suggestions in this file: # - Build the SDK client once at module level, not inside the call. # - Region and credentials come from the environment or the default chain. # Never inline an access key, a secret, an account id, or an ARN literal. # - Any list / describe / scan / query call must be paginated. Use the # paginator if this language's SDK has one; otherwise loop on the # continuation token until it is absent. One call is a bug, not a shortcut. # - Wrap every call so throttling and transient 5xx retry with exponential # backoff and jitter, and every other error is raised, not swallowed. # - Never return None or an empty list to hide an exception. # - Timeouts are explicit. No unbounded network call. # - Log the operation name and the resource id, never the full response. Keep the rest out of the file. Run it before you accept any suggestion: - Check the operation name against the service docs. A confident-looking method name is the most common thing an autocomplete invents. - Check every parameter name and its shape: string vs list vs dict. - Confirm the response key you are reading exists in that shape. - If the suggestion writes, deletes, or scales anything, run it against a throwaway resource before it touches an account that matters. Failure this prevents: code that passes review and works on twenty rows, then silently returns only the first page in production and drops the rest.
How to install it
1. Open the tool and start a new conversation, project or template. 2. Paste the text below wherever the tool keeps standing instructions — usually called system prompt, instructions, or persona. 3. Save it so it applies to every run rather than a single message.