AI-assisted development and AI services
DVA-C03 · Lesson 5 of 24 · 30:52
YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗
Learning with these videos? Subscribe for new courses and exam-style questions.
Subscribe on YouTube (opens in a new tab)In this lesson
Prepare for the DVA-C03 exam (AWS Certified Developer – Associate). In this lesson: Kiro specs, steering files, and hooks, code reviews and headless Kiro CLI, Amazon Bedrock in your code (Converse, ConverseStream, InvokeModel, tool use, errors), Bedrock Knowledge Bases, Amazon Bedrock AgentCore, and Amazon Quick. Includes three original practice questions.
Study notes
The text of this lesson, to read at your own pace. Information as of November 2026.
AI on both sides
At AnyCompany Tickets, AI now shows up on both sides of the code. The developers use Kiro to plan, write, review, and test their features, and the product itself gets an assistant that answers fans' questions with Amazon Bedrock. This lesson covers AI-assisted development with Kiro, and the integration of managed AI services into applications: the Bedrock APIs, agents with Bedrock AgentCore, and Amazon Quick.
Spec-driven development
Kiro is the AI development tool of AWS, with an IDE, a command line, and a web app that share the same agent. For a feature, Kiro can work from a spec, a structured plan saved in the repository, under the kiro specs folder. A spec has three files: requirements, with user stories and acceptance criteria, design, with the architecture and sequence diagrams, and tasks, a list of discrete steps that Kiro implements and tracks one by one. The team reviews each file before any code is written, so the generated code follows an agreed plan, instead of a single prompt.
Steering and hooks
Steering files give Kiro lasting knowledge of the project: markdown files that describe the product, the technology stack, and the structure and conventions of the code, included in every interaction. Hooks automate repetitive work: a JSON file defines a trigger, like a file being saved, and an action, a shell command or a prompt to the agent, such as running the linter or creating a test for each new handler. In the IDE, inline completions suggest the next lines as you type. And a hook that runs before a tool call can block it, for example a command that would touch production.
Reviews, refactoring, and security
Kiro also reviews code: it can explain a function, suggest a refactoring, or look for security issues, like a hard-coded secret or an injection risk, in a change. A hook can run a security scanner or the tests after each change, so problems show up while the code is fresh. In a pipeline, Kiro CLI runs in headless mode, with an API key and a prompt, to review pull requests, generate tests, or explain build failures, with only the tools that the run needs. Kiro also flags generated code that matches open-source code, with its license. And generated code stays a draft: a developer reviews and tests it before it ships.
Calling Amazon Bedrock
Applications call foundation models through the Bedrock runtime API. The Converse API gives one request format for every model: a system prompt, a list of messages with roles, and inference settings like the maximum number of tokens. ConverseStream returns the answer in pieces as the model generates it, so the app can display it word by word. InvokeModel uses each model's own request body, and both APIs support tools, which the model asks your code to run. And Bedrock throttles like any service, so the SDK's retries with backoff apply here too.
Agents and other AI services
For agents, Amazon Bedrock AgentCore provides managed building blocks that work with any framework and model. Runtime hosts an agent in isolated sessions, Gateway turns existing APIs and Lambda functions into tools that agents can call, Memory keeps short-term and long-term context, and Identity handles the agent's access to other services. Bedrock Knowledge Bases let the code retrieve answers from company documents with a single call. And Amazon Quick gives business users an AI assistant over their connected data and applications, so a developer may connect data to it, rather than build a new chat app.
Recap
Let's recap. Kiro specs turn a feature into requirements, design, and tasks, reviewed before any code is written. Steering files carry the project's conventions, and hooks run commands or prompts on events, like a saved file. Kiro reviews, refactors, and scans code, and runs headless in pipelines, but people still review what it generates. Converse gives one API for every model, ConverseStream streams the answer, and the SDK retries throttled calls. And AgentCore hosts agents and turns APIs into tools, while Knowledge Bases and Amazon Quick bring AI to data.
Quick checks for this lesson
The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.
The team wants every piece of code that Kiro writes to use its own error-handling library and its naming rules for DynamoDB tables, without repeating them in each prompt. What should the developer add?
- A spec for each new feature of the app
- Steering files with the team’s conventions
- A hook that runs a linter after each save
- A longer prompt at the start of each session
Show the answer
Steering files with the team’s conventions
Steering files hold the project's conventions, and Kiro includes them in every interaction. “A spec for each new feature of the app” would plan one feature, and the rules would have to be repeated in every new spec. “A hook that runs a linter after each save” would only check the code after it is written, without guiding it. And “A longer prompt at the start of each session” would have to be repeated, and remembered, every time.
Fans complain that the assistant shows nothing for several seconds, then its whole answer at once. The team wants the answer to appear as it is generated. What should the developer use?
- InvokeModel with a higher maximum number of tokens
- Batch inference for the questions of the fans
- The ConverseStream operation of the Bedrock API
- Converse with a lower temperature for answers
Show the answer
The ConverseStream operation of the Bedrock API
ConverseStream returns the answer in pieces as the model generates them, so the app can show them at once. “InvokeModel with a higher maximum number of tokens” would allow longer answers, and the wait would grow. “Batch inference for the questions of the fans” would process requests in bulk, hours later, for jobs that are not interactive. And “Converse with a lower temperature for answers” would make answers less varied, and just as slow to appear.
The fan assistant must call the existing endpoints of the ticketing API, like seat search and order status, as tools, through a managed service, without rewriting them. What should the developer use?
- AgentCore Gateway, with the API as a target
- AgentCore Memory, with long-term memory turned on
- Bedrock Guardrails, on the inputs and the outputs
- A model with a much larger context window
Show the answer
AgentCore Gateway, with the API as a target
AgentCore Gateway turns existing APIs into tools that agents can call, as a managed service. “AgentCore Memory, with long-term memory turned on” would keep context between conversations, without exposing any API. “Bedrock Guardrails, on the inputs and the outputs” would filter inputs and outputs, without giving the agent any tool. And “A model with a much larger context window” would hold more text, and still could not call the API.