Lesson 1 of 3 Developer Productivity and AI Interfaces

Building AI Interfaces with Amplify, OpenAPI and No-Code Flows

This lesson covers declarative UI components with AWS Amplify, API-first design with OpenAPI, and no-code workflow building with Bedrock Flows, which make generative AI easy for developers and users to reach.

Learning outcomes

After completing this lesson, you will be able to:

  • Add AI features with the Amplify AI kit.
  • Design APIs first with OpenAPI.
  • Build workflows without code in Bedrock Flows.

AWS Amplify and the Amplify AI kit

AWS Amplify provides libraries, UI components and a backend framework for web and mobile applications, with authentication through Amazon Cognito and data through AWS AppSync. The Amplify AI kit adds generative AI routes declared in the backend data schema: a conversation route defines a chat with a Bedrock model, a system prompt and optional tools backed by data queries or Lambda functions, with history stored automatically per user; a generation route defines a single-shot structured generation with a typed output.

Front-end UI components such as an AI conversation component render a complete chat interface with streaming, message history and attachments in a few lines, and the generated client is typed from the schema. Authorization rules on routes restrict who can use them.

// amplify/data/resource.ts
const schema = a.schema({
  supportChat: a.conversation({
    aiModel: a.ai.model("Amazon Nova Pro"),
    systemPrompt: "You are a helpful support assistant for Example Corp products.",
  }).authorization((allow) => allow.owner()),

  summarizeTicket: a.generation({
    aiModel: a.ai.model("Amazon Nova Lite"),
    systemPrompt: "Summarize the ticket in two sentences and assign a priority.",
  }).arguments({ text: a.string() })
    .returns(a.customType({ summary: a.string(), priority: a.enum(["low", "medium", "high"]) }))
    .authorization((allow) => allow.authenticated()),
});

The following diagram shows the parts the Amplify AI kit provides.

An authenticated chat feature with the Amplify AI kit. The React app renders the conversation UI component with streaming, Cognito authenticates the user, and a conversation route in the data schema defines the Bedrock model and system prompt. History is stored per user automatically.
Tools for the conversation can be data queries or Lambda functions.
True or false

The Amplify AI kit

Exam skills 2.5.2

Check three claims about building AI interfaces with AWS Amplify.

Log in to try this activity Interactive activities are free with an account.

API-first development with OpenAPI

An OpenAPI specification describes an API's paths, operations, request and response schemas and security in a machine-readable contract. Writing it first (API-first development) lets teams agree on the interface before implementation, generate client SDKs and server stubs, produce documentation, create mock servers for front-end work and import the definition into API Gateway. For generative AI, OpenAPI also serves agents: Bedrock agent action groups and AgentCore Gateway targets accept OpenAPI definitions, so a well-described API becomes a tool with no extra work.

No-code workflow building

Not every generative AI workflow needs a developer to build it. Amazon Bedrock Flows provides a visual builder in which prompts, knowledge bases, conditions and functions are connected by dragging nodes onto a canvas. Product managers and analysts can build and adjust a workflow, such as classifying incoming requests and drafting a different response for each category, test it in the console with sample inputs, and hand it to developers as a versioned alias that applications call.

For employees who need simple AI tools rather than workflows, Amazon Q Business Apps let them create small AI applications, such as a template for drafting project updates, from a natural language description, using the company data that Q Business already indexes (for organisations that already use Q Business, which is closed to new customers). The following table summarises the interface options.

ToolAudienceProvides
Amplify AI kitWeb and mobile developersDeclarative conversation and generation routes; chat UI
OpenAPI specificationAPI producers and consumers, agentsContract, SDKs, docs, mocks, agent tools
Bedrock Flows builderDevelopers and business usersVisual, no-code prompt workflows
Q Business AppsEmployeesLightweight AI apps from descriptions
Scenario questions

Building without code

Exam skills 2.5.2 · 1.6.6

Decide how non-developers can build and release generative AI workflows safely.

Log in to try this activity Interactive activities are free with an account.
Worked example

A chat feature in a week

A product team must add an authenticated AI chat assistant with streaming and per-user history to its React web app built with Amplify, with minimal backend code.

The Amplify AI kit conversation route defines the model and system prompt in the data schema, Cognito provides authentication, history is stored per user automatically, and the conversation UI component renders the chat with streaming.

Check yourself

What can one OpenAPI specification provide?

Show answer

SDKs, documentation, an API Gateway import and agent tool definitions.

Exam Tips

Remember for the exam

  • Amplify AI kit: conversation and generation routes declared in the data schema.
  • OpenAPI: one contract for SDKs, docs, API Gateway import and agent tools.
  • Visual, no-code prompt workflows: Bedrock Flows builder.