Kiro steering for full-stack Next.js on AWS: Server Components and secured Server Functions, AWS SDK v3 with least privilege, CDK infrastructure and CI with OIDC.
.kiro/steering/kiro-full-stack-development.md. Downloaded files need to be placed in that repository path.--- inclusion: fileMatch fileMatchPattern: "**/*" --- # Full-stack rules (Next.js + AWS) ## Architecture - Use the Next.js App Router. Fetch data in Server Components and add `'use client'` only for interactive leaves. - Use Server Functions (Server Actions) for mutations from forms; they are reachable by direct POST requests, so check authentication, authorization and input in each one. - Choose caching deliberately: in Next.js 15+ `fetch` is not cached by default. Cache with the mechanism for your version (`'use cache'` with Cache Components in Next.js 16) and invalidate after mutations with `revalidatePath`/`revalidateTag`. ## AWS integration - Use AWS SDK for JavaScript v3 modular clients (`@aws-sdk/client-*`), created once per process. - Give each runtime role only the actions and resources it uses; never embed access keys in code or environment files committed to git. - Use DynamoDB when access patterns are known up front (design keys around them); use a relational database when queries are ad hoc or relational. - Run background and event-driven work in Lambda (with SQS/EventBridge), using a currently supported Node.js runtime. ## Hosting - Check that the hosting option supports your Next.js version and features before deploying. As of November 2026, AWS documents Amplify Hosting SSR support for Next.js 12 through 15; for other versions, verify support or use another deployment path (for example a container on ECS/App Runner). ## Development workflow - Write tests first where the behaviour is clear (unit tests for services, integration tests for Server Functions and route handlers). - TypeScript with `strict`; `tsc --noEmit`, lint and tests run in CI. - CI/CD with GitHub Actions assuming an AWS role through OIDC (`aws-actions/configure-aws-credentials`), not stored access keys. - Infrastructure as code with the AWS CDK; review `cdk diff` in pull requests. ## Security - Validate every input at the server boundary with a schema. - Use a maintained authentication solution (for example Amazon Cognito or Auth.js); store sessions in httpOnly, secure cookies. - Rate-limit authentication and expensive endpoints (API Gateway usage plans, AWS WAF rate-based rules or application-level limits). - Follow the OWASP Top 10 and keep dependencies updated.
Cursor rules for Next.js 14+ App Router projects updated for Next.js 16 with async params, validated Route Handlers, generateMetadata and proxy.ts in place of middleware.
CLAUDE.md rules for the Next.js 16 App Router with async params, streaming via Suspense, secured Server Actions, metadata conventions and explicit caching choices.
Copilot instructions for Next.js App Router code with awaited params, authenticated Server Actions, typed Route Handlers and explicit caching.
Kiro
fullstack
Illustrative input and expected result. This example is a verification guide, not a recorded model run.
Content reviewed .
A Kiro steering setup for a Next.js 16 app on AWS needs to tell the agent how to add a new feature end to end.
Add a 'saved searches' feature: users can save a search from the results page and see the list on their profile.
A plan and code that use a Server Component for the list, a Server Function that checks the session and validates input before writing to DynamoDB (keys designed for 'list by user'), revalidation after the write, least-privilege IAM for the table, CDK changes, tests, and a hosting check given the Next.js version.
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/kiro-full-stack-development.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: "**/*" --- # Full-stack rules (Next.js + AWS) ## Architecture - Use the Next.js App Router. Fetch data in Server Components and add `'use client'` only for interactive leaves. - Use Server Functions (Server Actions) for mutations from forms; they are reachable by direct POST requests, so check authentication, authorization and input in each one. - Choose caching deliberately: in Next.js 15+ `fetch` is not cached by default. Cache with the mechanism for your version (`'use cache'` with Cache Components in Next.js 16) and invalidate after mutations with `revalidatePath`/`revalidateTag`. ## AWS integration - Use AWS SDK for JavaScript v3 modular clients (`@aws-sdk/client-*`), created once per process. - Give each runtime role only the actions and resources it uses; never embed access keys in code or environment files committed to git. - Use DynamoDB when access patterns are known up front (design keys around them); use a relational database when queries are ad hoc or relational. - Run background and event-driven work in Lambda (with SQS/EventBridge), using a currently supported Node.js runtime. ## Hosting - Check that the hosting option supports your Next.js version and features before deploying. As of November 2026, AWS documents Amplify Hosting SSR support for Next.js 12 through 15; for other versions, verify support or use another deployment path (for example a container on ECS/App Runner). ## Development workflow - Write tests first where the behaviour is clear (unit tests for services, integration tests for Server Functions and route handlers). - TypeScript with `strict`; `tsc --noEmit`, lint and tests run in CI. - CI/CD with GitHub Actions assuming an AWS role through OIDC (`aws-actions/configure-aws-credentials`), not stored access keys. - Infrastructure as code with the AWS CDK; review `cdk diff` in pull requests. ## Security - Validate every input at the server boundary with a schema. - Use a maintained authentication solution (for example Amazon Cognito or Auth.js); store sessions in httpOnly, secure cookies. - Rate-limit authentication and expensive endpoints (API Gateway usage plans, AWS WAF rate-based rules or application-level limits). - Follow the OWASP Top 10 and keep dependencies updated.
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.
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
Cursor rules for Next.js 14+ App Router projects updated for Next.js 16 with async params, validated Route Handlers, generateMetadata and proxy.ts in place of middleware.
CLAUDE.md rules for the Next.js 16 App Router with async params, streaming via Suspense, secured Server Actions, metadata conventions and explicit caching choices.
Copilot instructions for Next.js App Router code with awaited params, authenticated Server Actions, typed Route Handlers and explicit caching.