Book Image

Rapid Application Development with AWS Amplify

By : Adrian Leung
Book Image

Rapid Application Development with AWS Amplify

By: Adrian Leung

Overview of this book

AWS Amplify is a modern toolkit that includes a command line interface (CLI); libraries for JS, iOS, and Android programming; UI component libraries for frameworks like React, Angular, and Vue.js for web development, and React Native and Flutter for mobile development. You'll begin by learning how to build AWS Amplify solutions with React and React Native with TypeScript from scratch, along with integrating it with existing solutions. This book will show you the fastest way to build a production-ready minimum viable product (MVP) within days instead of years. You'll also discover how to increase development speed without compromising on quality by adopting behavior-driven development (BDD) and Cypress for end-to-end test automation, as well as the Amplify build pipeline (DevOps or CI/CD pipeline) to ensure optimal quality throughout continuous test automation and continuous delivery. As you advance, you'll work with React to determine how to build progressive web apps (PWAs) with Amplify and React Native for cross-platform mobile apps. In addition to this, you'll find out how to set up a custom domain name for your new website and set up the AWS Amplify Admin UI for managing the content of your app effectively. By the end of this AWS book, you'll be able to build a full-stack AWS Amplify solution all by yourself.
Table of Contents (14 chapters)
1
Section 1: Getting Ready
4
Section 2: Building a Photo Sharing App
9
Section 3: Production Readiness

Creating a new project with React or React Native with TypeScript

I am glad that both React and React Native actually share the exact same processes for adding AWS Amplify to existing projects. Now, let's add the AWS Amplify library and Amplify UI to our app.

Installing AWS Amplify dependencies

Before we dive into the details of how to create the to-do list app and connect it to the backend, we will need to add the necessary dependencies to our projects:

  1. For the ReactJS project, enter the following command:
    ? yarn add aws-amplify @aws-amplify/ui-react
  2. For the Expo project, enter the following command:
    yarn add aws-amplify aws-amplify-react-native @react-native-community/netinfo

For the React Native project, things are more complicated. We need to follow these steps:

  1. Enter the following command:
    yarn add aws-amplify aws-amplify-react-native amazon-cognito-identity-js react-native-vector-icons @react-native-community/netinfo
  2. Run the following...