Amplify Docs (Gen 2)
Preview: A new code-first DX (Gen 2) for building backends
Amplify has reimagined the way frontend developers build fullstack applications on AWS. With this next generation of Amplify’s backend-building experience, you can author your frontend and backend definition completely with TypeScript, a file convention, and Git branch-based environments.
Works with popular languages and frameworks
- JavaScript
- TypeScript
- React
- Next
- Vue
- Angular
- React Native
Features
Code-first DX
The code-first developer experience is a new approach that lets you focus on your app code instead of infrastructure.
Fullstack Git deployments
Fullstack deployments from your Git branch. Deploy your frontend and backend together on every code commit.
Faster local development
Per-developer cloud sandbox environments let you quickly iterate during development.
Develop
- TypeScript-first fullstack experienceWrite TypeScript across frontend and backend. Get schema validation, dot completion, and end-to-end types while you code.
- Real-time data for modern appsSync frontend state to real-time backend updates. Just write TypeScript without thinking about WebSockets.
- Authn and authz for secure appsChoose the auth strategy (such as passwords, social, email links) and control data access based on users and groups.
- Auto-generate CRUD forms wired to dataMap CRUD forms to your data model with form-level validations and error states built in.
Deploy
- SSR/SSG/ISR hosting supportDeploy apps in Next.js, Nuxt.js, Gatsby, React, Vue, Angular (and more) by simply connecting your Git repository.
- Faster iterations with per-developer sandboxesPer-developer cloud sandboxes provide high fidelity and faster deployment times to make local iteration quick.
- Zero-config fullstack branchesFullstack deployments from your Git branch. Autodeploy Git branches to set up staging, development, and production environments.
- GUI to manage your dataManage your app data, users and groups, and files in a single console.
Customize
- Add any AWS service with CDKExtend or customize with AWS CDK to access 200+ AWS services.
- Bring your own pipelinesUse your own pipelines to set up cross-account or multi-region, stage-based deployments.
- Monorepo and multi-repo supportEnable support for all types of fullstack team workflows—monorepos, micro frontends, multi-repos, and more.
amplify/backend.ts
1import * as sns from 'aws-cdk-lib/aws-sns';2import * as sqs from 'aws-cdk-lib/aws-sqs';3import { defineBackend } from '@aws-amplify/backend';4import { auth } from './auth/resource.js';5import { data } from './data/resource.js';6
7const backend = defineBackend({8 auth,9 data10});11
12const customResourceStack = backend.createStack('MyCustomResources');13
14new sqs.Queue(customResourceStack, 'CustomQueue');15new sns.Topic(customResourceStack, 'CustomTopic');