Introduction to Amplify

Overview

AWS Amplify is a set of tools that helps web and mobile developers build full-stack applications on AWS. In this workshop, we use Amplify Gen 2, which has two parts:

  • Amplify backend: defines backend resources (authentication, storage, …) with TypeScript code in the amplify/ folder of the project. Amplify uses the AWS CDK to turn this code into AWS CloudFormation stacks.
  • Amplify Libraries (Amplify JS v6): client-side libraries that let the application call the backend, for example to sign up, sign in, upload files or download files. The libraries read the backend configuration from the amplify_outputs.json file.

For development, each person runs their own cloud sandbox with the npx ampx sandbox command. The sandbox deploys the backend to your AWS account, watches the amplify/ folder and automatically updates every time you save a file. After the deployment finishes, the sandbox creates the amplify_outputs.json file in the root folder of the project.

Amplify Gen 1 (the Amplify CLI with the amplify init, amplify add, amplify push commands) entered maintenance mode on May 1, 2026 and will reach end of support on May 1, 2027. That is why this workshop uses Amplify Gen 2.

Authentication with Amplify

Amplify Auth uses Amazon Cognito:

  • User Pool: the user directory, which handles sign-up, email confirmation, sign-in and password changes.
  • Identity Pool: provides temporary AWS credentials to signed-in users, so the application can access S3 directly.

In this workshop, users sign in with email and password. The display name is stored in the Cognito preferred_username attribute.

Storage with Amplify

Amplify Storage uses Amazon S3 and grants access by path. You declare who can do what with each folder in the bucket, and Amplify automatically creates the corresponding IAM policies.

Our application stores files at protected/{identityId}/{file name}: every signed-in user can read them, but only the owner can write and delete files in their own folder.