How to Build Your Full-Stack Applications With CDK & AWS Amplify • Erik Hanchett • GOTO 2025
Erik Hanchett from AWS demonstrates how to accelerate the development of full-stack applications using AWS Amplify Gen 2. The talk focuses on its TypeScript-first approach for end-to-end type safety, its abstraction over the AWS CDK, and the integration of generative AI features through the Amplify AI Kit to connect with services like Amazon Bedrock.
The central challenge in modern web development is speed: How can we build and deploy full-stack applications faster? This involves not just rapid coding but also efficient infrastructure management. While tools like Kubernetes and orchestration agents are powerful, there is a need for solutions that enable developers to get websites, serverless functions, and AI-powered features up and running quickly.
Curo: An Agentic IDE for Faster Coding
AWS’s new agentic IDE, Curo, is designed to accelerate the development workflow. Built as a fork of VS Code, it maintains compatibility with the open-source extension marketplace while introducing powerful AI-driven features:
- Spec-Driven Development: A key differentiator is the “spec mode,” which helps plan new features by generating comprehensive documentation, including requirements, design documents, and implementation task lists.
- Agent Steering & Hooks: Developers can provide “steering documents” to give the AI agent context about the codebase, leading to more intelligent and relevant assistance. Agent hooks act like event listeners, automating tasks such as generating a unit test every time a component is saved.
- MCP Server Integration: Curo can connect to various Multi-purpose Co-pilot (MCP) servers, including a dedicated AWS MCP server for searching documentation, making it easier to find answers and code examples.
Infrastructure as Code with Amplify Gen 2
While there are multiple ways to manage AWS resources—from ClickOps in the console to the AWS CLI—Infrastructure as Code (IaC) offers the most robust and repeatable approach. The AWS Cloud Development Kit (CDK) allows developers to define infrastructure using familiar programming languages like TypeScript.
AWS Amplify Gen 2 builds on this foundation, providing a higher-level abstraction on top of the CDK. This makes it significantly easier to get started without needing to be a CDK expert. However, it retains flexibility, as developers can always “drop down” to the underlying CDK layer for more complex configurations or to add resources not covered by the abstraction.
A TypeScript-First, Type-Safe Workflow
Amplify Gen 2 embraces a TypeScript-first philosophy for both the frontend and backend, enabling true end-to-end type safety.
-
Backend Definition: All backend resources are defined within an
amplify/directory in your project. For example, you define your data models and authorization rules in a schema file. This single source of truth is used to automatically provision the necessary AWS resources, such as an AWS AppSync GraphQL API, Amazon DynamoDB tables, and Amazon Cognito for authentication.// amplify/data/schema.ts import { a, defineData, type Client } from '@aws-amplify/backend'; const schema = a.schema({ Customer: a.model({ fullName: a.string(), email: a.string(), }) .authorization(allow => [ allow.owner(), allow.public().to(['read']) ]), }); export type Schema = Client<typeof schema>; export const data = defineData({ schema }); -
Frontend Integration: The backend schema is automatically exported and made available to the frontend application. This creates a strongly-typed client that provides full IntelliSense and autocompletion in your frontend code. When the backend schema changes, the frontend types are updated in real-time, preventing the frontend and backend from ever getting out of sync.
Integrating Generative AI with Amplify AI Kit
Amplify Gen 2 simplifies the integration of generative AI through the Amplify AI Kit. This lightweight library provides a straightforward way to connect to foundational models on Amazon Bedrock.
You can define a conversational interface and equip it with “tools” that the model can use. These tools can be custom AWS Lambda functions or predefined actions that query your AppSync database. In the demonstrated storyteller app, the AI model (Claude 3.5 Sonnet) was given tools to:
- Generate a story and save it to DynamoDB.
- Call a Lambda function that uses Stable Diffusion to generate an accompanying image.
- List and retrieve existing stories from the database.
This approach allows the AI to perform complex, multi-step tasks by interacting with your application’s backend resources in a structured and predictable way. The final application, a Next.js project, was deployed using Amplify Hosting, AWS’s managed hosting service for modern web applications.