DEV Community

Cover image for From Code to Cloud in Minutes: How AWS Amplify Supercharges Modern App Development
Vridhi Duggal
Vridhi Duggal

Posted on

From Code to Cloud in Minutes: How AWS Amplify Supercharges Modern App Development

“What if building and deploying fullstack apps felt like adding toppings to your favourite pizza? Fast, flexible, and fun?”
That’s the magic of AWS Amplify: where cloud meets creativity.

The Developer Dream: Building Fast Without Sacrificing Power

In the fast paced world of startups, hackathons, and student projects, every second counts. As developers, we dream of:

  • Spending less time on infrastructure
  • Deploying fullstack apps without complex CI/CD pipelines
  • Seamlessly integrating authentication, databases, APIs, and storage
  • Scaling without breaking a sweat

But reality? We often drown in DevOps before writing a single line of business logic.
This is where AWS Amplify enters like Iron Man: packed with tools and ready to fly.

So, What is AWS Amplify?

Amplify empowers developers with a flexible collection of modular cloud services and libraries for fullstack application development. Each capability is designed to integrate with the others, while also remaining standalone for customized implementations. Developers can mix and match Amplify capabilities based on their project needs, leveraging only the required building blocks.

For example, a developer could use Amplify’s data functionality for their fullstack app’s backend and frontend, just host their app’s frontend, or connect their user interface to an existing AWS resource like an Amazon S3 bucket.

In plain English?
Amplify is your cloud sidekick. It handles backend services, CI/CD pipelines, hosting, and even user authentication, so you can focus on what really matters: building beautiful apps.

Amplify

A Tale of Two Developers: Traditional vs. Amplified

Dev 1: The Traditional Route

  • Spends 2 days configuring IAM roles and EC2 instances
  • Writes long CloudFormation templates
  • Manually connects React app to Lambda API
  • Battles CORS errors like a final boss

Dev 2: The Amplify Way

Plug and Play: Connecting Amplify to Your App in Minutes

Before running the Amplify magic, you need to initialise Amplify in your project and link it to your AWS account. Here’s how to do it step by step:

Step 1: Install Amplify CLI

npm install -g @aws-amplify/cli
Enter fullscreen mode Exit fullscreen mode

Step 2: Configure Amplify with AWS Credentials
This links your local CLI to your AWS account. It only needs to be done once per device.

amplify configure
Enter fullscreen mode Exit fullscreen mode
Command Purpose
amplify init Initializes your project and links it to AWS
amplify add auth Enables secure authentication using Amazon Cognito
amplify add api Adds a GraphQL or REST API to your backend
amplify add storage Adds file and data storage using S3
amplify push Deploys all configured resources to AWS

In less than an hour, Dev 2 has a working, cloud connected app.
The result? More time for innovation, less time for infrastructure tantrums.

What Can You Do With AWS Amplify?

Let’s break down the superpowers it brings to your project:

Features Description
Authentication Add secure login/signup with AWS Cognito
GraphQL/REST APIs Easily build APIs using AppSync or Lambda
Storage Connect to S3 for file/image upload/download
Database Use DynamoDB to store structured data
Hosting Deploy frontend apps with CI/CD from GitHub, GitLab, Bitbucket
Functions Add serverless business logic with AWS Lambda
AI/ML Integrate predictions, translations, and image recognition
Analytics Get user analytics using Amazon Pinpoint

Amplify Capabilities

What’s New in 2025: Amplify’s Power Boost

1. Code‑First Amplify Gen 2

Amplify has evolved into a TypeScript first, code defined backend powered by AWS CDK. Instead of relying heavily on CLI prompts, you now declare resources, data models, auth rules, even custom AWS constructs in .ts files.

Gen 2 lets you build your backend in TypeScript define your data, auth, functions, even custom AWS resources, with type safety and clean code.

  • IDE‑friendly: Enjoy IntelliSense, inline docs, and type safety during development.

  • Per‑branch cloud sandboxes: Each Git branch gets a live sandbox environment via npx ampx sandbox, enabling safe, real time backend iteration without affecting others.

  • Native CDK extensibility: Integrate custom AWS resources (SQS, SNS, etc.) side by side with Amplify-generated ones.

2. Smart Data Seeding

No more manual setup for test data. A single CLI command can seed Cognito users, DynamoDB/AppSync entries, and S3 files, all with proper auth context.

  • TDD-ready: Populate environments with realistic data in seconds.
amplify data seed --users 10 --items 50 --files ./seed-assets
Enter fullscreen mode Exit fullscreen mode

3. Cleaner CLI & Dev Alerts

The Amplify CLI output is now more CDK like concise, focused, and rich with dev time notices. No more scrolling through CloudFormation boilerplate; warnings and errors are highlighted early.

4. Upgraded Hosting + Built‑In Security

Need bigger build machines or built-in WAF?
Amplify Hosting now supports XLarge instances and one-click security gating.

Amplify Hosting now offers customizable build instances (up to 72 GB RAM and 36 vCPUs), ideal for scaling build heavy apps .

Additionally, you can enable AWS WAF protections (OWASP rules, geo blocking, rate limits) directly in the Amplify Console for around $15/app/month

Why This Matters ?

  • A fully code-defined backend reduces boilerplate and increases developer confidence.

  • Automatic sandboxes empower parallel feature development and isolated testing.

  • Clear CLI feedback saves time and reduces deployment headaches.

  • Scalable hosting and integrated security means production ready apps are buildable by default.

AWS Amplify Cross-Platform Support Matrix

Amplify supports the following categories and features across the supported languages:

Support Matrix

From Frontend to Cloud: A Deep Dive into Amplify Architecture

The following diagram outlines a few scenarios you could implement with Amplify. It shows the UI, or the data displayed by AWS Amplify; the backend resources provisioned by Amplify; and the underlying AWS services Amplify deploys for you.

Amplify Architecture

Amplify grows with your needs, and you can use it in whatever way works best from a fullstack front to back solution, to just frontend hosting or UI components to integrate with your AWS resources.

Frontend Magic with Amplify

As someone who loves clean UI/UX, I found Amplify incredibly frontend friendly. It supports:

  • React, Vue, Next.js, Angular, Flutter, and more
  • Drop in UI components for login, signup, and MFA
  • Auto generated GraphQL queries/mutations with Amplify CLI
  • Authentication state tracking out of the box

Amplify Hosting provides hosting for static and server side rendered apps. It has built in CI/CD workflows, so you can automatically redeploy on every commit.

Connect your git branches to Amplify Hosting to automatically deploy both your frontend and backend changes on every push. Enable pull request previews to view new features before merging them into your production branch.

Connect your repository branch:

Frontend Hosting

Confirm your build settings, add any environmental variables you may need for API keys or parameters, then save and deploy. Amplify will provision a build environment, clone your repository, deploy your Amplify backend if you have one, and then deploy your frontend. All completely managed by Amplify.

hosting-deployement

The Backend Simplified: Amplify Sandbox Mode

Ever wanted to prototype your backend without writing a single line of infrastructure code?

That’s where Amplify’s Sandbox Mode swoops in like a superhero in your cloud journey.
Think of it as a playground, but for your backend!

What is Sandbox Mode?

The Sandbox Mode in AWS Amplify is a visual, code-free environment that lets you model your backend data structure, define relationships, and instantly test APIs before even setting up the full infrastructure. It’s like drafting your architectural blueprint with drag and drop ease.

Cloud sandbox environments are designed for development purposes and are not intended for production workloads. To accelerate deployments, Amplify utilises CDK hot swapping where supported, enabling rapid updates to resources such as AWS Lambda functions and AWS AppSync resolver templates without requiring a full redeployment.

Sandbox-opt

Spinning Up a New Sandbox: Model, Test, Iterate

You can set up a new sandbox environment on your machine once you have an Amplify app set up.

First, open the terminal and run the following command:

npx ampx sandbox
Enter fullscreen mode Exit fullscreen mode

When you deploy a cloud sandbox, Amplify creates an AWS CloudFormation stack following the naming convention of amplify-<app-name>-<$(whoami)>-sandbox in your AWS account with the resources configured in your amplify/ folder.

sandbox1-opt

After a successful deployment, sandbox watches for file changes in your amplify/ folder and performs real time updates to the associated CloudFormation stack.

sandbox2-opt

Terminating a Sandbox Environment

After testing all the changes associated with the backend, you can terminate the sandbox session via Ctrl + C.

To delete all the resources in the sandbox environment, run the following command:

npx ampx sandbox delete
Enter fullscreen mode Exit fullscreen mode

Managing Your Amplify Sandbox Environment

You can view and manage all the sandbox environments for your team in the new Amplify console. This is useful for a team leader to audit all of the Amplify sandbox environments deployed within an account.

Choose Manage Sandboxes to get started:

Sandbox4-opt

You can then check the number, status, and last updates for sandbox environments across your team. You can also use the console to delete sandbox environments when no longer needed.

Sandbox5-opt

Best Practices

Keep the following best practices in mind when working with cloud sandbox environments:

  • Sandboxes are identical in fidelity to your production environments.
  • Code changes are continuously deployed to your sandbox on every save for fast iterations.
  • Use sandboxes for experimentation and testing, not for production workloads.
  • Deploy one sandbox per Amplify app per developer to prevent conflicts.
  • Reset sandboxes occasionally to clear out unused resources and save costs.

Ready to See Amplify in Action? Build and Deploy in 10 Minutes

Here’s how you can spin up a fullstack app complete with login, backend API, and live deployment, in less time than it takes to make coffee.

Install the Amplify CLI
First, install the AWS Amplify CLI globally using npm:

npm install -g @aws-amplify/cli
Enter fullscreen mode Exit fullscreen mode

Configure Amplify with AWS Credentials
Configure the Amplify CLI with your AWS credentials:

amplify configure
Enter fullscreen mode Exit fullscreen mode

This command will open a browser window prompting you to sign in to your AWS account. Follow these steps:

  1. Set up a new user in IAM: Create a new IAM user with programmatic access and attach the “AdministratorAccess” policy.

  2. Configure the CLI: After creating the user, you’ll receive an Access Key ID and Secret Access Key. Enter these into the CLI when prompted.

  3. Profile Name: Give your AWS profile a name (e.g., default).

Amplify Setup Walkthrough: From Init to Deploy

Create a New React App

Let’s create a new React application using Create React App:

npm create vite@latest
✔ Project name: reacttodo
✔ Select a framework: › React
✔ Select a variant: › JavaScript

cd reacttodo
npm install
npm run dev
Enter fullscreen mode Exit fullscreen mode

Initialize Amplify in Your Project

Initialize Amplify in your React project:

amplify init
Enter fullscreen mode Exit fullscreen mode

When prompted, provide the following configuration:

  • Enter a name for the project: amplifytodoapp
  • Enter a name for the environment: dev
  • Choose your default editor: Select your preferred code editor
  • Choose the type of app that you’re building: javascript
  • What javascript framework are you using: react
  • Source Directory Path: src
  • Distribution Directory Path: dist
  • Build Command: npm run build
  • Start Command: npm start
  • Do you want to use an AWS profile?: Yes
  • Please choose the profile you want to use: Select the profile you configured earlier

Setting Up the Frontend with Amplify

npm install aws-amplify
Enter fullscreen mode Exit fullscreen mode

Copy this add below last import of main.jsx file:

import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import App from './App.jsx'
import './index.css'
import { Amplify } from 'aws-amplify';
import amplifyconfig from './amplifyconfiguration.json';
Amplify.configure(amplifyconfig);

createRoot(document.getElementById('root')).render(
  <StrictMode>
    <App />
  </StrictMode>,
)
Enter fullscreen mode Exit fullscreen mode

Define the Data Model

Add a GraphQL API

We’ll use AWS AppSync to create a GraphQL API for our Todo app:

amplify add api
Enter fullscreen mode Exit fullscreen mode

Configure the API with the following options:

  • Please select from one of the below-mentioned services: GraphQL
  • Provide API name: TodoAPI
  • Choose the default authorization type for the API: API key
  • Enter a description for the API key: (Press Enter to skip)
  • After how many days from now the API key should expire: 7
  • Do you want to configure advanced settings for the GraphQL API: No
  • Do you have an annotated GraphQL schema?: No
  • Choose a schema template: Single object with fields (e.g., “Todo” with ID, name, description)

Amplify will generate a basic schema for a Todo object. You can find and modify it at amplify/backend/api/TodoAPI/schema.graphql.

Update the Schema

Let’s update the schema to include additional fields:

input AMPLIFY {
  globalAuthRule: AuthRule = { allow: public }
} # FOR TESTING ONLY!
type Todo @model {
  id: ID!
  name: String!
  description: String
  completed: Boolean!
}
Enter fullscreen mode Exit fullscreen mode

Deploy the API

Push your changes to AWS:

amplify push
Enter fullscreen mode Exit fullscreen mode

Confirm the prompts to deploy the API:

✔ Are you sure you want to continue? (Y/n) · yes
...
? Do you want to generate code for your newly created GraphQL API Yes
? Choose the code generation language target javascript
? Enter the file name pattern of graphql queries, mutations and subscriptions src/graphql/**/*.js
? Do you want to generate/update all possible GraphQL operations - queries, mutations and subscriptions Yes
? Enter maximum statement depth [increase from default if your schema is deeply nested] 2
? Enter the file name for the generated code src/API.js
Enter fullscreen mode Exit fullscreen mode

Setup Frontend and Connect to API

Update this code to your src/App.jsx:

import { useEffect, useState } from 'react';

import { generateClient } from 'aws-amplify/api';

import { createTodo } from './graphql/mutations';
import { listTodos } from './graphql/queries';

const initialState = { name: '', description: '' };
const client = generateClient();

const App = () => {
  const [formState, setFormState] = useState(initialState);
  const [todos, setTodos] = useState([]);

  useEffect(() => {
    fetchTodos();
  }, []);

  function setInput(key, value) {
    setFormState({ ...formState, [key]: value });
  }

  async function fetchTodos() {
    try {
      const todoData = await client.graphql({
        query: listTodos
      });
      const todos = todoData.data.listTodos.items;
      setTodos(todos);
    } catch (err) {
      console.log('error fetching todos');
    }
  }

  async function addTodo() {
    try {
      if (!formState.name || !formState.description) return;
      const todo = { ...formState };
      setTodos([...todos, todo]);
      setFormState(initialState);
      await client.graphql({
        query: createTodo,
        variables: {
          input: todo
        }
      });
    } catch (err) {
      console.log('error creating todo:', err);
    }
  }

  return (
    <div style={styles.container}>
      <h2>Amplify Todos</h2>
      <input
        onChange={(event) => setInput('name', event.target.value)}
        style={styles.input}
        value={formState.name}
        placeholder="Name"
      />
      <input
        onChange={(event) => setInput('description', event.target.value)}
        style={styles.input}
        value={formState.description}
        placeholder="Description"
      />
      <button style={styles.button} onClick={addTodo}>
        Create Todo
      </button>
      {todos.map((todo, index) => (
        <div key={todo.id ? todo.id : index} style={styles.todo}>
          <p style={styles.todoName}>{todo.name}</p>
          <p style={styles.todoDescription}>{todo.description}</p>
        </div>
      ))}
    </div>
  );
};

const styles = {
  container: {
    width: 400,
    margin: '0 auto',
    display: 'flex',
    flexDirection: 'column',
    justifyContent: 'center',
    padding: 20
  },
  todo: { marginBottom: 15 },
  input: {
    border: 'none',
    backgroundColor: '#ddd',
    marginBottom: 10,
    padding: 8,
    fontSize: 18
  },
  todoName: { fontSize: 20, fontWeight: 'bold' },
  todoDescription: { marginBottom: 0 },
  button: {
    backgroundColor: 'black',
    color: 'white',
    outline: 'none',
    fontSize: 18,
    padding: '12px 0px'
  }
};

export default App;
Enter fullscreen mode Exit fullscreen mode

Try running locally :

npm run dev
Enter fullscreen mode Exit fullscreen mode

Add Authentication

We’ll add user authentication to secure our app using Amazon Cognito.

amplify add auth
Enter fullscreen mode Exit fullscreen mode

Choose the default configuration:

  • Do you want to use the default authentication and security configuration?: Default configuration`
  • How do you want users to be able to sign in?: `Username
  • Do you want to configure advanced settings?: No

Deploy the authentication service:

amplify push
Enter fullscreen mode Exit fullscreen mode

Frontend Auth Integration

Install Amplify Libraries

Install the necessary AWS Amplify libraries and UI components:

npm install aws-amplify @aws-amplify/ui-react
Enter fullscreen mode Exit fullscreen mode

Configure Amplify

In your src/index.js or src/App.jsx, replace with this code.

import { useEffect, useState } from 'react';

import { generateClient } from 'aws-amplify/api';

import { createTodo } from './graphql/mutations';
import { listTodos } from './graphql/queries';

import '@aws-amplify/ui-react/styles.css';
import {
  withAuthenticator,
  Button,
  Heading,
  Text,
  TextField,
  View
} from '@aws-amplify/ui-react';

const initialState = { name: '', description: '' };
const client = generateClient();

const App = ({ signOut, user }) => {
  const [formState, setFormState] = useState(initialState);
  const [todos, setTodos] = useState([]);

  useEffect(() => {
    fetchTodos();
  }, []);

  function setInput(key, value) {
    setFormState({ ...formState, [key]: value });
  }

  async function fetchTodos() {
    try {
      const todoData = await client.graphql({
        query: listTodos
      });
      const todos = todoData.data.listTodos.items;
      setTodos(todos);
    } catch (err) {
      console.log('error fetching todos');
    }
  }

  async function addTodo() {
    try {
      if (!formState.name || !formState.description) return;
      const todo = { ...formState };
      setTodos([...todos, todo]);
      setFormState(initialState);
      await client.graphql({
        query: createTodo,
        variables: {
          input: todo
        }
      });
    } catch (err) {
      console.log('error creating todo:', err);
    }
  }

  return (
    <View style={styles.container}>
      <Heading level={1}>Hello {user.username}</Heading>
      <Button style={styles.button} onClick={signOut}>
        Sign out
      </Button>
      <Heading level={2}>Amplify Todos</Heading>
      <TextField
        placeholder="Name"
        onChange={(event) => setInput('name', event.target.value)}
        style={styles.input}
        defaultValue={formState.name}
      />
      <TextField
        placeholder="Description"
        onChange={(event) => setInput('description', event.target.value)}
        style={styles.input}
        defaultValue={formState.description}
      />
      <Button style={styles.button} onClick={addTodo}>
        Create Todo
      </Button>
      {todos.map((todo, index) => (
        <View key={todo.id ? todo.id : index} style={styles.todo}>
          <Text style={styles.todoName}>{todo.name}</Text>
          <Text style={styles.todoDescription}>{todo.description}</Text>
        </View>
      ))}
    </View>
  );
};

const styles = {
  container: {
    width: 400,
    margin: '0 auto',
    display: 'flex',
    flexDirection: 'column',
    justifyContent: 'center',
    padding: 20
  },
  todo: { marginBottom: 15 },
  input: {
    border: 'none',
    backgroundColor: '#ddd',
    marginBottom: 10,
    padding: 8,
    fontSize: 18
  },
  todoName: { fontSize: 20, fontWeight: 'bold' },
  todoDescription: { marginBottom: 0 },
  button: {
    backgroundColor: 'black',
    color: 'white',
    outline: 'none',
    fontSize: 18,
    padding: '12px 0px'
  }
};

export default withAuthenticator(App);
Enter fullscreen mode Exit fullscreen mode

Deploy and Host the App

Add Hosting to Your Project

Set up hosting for your app using AWS Amplify Hosting:

amplify add hosting
Enter fullscreen mode Exit fullscreen mode

Select the following options:

  • Select the plugin module to execute: Hosting with Amplify Console (Managed hosting with custom domains, Continuous deployment)
  • Choose a type: Manual deployment

Deploy Your App

Build your app and publish it:

npm run build
amplify publish
Enter fullscreen mode Exit fullscreen mode

After the deployment is complete, Amplify will provide a URL where your app is hosted. If you face any issue try running “amplify configure project” and checking the source path and distribution path.

amplify configure project
Enter fullscreen mode Exit fullscreen mode

Conclusion

Congratulations! You’ve built a fullstack, serverless Todo app using React and AWS Amplify. You’ve learned how to:

  • Initialise a React project with Amplify
  • Set up a GraphQL API with a data model
  • Add authentication to your app
  • Integrate Amplify services into your frontend
  • Deploy and host your application

Amplify More Than Code, Amplify Your Journey

AWS Amplify isn’t just a backend tool, it’s a developer accelerator.
It helped me turn ideas into deployable apps and gain practical AWS experience , all while focusing on what I love most: building, not configuring.

Whether you're a student, indie developer, or part of a startup team, Amplify meets you where you are, and takes you where you want to go, faster.
So go ahead: Amplify your app. Amplify your impact.

Key Takeaways

  • AWS Amplify simplifies fullstack development by handling infrastructure, CI/CD, authentication, and APIs with just a few commands.
  • With Amplify CLI and Studio, you can visually or programmatically create and manage your backend, making development faster and more intuitive.
  • It’s perfect for students, indie developers, and startups who want to build fast without diving deep into DevOps.
  • The Amplify Sandbox mode allows you to prototype your backend (data models, relationships, and auth rules) visually before pushing anything to production.
  • Supports your favourite frontend frameworks: React, Vue, Flutter & more.
  • With features like GraphQL/REST APIs, storage, authentication, hosting, and analytics, Amplify is a one stop platform for building and scaling modern cloud connected apps.
  • You can go from code to cloud in minutes, truly empowering you to focus on building, not configuring.

Top comments (0)