<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vridhi Duggal</title>
    <description>The latest articles on DEV Community by Vridhi Duggal (@vridhiduggal).</description>
    <link>https://dev.to/vridhiduggal</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3335593%2F90754caa-617b-42ff-b252-6f62a1d2ed68.jpg</url>
      <title>DEV Community: Vridhi Duggal</title>
      <link>https://dev.to/vridhiduggal</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vridhiduggal"/>
    <language>en</language>
    <item>
      <title>From Code to Cloud in Minutes: How AWS Amplify Supercharges Modern App Development</title>
      <dc:creator>Vridhi Duggal</dc:creator>
      <pubDate>Tue, 15 Jul 2025 10:10:25 +0000</pubDate>
      <link>https://dev.to/vridhiduggal/from-code-to-cloud-in-minutes-how-aws-amplify-supercharges-modern-app-development-59c5</link>
      <guid>https://dev.to/vridhiduggal/from-code-to-cloud-in-minutes-how-aws-amplify-supercharges-modern-app-development-59c5</guid>
      <description>&lt;p&gt;&lt;em&gt;“What if building and deploying fullstack apps felt like adding toppings to your favourite pizza? Fast, flexible, and fun?”&lt;/em&gt;&lt;br&gt;
That’s the magic of &lt;strong&gt;AWS Amplify&lt;/strong&gt;: where cloud meets creativity.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Developer Dream: Building Fast Without Sacrificing Power
&lt;/h2&gt;

&lt;p&gt;In the fast paced world of startups, hackathons, and student projects, every second counts. As developers, we dream of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Spending &lt;strong&gt;less time on infrastructure&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Deploying fullstack apps &lt;strong&gt;without complex CI/CD pipelines&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Seamlessly &lt;strong&gt;integrating authentication, databases, APIs, and storage&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scaling&lt;/strong&gt; without breaking a sweat&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But reality? We often drown in DevOps before writing a single line of business logic.&lt;br&gt;
This is where &lt;strong&gt;AWS Amplify&lt;/strong&gt; enters like Iron Man: packed with tools and ready to fly.&lt;/p&gt;
&lt;h2&gt;
  
  
  So, What is AWS Amplify?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Amplify&lt;/strong&gt; 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. &lt;/p&gt;

&lt;p&gt;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. &lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkbpegrzvtey2y2z9l7y6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkbpegrzvtey2y2z9l7y6.png" alt="Amplify" width="800" height="312"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  A Tale of Two Developers: Traditional vs. Amplified
&lt;/h2&gt;
&lt;h3&gt;
  
  
  &lt;em&gt;Dev 1: The Traditional Route&lt;/em&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Spends 2 days configuring IAM roles and EC2 instances&lt;/li&gt;
&lt;li&gt;Writes long CloudFormation templates&lt;/li&gt;
&lt;li&gt;Manually connects React app to Lambda API&lt;/li&gt;
&lt;li&gt;Battles CORS errors like a final boss&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  &lt;em&gt;Dev 2: The Amplify Way&lt;/em&gt;
&lt;/h3&gt;
&lt;h4&gt;
  
  
  Plug and Play: Connecting Amplify to Your App in Minutes
&lt;/h4&gt;

&lt;p&gt;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:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Install Amplify CLI&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @aws-amplify/cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2: Configure Amplify with AWS Credentials&lt;/strong&gt;&lt;br&gt;
This links your local CLI to your AWS account. It only needs to be done once per device.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;amplify configure
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;amplify init&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Initializes your project and links it to AWS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;amplify add auth&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Enables secure authentication using Amazon Cognito&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;amplify add api&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Adds a GraphQL or REST API to your backend&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;amplify add storage&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Adds file and data storage using S3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;amplify push&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Deploys all configured resources to AWS&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In less than an hour, Dev 2 has a working, cloud connected app.&lt;br&gt;
The result? &lt;strong&gt;More time for innovation, less time for infrastructure tantrums&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  What Can You Do With AWS Amplify?
&lt;/h2&gt;

&lt;p&gt;Let’s break down the &lt;strong&gt;superpowers&lt;/strong&gt; it brings to your project:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Features&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Authentication&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Add secure login/signup with AWS Cognito&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;GraphQL/REST APIs&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Easily build APIs using AppSync or Lambda&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Storage&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Connect to S3 for file/image upload/download&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Database&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Use DynamoDB to store structured data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Hosting&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Deploy frontend apps with CI/CD from GitHub, GitLab, Bitbucket&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Functions&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Add serverless business logic with AWS Lambda&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;AI/ML&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Integrate predictions, translations, and image recognition&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Analytics&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Get user analytics using Amazon Pinpoint&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F575co87t9hvv0ox33tmk.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F575co87t9hvv0ox33tmk.webp" alt="Amplify Capabilities" width="800" height="546"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  What’s New in 2025: Amplify’s Power Boost
&lt;/h2&gt;
&lt;h3&gt;
  
  
  1. Code‑First Amplify Gen 2
&lt;/h3&gt;

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

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

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;IDE‑friendly&lt;/strong&gt;: Enjoy IntelliSense, inline docs, and type safety during development.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Per‑branch cloud sandboxes&lt;/strong&gt;: Each Git branch gets a live sandbox environment via &lt;code&gt;npx ampx sandbox&lt;/code&gt;, enabling safe, real time backend iteration without affecting others.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Native CDK extensibility&lt;/strong&gt;: Integrate custom AWS resources (SQS, SNS, etc.) side by side with Amplify-generated ones.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  2. Smart Data Seeding
&lt;/h3&gt;

&lt;p&gt;No more manual setup for test data. A single CLI command can &lt;strong&gt;seed Cognito users, DynamoDB/AppSync entries, and S3 file&lt;/strong&gt;s, all with proper auth context.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;TDD-ready&lt;/strong&gt;: Populate environments with realistic data in seconds.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;amplify data seed &lt;span class="nt"&gt;--users&lt;/span&gt; 10 &lt;span class="nt"&gt;--items&lt;/span&gt; 50 &lt;span class="nt"&gt;--files&lt;/span&gt; ./seed-assets
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  3. Cleaner CLI &amp;amp; Dev Alerts
&lt;/h3&gt;

&lt;p&gt;The Amplify CLI output is now more CDK like concise, focused, and rich with &lt;strong&gt;dev time notices&lt;/strong&gt;. No more scrolling through CloudFormation boilerplate; warnings and errors are highlighted early.&lt;/p&gt;
&lt;h3&gt;
  
  
  4. Upgraded Hosting + Built‑In Security
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Need bigger build machines or built-in WAF? &lt;br&gt;
Amplify Hosting now supports XLarge instances and one-click security gating.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Amplify Hosting now offers &lt;strong&gt;customizable build instances&lt;/strong&gt; (up to 72 GB RAM and 36 vCPUs), ideal for scaling build heavy apps .&lt;/p&gt;

&lt;p&gt;Additionally, you can enable &lt;strong&gt;AWS WAF protections&lt;/strong&gt; (OWASP rules, geo blocking, rate limits) directly in the Amplify Console for around &lt;strong&gt;$15/app/month&lt;/strong&gt; &lt;/p&gt;
&lt;h2&gt;
  
  
  Why This Matters ?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A fully code-defined backend reduces boilerplate and increases developer confidence.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Automatic sandboxes empower parallel feature development and isolated testing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Clear CLI feedback saves time and reduces deployment headaches.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scalable hosting and integrated security means production ready apps are buildable by default.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  AWS Amplify Cross-Platform Support Matrix
&lt;/h2&gt;

&lt;p&gt;Amplify supports the following categories and features across the supported languages:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6nkzv7s62eh3vr8628ba.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6nkzv7s62eh3vr8628ba.png" alt="Support Matrix" width="800" height="939"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  From Frontend to Cloud: A Deep Dive into Amplify Architecture
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8e18q5b15kvkb5dqgcwf.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8e18q5b15kvkb5dqgcwf.webp" alt="Amplify Architecture" width="800" height="410"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;
&lt;h2&gt;
  
  
  Frontend Magic with Amplify
&lt;/h2&gt;

&lt;p&gt;As someone who loves clean UI/UX, I found Amplify incredibly frontend friendly. It supports:&lt;/p&gt;

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

&lt;p&gt;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. &lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect your repository branch:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6g9whovtes79hwvgasp7.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6g9whovtes79hwvgasp7.webp" alt="Frontend Hosting" width="800" height="614"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fplvpdnhktuv8cpopq3fj.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fplvpdnhktuv8cpopq3fj.webp" alt="hosting-deployement" width="800" height="334"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  The Backend Simplified: Amplify Sandbox Mode
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Ever wanted to prototype your backend without writing a single line of infrastructure code?&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;That’s where &lt;strong&gt;Amplify’s Sandbox Mode&lt;/strong&gt; swoops in like a superhero in your cloud journey.&lt;br&gt;
Think of it as a playground, but for your backend!&lt;/p&gt;
&lt;h3&gt;
  
  
  What is Sandbox Mode?
&lt;/h3&gt;

&lt;p&gt;The &lt;em&gt;&lt;strong&gt;Sandbox Mode&lt;/strong&gt;&lt;/em&gt; 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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5qep6qycs27z3tdtt1iq.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5qep6qycs27z3tdtt1iq.webp" alt="Sandbox-opt" width="800" height="510"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Spinning Up a New Sandbox: Model, Test, Iterate
&lt;/h2&gt;

&lt;p&gt;You can set up a new sandbox environment on your machine once you have an Amplify app set up.&lt;/p&gt;

&lt;p&gt;First, open the terminal and run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx ampx sandbox
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you deploy a cloud sandbox, Amplify creates an &lt;a href="https://aws.amazon.com/cloudformation/" rel="noopener noreferrer"&gt;AWS CloudFormation&lt;/a&gt; stack following the naming convention of &lt;code&gt;amplify-&amp;lt;app-name&amp;gt;-&amp;lt;$(whoami)&amp;gt;-sandbox&lt;/code&gt; in your AWS account with the resources configured in your &lt;code&gt;amplify/&lt;/code&gt; folder.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F46fbnxn5o0wy0dpj8kt9.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F46fbnxn5o0wy0dpj8kt9.webp" alt="sandbox1-opt" width="800" height="455"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc3i0h7808gm3d85mwnjo.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc3i0h7808gm3d85mwnjo.webp" alt="sandbox2-opt" width="800" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Terminating a Sandbox Environment
&lt;/h3&gt;

&lt;p&gt;After testing all the changes associated with the backend, you can terminate the sandbox session via &lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;C&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;To delete all the resources in the sandbox environment, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx ampx sandbox delete
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Managing Your Amplify Sandbox Environment
&lt;/h3&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Choose &lt;strong&gt;Manage Sandboxes&lt;/strong&gt; to get started:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh4e1qcdlxeiwbc3m71eo.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh4e1qcdlxeiwbc3m71eo.webp" alt="Sandbox4-opt" width="800" height="165"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjumc112ukzj1amfv1jsm.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjumc112ukzj1amfv1jsm.webp" alt="Sandbox5-opt" width="800" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Best Practices
&lt;/h3&gt;

&lt;p&gt;Keep the following best practices in mind when working with cloud sandbox environments:&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Ready to See Amplify in Action? Build and Deploy in 10 Minutes
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install the Amplify CLI&lt;/strong&gt;&lt;br&gt;
First, install the AWS Amplify CLI globally using npm:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @aws-amplify/cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Configure Amplify with AWS Credentials&lt;/strong&gt;&lt;br&gt;
Configure the Amplify CLI with your AWS credentials:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;amplify configure
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command will open a browser window prompting you to sign in to your AWS account. Follow these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Set up a new user in IAM&lt;/strong&gt;: Create a new IAM user with programmatic access and attach the “AdministratorAccess” policy.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Configure the CLI&lt;/strong&gt;: After creating the user, you’ll receive an Access Key ID and Secret Access Key. Enter these into the CLI when prompted.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Profile Name&lt;/strong&gt;: Give your AWS profile a name (e.g., &lt;code&gt;default&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Amplify Setup Walkthrough: From Init to Deploy
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Create a New React App&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let’s create a new React application using Create React App:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm create vite@latest
✔ Project name: reacttodo
✔ Select a framework: › React
✔ Select a variant: › JavaScript

&lt;span class="nb"&gt;cd &lt;/span&gt;reacttodo
npm &lt;span class="nb"&gt;install
&lt;/span&gt;npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Initialize Amplify in Your Project
&lt;/h3&gt;

&lt;p&gt;Initialize Amplify in your React project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;amplify init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;When prompted, provide the following configuration:&lt;/strong&gt;&lt;/p&gt;

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

&lt;h3&gt;
  
  
  Setting Up the Frontend with Amplify
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;aws-amplify
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Copy this add below last import of main.jsx file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;import &lt;span class="o"&gt;{&lt;/span&gt; StrictMode &lt;span class="o"&gt;}&lt;/span&gt; from &lt;span class="s1"&gt;'react'&lt;/span&gt;
import &lt;span class="o"&gt;{&lt;/span&gt; createRoot &lt;span class="o"&gt;}&lt;/span&gt; from &lt;span class="s1"&gt;'react-dom/client'&lt;/span&gt;
import App from &lt;span class="s1"&gt;'./App.jsx'&lt;/span&gt;
import &lt;span class="s1"&gt;'./index.css'&lt;/span&gt;
import &lt;span class="o"&gt;{&lt;/span&gt; Amplify &lt;span class="o"&gt;}&lt;/span&gt; from &lt;span class="s1"&gt;'aws-amplify'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
import amplifyconfig from &lt;span class="s1"&gt;'./amplifyconfiguration.json'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
Amplify.configure&lt;span class="o"&gt;(&lt;/span&gt;amplifyconfig&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

createRoot&lt;span class="o"&gt;(&lt;/span&gt;document.getElementById&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'root'&lt;/span&gt;&lt;span class="o"&gt;))&lt;/span&gt;.render&lt;span class="o"&gt;(&lt;/span&gt;
  &amp;lt;StrictMode&amp;gt;
    &amp;lt;App /&amp;gt;
  &amp;lt;/StrictMode&amp;gt;,
&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Define the Data Model
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Add a GraphQL API
&lt;/h4&gt;

&lt;p&gt;We’ll use AWS AppSync to create a GraphQL API for our Todo app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;amplify add api
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Configure the API with the following options:&lt;/p&gt;

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

&lt;p&gt;Amplify will generate a basic schema for a Todo object. You can find and modify it at &lt;code&gt;amplify/backend/api/TodoAPI/schema.graphql&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Update the Schema
&lt;/h3&gt;

&lt;p&gt;Let’s update the schema to include additional fields:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;input AMPLIFY &lt;span class="o"&gt;{&lt;/span&gt;
  globalAuthRule: AuthRule &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; allow: public &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="c"&gt;# FOR TESTING ONLY!&lt;/span&gt;
&lt;span class="nb"&gt;type &lt;/span&gt;Todo @model &lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="nb"&gt;id&lt;/span&gt;: ID!
  name: String!
  description: String
  completed: Boolean!
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Deploy the API
&lt;/h3&gt;

&lt;p&gt;Push your changes to AWS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;amplify push
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Confirm the prompts to deploy the API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;✔ Are you sure you want to &lt;span class="k"&gt;continue&lt;/span&gt;? &lt;span class="o"&gt;(&lt;/span&gt;Y/n&lt;span class="o"&gt;)&lt;/span&gt; · &lt;span class="nb"&gt;yes&lt;/span&gt;
...
? Do you want to generate code &lt;span class="k"&gt;for &lt;/span&gt;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/&lt;span class="k"&gt;**&lt;/span&gt;/&lt;span class="k"&gt;*&lt;/span&gt;.js
? Do you want to generate/update all possible GraphQL operations - queries, mutations and subscriptions Yes
? Enter maximum statement depth &lt;span class="o"&gt;[&lt;/span&gt;increase from default &lt;span class="k"&gt;if &lt;/span&gt;your schema is deeply nested] 2
? Enter the file name &lt;span class="k"&gt;for &lt;/span&gt;the generated code src/API.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Setup Frontend and Connect to API
&lt;/h3&gt;

&lt;p&gt;Update this code to your src/App.jsx:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;import &lt;span class="o"&gt;{&lt;/span&gt; useEffect, useState &lt;span class="o"&gt;}&lt;/span&gt; from &lt;span class="s1"&gt;'react'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

import &lt;span class="o"&gt;{&lt;/span&gt; generateClient &lt;span class="o"&gt;}&lt;/span&gt; from &lt;span class="s1"&gt;'aws-amplify/api'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

import &lt;span class="o"&gt;{&lt;/span&gt; createTodo &lt;span class="o"&gt;}&lt;/span&gt; from &lt;span class="s1"&gt;'./graphql/mutations'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
import &lt;span class="o"&gt;{&lt;/span&gt; listTodos &lt;span class="o"&gt;}&lt;/span&gt; from &lt;span class="s1"&gt;'./graphql/queries'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

const initialState &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; name: &lt;span class="s1"&gt;''&lt;/span&gt;, description: &lt;span class="s1"&gt;''&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
const client &lt;span class="o"&gt;=&lt;/span&gt; generateClient&lt;span class="o"&gt;()&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

const App &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  const &lt;span class="o"&gt;[&lt;/span&gt;formState, setFormState] &lt;span class="o"&gt;=&lt;/span&gt; useState&lt;span class="o"&gt;(&lt;/span&gt;initialState&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  const &lt;span class="o"&gt;[&lt;/span&gt;todos, setTodos] &lt;span class="o"&gt;=&lt;/span&gt; useState&lt;span class="o"&gt;([])&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  useEffect&lt;span class="o"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    fetchTodos&lt;span class="o"&gt;()&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;, &lt;span class="o"&gt;[])&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;function &lt;/span&gt;setInput&lt;span class="o"&gt;(&lt;/span&gt;key, value&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    setFormState&lt;span class="o"&gt;({&lt;/span&gt; ...formState, &lt;span class="o"&gt;[&lt;/span&gt;key]: value &lt;span class="o"&gt;})&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;

  async &lt;span class="k"&gt;function &lt;/span&gt;fetchTodos&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    try &lt;span class="o"&gt;{&lt;/span&gt;
      const todoData &lt;span class="o"&gt;=&lt;/span&gt; await client.graphql&lt;span class="o"&gt;({&lt;/span&gt;
        query: listTodos
      &lt;span class="o"&gt;})&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      const todos &lt;span class="o"&gt;=&lt;/span&gt; todoData.data.listTodos.items&lt;span class="p"&gt;;&lt;/span&gt;
      setTodos&lt;span class="o"&gt;(&lt;/span&gt;todos&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt; catch &lt;span class="o"&gt;(&lt;/span&gt;err&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
      console.log&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'error fetching todos'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;

  async &lt;span class="k"&gt;function &lt;/span&gt;addTodo&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    try &lt;span class="o"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(!&lt;/span&gt;formState.name &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;formState.description&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      const todo &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; ...formState &lt;span class="o"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      setTodos&lt;span class="o"&gt;([&lt;/span&gt;...todos, todo]&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      setFormState&lt;span class="o"&gt;(&lt;/span&gt;initialState&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      await client.graphql&lt;span class="o"&gt;({&lt;/span&gt;
        query: createTodo,
        variables: &lt;span class="o"&gt;{&lt;/span&gt;
          input: todo
        &lt;span class="o"&gt;}&lt;/span&gt;
      &lt;span class="o"&gt;})&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt; catch &lt;span class="o"&gt;(&lt;/span&gt;err&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
      console.log&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'error creating todo:'&lt;/span&gt;, err&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;
    &amp;lt;div &lt;span class="nv"&gt;style&lt;/span&gt;&lt;span class="o"&gt;={&lt;/span&gt;styles.container&lt;span class="o"&gt;}&amp;gt;&lt;/span&gt;
      &amp;lt;h2&amp;gt;Amplify Todos&amp;lt;/h2&amp;gt;
      &amp;lt;input
        &lt;span class="nv"&gt;onChange&lt;/span&gt;&lt;span class="o"&gt;={(&lt;/span&gt;event&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; setInput&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'name'&lt;/span&gt;, event.target.value&lt;span class="o"&gt;)}&lt;/span&gt;
        &lt;span class="nv"&gt;style&lt;/span&gt;&lt;span class="o"&gt;={&lt;/span&gt;styles.input&lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="nv"&gt;value&lt;/span&gt;&lt;span class="o"&gt;={&lt;/span&gt;formState.name&lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="nv"&gt;placeholder&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"Name"&lt;/span&gt;
      /&amp;gt;
      &amp;lt;input
        &lt;span class="nv"&gt;onChange&lt;/span&gt;&lt;span class="o"&gt;={(&lt;/span&gt;event&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; setInput&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'description'&lt;/span&gt;, event.target.value&lt;span class="o"&gt;)}&lt;/span&gt;
        &lt;span class="nv"&gt;style&lt;/span&gt;&lt;span class="o"&gt;={&lt;/span&gt;styles.input&lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="nv"&gt;value&lt;/span&gt;&lt;span class="o"&gt;={&lt;/span&gt;formState.description&lt;span class="o"&gt;}&lt;/span&gt;
        &lt;span class="nv"&gt;placeholder&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"Description"&lt;/span&gt;
      /&amp;gt;
      &amp;lt;button &lt;span class="nv"&gt;style&lt;/span&gt;&lt;span class="o"&gt;={&lt;/span&gt;styles.button&lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="nv"&gt;onClick&lt;/span&gt;&lt;span class="o"&gt;={&lt;/span&gt;addTodo&lt;span class="o"&gt;}&amp;gt;&lt;/span&gt;
        Create Todo
      &amp;lt;/button&amp;gt;
      &lt;span class="o"&gt;{&lt;/span&gt;todos.map&lt;span class="o"&gt;((&lt;/span&gt;todo, index&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;
        &amp;lt;div &lt;span class="nv"&gt;key&lt;/span&gt;&lt;span class="o"&gt;={&lt;/span&gt;todo.id ? todo.id : index&lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="nv"&gt;style&lt;/span&gt;&lt;span class="o"&gt;={&lt;/span&gt;styles.todo&lt;span class="o"&gt;}&amp;gt;&lt;/span&gt;
          &amp;lt;p &lt;span class="nv"&gt;style&lt;/span&gt;&lt;span class="o"&gt;={&lt;/span&gt;styles.todoName&lt;span class="o"&gt;}&amp;gt;{&lt;/span&gt;todo.name&lt;span class="o"&gt;}&lt;/span&gt;&amp;lt;/p&amp;gt;
          &amp;lt;p &lt;span class="nv"&gt;style&lt;/span&gt;&lt;span class="o"&gt;={&lt;/span&gt;styles.todoDescription&lt;span class="o"&gt;}&amp;gt;{&lt;/span&gt;todo.description&lt;span class="o"&gt;}&lt;/span&gt;&amp;lt;/p&amp;gt;
        &amp;lt;/div&amp;gt;
      &lt;span class="o"&gt;))}&lt;/span&gt;
    &amp;lt;/div&amp;gt;
  &lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

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

&lt;span class="nb"&gt;export &lt;/span&gt;default App&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Try running locally :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Add Authentication
&lt;/h3&gt;

&lt;p&gt;We’ll add user authentication to secure our app using Amazon Cognito.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;amplify add auth
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Choose the default configuration:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Do you want to use the default authentication and security configuration?&lt;/strong&gt;: &lt;code&gt;Default configuration&lt;/code&gt;`&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How do you want users to be able to sign in?&lt;/strong&gt;: `Username&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do you want to configure advanced settings?&lt;/strong&gt;: &lt;code&gt;No&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Deploy the authentication service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;amplify push
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Frontend Auth Integration
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Install Amplify Libraries
&lt;/h4&gt;

&lt;p&gt;Install the necessary AWS Amplify libraries and UI components:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;aws-amplify @aws-amplify/ui-react
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Configure Amplify
&lt;/h4&gt;

&lt;p&gt;In your &lt;code&gt;src/index.js&lt;/code&gt; or &lt;code&gt;src/App.jsx&lt;/code&gt;, replace with this code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;import &lt;span class="o"&gt;{&lt;/span&gt; useEffect, useState &lt;span class="o"&gt;}&lt;/span&gt; from &lt;span class="s1"&gt;'react'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

import &lt;span class="o"&gt;{&lt;/span&gt; generateClient &lt;span class="o"&gt;}&lt;/span&gt; from &lt;span class="s1"&gt;'aws-amplify/api'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

import &lt;span class="o"&gt;{&lt;/span&gt; createTodo &lt;span class="o"&gt;}&lt;/span&gt; from &lt;span class="s1"&gt;'./graphql/mutations'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
import &lt;span class="o"&gt;{&lt;/span&gt; listTodos &lt;span class="o"&gt;}&lt;/span&gt; from &lt;span class="s1"&gt;'./graphql/queries'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

import &lt;span class="s1"&gt;'@aws-amplify/ui-react/styles.css'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
import &lt;span class="o"&gt;{&lt;/span&gt;
  withAuthenticator,
  Button,
  Heading,
  Text,
  TextField,
  View
&lt;span class="o"&gt;}&lt;/span&gt; from &lt;span class="s1"&gt;'@aws-amplify/ui-react'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

const initialState &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; name: &lt;span class="s1"&gt;''&lt;/span&gt;, description: &lt;span class="s1"&gt;''&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
const client &lt;span class="o"&gt;=&lt;/span&gt; generateClient&lt;span class="o"&gt;()&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

const App &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;({&lt;/span&gt; signOut, user &lt;span class="o"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
  const &lt;span class="o"&gt;[&lt;/span&gt;formState, setFormState] &lt;span class="o"&gt;=&lt;/span&gt; useState&lt;span class="o"&gt;(&lt;/span&gt;initialState&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  const &lt;span class="o"&gt;[&lt;/span&gt;todos, setTodos] &lt;span class="o"&gt;=&lt;/span&gt; useState&lt;span class="o"&gt;([])&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  useEffect&lt;span class="o"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    fetchTodos&lt;span class="o"&gt;()&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;, &lt;span class="o"&gt;[])&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;function &lt;/span&gt;setInput&lt;span class="o"&gt;(&lt;/span&gt;key, value&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    setFormState&lt;span class="o"&gt;({&lt;/span&gt; ...formState, &lt;span class="o"&gt;[&lt;/span&gt;key]: value &lt;span class="o"&gt;})&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;

  async &lt;span class="k"&gt;function &lt;/span&gt;fetchTodos&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    try &lt;span class="o"&gt;{&lt;/span&gt;
      const todoData &lt;span class="o"&gt;=&lt;/span&gt; await client.graphql&lt;span class="o"&gt;({&lt;/span&gt;
        query: listTodos
      &lt;span class="o"&gt;})&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      const todos &lt;span class="o"&gt;=&lt;/span&gt; todoData.data.listTodos.items&lt;span class="p"&gt;;&lt;/span&gt;
      setTodos&lt;span class="o"&gt;(&lt;/span&gt;todos&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt; catch &lt;span class="o"&gt;(&lt;/span&gt;err&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
      console.log&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'error fetching todos'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;

  async &lt;span class="k"&gt;function &lt;/span&gt;addTodo&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    try &lt;span class="o"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(!&lt;/span&gt;formState.name &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;formState.description&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      const todo &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; ...formState &lt;span class="o"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      setTodos&lt;span class="o"&gt;([&lt;/span&gt;...todos, todo]&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      setFormState&lt;span class="o"&gt;(&lt;/span&gt;initialState&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      await client.graphql&lt;span class="o"&gt;({&lt;/span&gt;
        query: createTodo,
        variables: &lt;span class="o"&gt;{&lt;/span&gt;
          input: todo
        &lt;span class="o"&gt;}&lt;/span&gt;
      &lt;span class="o"&gt;})&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt; catch &lt;span class="o"&gt;(&lt;/span&gt;err&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
      console.log&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'error creating todo:'&lt;/span&gt;, err&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;

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

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

&lt;span class="nb"&gt;export &lt;/span&gt;default withAuthenticator&lt;span class="o"&gt;(&lt;/span&gt;App&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Deploy and Host the App
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Add Hosting to Your Project
&lt;/h4&gt;

&lt;p&gt;Set up hosting for your app using AWS Amplify Hosting:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;amplify add hosting
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Select the following options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Select the plugin module to execute&lt;/strong&gt;: &lt;code&gt;Hosting with Amplify Console (Managed hosting with custom domains, Continuous deployment)&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Choose a type&lt;/strong&gt;: &lt;code&gt;Manual deployment&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Deploy Your App
&lt;/h4&gt;

&lt;p&gt;Build your app and publish it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run build
amplify publish
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;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.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;amplify configure project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Congratulations! You’ve built a fullstack, serverless Todo app using React and AWS Amplify.&lt;/em&gt;&lt;/strong&gt; You’ve learned how to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Initialise a React project with Amplify&lt;/li&gt;
&lt;li&gt;Set up a GraphQL API with a data model&lt;/li&gt;
&lt;li&gt;Add authentication to your app&lt;/li&gt;
&lt;li&gt;Integrate Amplify services into your frontend&lt;/li&gt;
&lt;li&gt;Deploy and host your application&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Amplify More Than Code, Amplify Your Journey
&lt;/h2&gt;

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

&lt;p&gt;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.&lt;br&gt;
So go ahead: &lt;strong&gt;Amplify your app. Amplify your impact.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

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

</description>
      <category>aws</category>
      <category>amplify</category>
      <category>awscloud</category>
      <category>cloudcomputing</category>
    </item>
  </channel>
</rss>
