2 python rules available
Two Kiro rules match python: a substantive FastAPI-on-AWS backend rule and a short Lambda rule. The steering file targets Python service and Lambda code.
Kiro, built and operated by AWS, uses steering files: Markdown documents in .kiro/steering/ that give the agent persistent project knowledge. Front matter controls when each file is included: always, when matching files are in context, manually by #name, or automatically by description. Kiro also includes AGENTS.md files.
.kiro/steering/python.mdStarting point, not a tested configuration for your repository. Included when files matching fileMatchPattern are in context. Review the instructions, adapt the file paths and run your project's existing checks.
--- inclusion: fileMatch fileMatchPattern: "**/*.py" --- # Python instructions for Kiro ## Focus for this project - Create boto3 clients at module scope, not inside the handler. - Type handler signatures and parse the event into a dataclass or Pydantic model before use. - Test handlers locally with a sample event fixture; do not require deployed resources for unit tests. ## Python conventions - Read requires-python in pyproject.toml first. Use built-in generics such as list[str] (3.9+) and X | None unions (3.10+) only when the minimum version allows them at runtime. - Annotate public functions and keep Any out of new signatures. - Raise specific exception types and never use a bare except:. - Use the formatter, linter and type checker already configured in pyproject.toml instead of introducing new ones. ## Before you finish - Run the configured linter and type checker (for example ruff check . and mypy) and pytest -q and report the actual output. If you cannot run them, say so and list the exact commands instead of saying they pass. - Summarize which of the rules above affected the change. - When working from a spec, reference the task you are completing and do not mark it done until the checks above have run.
Ask for a small change to one matching file. Check the tool's loaded context or instruction view, inspect the diff for the requested convention, and run the relevant build or test. A well-formatted file does not guarantee the model follows every instruction.
Create your own Kiro rules for Python and share with the community.
Front matter must be at the very beginning of a steering file to be recognized. Kiro supports AGENTS.md. According to the steering docs, AGENTS.md files do not support inclusion modes and are always included, so keep scoped guidance in .kiro/steering/ files instead.
Documentation checked 2026-11-05: Kiro docs: SteeringKiro home page
Illustrative input and expected result. This example is a verification guide, not a recorded model run.
You use Kiro to add a Python Lambda function and want boto3 clients reused, typed handlers and local tests.
Implement a Lambda that resizes images uploaded to S3.
A handler parsing the S3 event, a module-level client, error handling for unsupported formats, a pytest test with a sample event and stubbed S3, and test results.
Content reviewed 2026-11-05. Confirm instruction activation in your installed client before relying on it.
Kiro steering for FastAPI backends on AWS: Pydantic v2 request/response models, async SQLAlchemy sessions, and calling synchronous boto3 safely.