DEV Community

hirooka kazuya
hirooka kazuya

Posted on

dev diary 20251106

the basic explaination of AWS Amplify is :

AWS Amplify is a tool and service platform from Amazon Web Services (AWS) that helps developers build, deploy, and manage web and mobile applications easily and quickly. It simplifies the development process by providing ready-to-use backend services (like user authentication, databases, APIs, and storage) and frontend libraries that connect your app to those services. Essentially, it allows you to create full-stack applications without managing traditional server infrastructure.

Here is a simple overview of how AWS Amplify works for beginners:

  • You start by setting up an AWS account and installing the Amplify command line tool (CLI) on your computer.
  • Then, you create a new Amplify project in your app folder with commands through CLI.
  • You can add backend features like authentication (user sign-up, sign-in), APIs, and file storage by just running easy commands.
  • After configuring everything, you "push" or deploy these backend resources to the AWS cloud with one command.
  • Finally, you connect your app's frontend code (React, Angular, Vue, mobile frameworks, etc.) to these backend services using Amplify libraries.
  • Amplify also provides hosting for your web apps and supports continuous deployment via code repositories like GitHub.

The advantages of using Amplify include it being serverless (no server management), scalable (the backend grows with your app), and integrated with powerful AWS cloud services. It also supports things like real-time data sync, offline data, and easy integration of machine learning features.

In summary, AWS Amplify is like a developer toolkit and platform that takes care of complicated cloud backend setups, letting you focus more on building the actual user-facing parts of your applications with simple commands and libraries.


Since you already have a pnpm development folder, let's start by introducing Amplify Gen 2 to the project and defining the foundational resources (Data, API).


Getting Started with Amplify Gen 2

1. Amplify CLI Installation

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

2. Project Initialization

Run the following command in the root directory of your local pnpm project:

npx amplify sandbox
Enter fullscreen mode Exit fullscreen mode

3. Encountered Error

You received the following error:

The Amplify CLI can NOT find command: sandbox
If you are trying to use Amplify Gen 2, install the @aws-amplify/backend-cli package or execute using the package name directly:
pnpm dlx @aws-amplify/backend-cli sandbox

4. Attempted Fix

You ran:

pnpm dlx @aws-amplify/backend-cli sandbox
Enter fullscreen mode Exit fullscreen mode

5. Second Error

An error occurred. The cause was that the new Amplify Gen 2 CLI package has multiple executables (binaries), and pnpm dlx could not determine which one to run.

6. Second Attempted Fix

You ran:

pnpm --package=@aws-amplify/backend-cli dlx ampx sandbox
Enter fullscreen mode Exit fullscreen mode

Conclusion & Next Steps

Ultimately, you found that Amplify Gen 2 does not support pnpm, making it impossible to create the sandbox. The project needs to be converted to use npm.

That's all for today.


Top comments (0)