DEV Community

hirooka kazuya
hirooka kazuya

Posted on

dev diary 20251110

I've been trying to develop using AWS Amplify Gen 2, which has involved a lot of trial and error so far. While I still don't grasp the fundamentals completely, here is what I've figured out. (Learning something new for the first time takes a significant amount of time, and I may have some misconceptions.)When you launch the sandbox using npx amplify sandbox, a "Stack" is created in AWS CloudFormation. This stack contains the backend configuration details (such as authentication and data models).Once the sandbox is launched, the command prompt appears to be ready for new input (the session seems cut), but AWS continues to monitor the local environment. (The process is terminated by $\text{Ctrl}+\text{C}$.)Backend configurations are entered in TypeScript within the manually created files in the development folder (e.g., a Next.js project), specifically within amplify/backend.ts and its sub-directories (like amplify/data/resource.ts). Saving these files results in immediate reflection (hot-swap) on AWS via CloudFormation.My current understanding is that the workflow involves starting the sandbox, building the backend within the amplify folder, and simultaneously writing the frontend code to connect with it. The immediate next steps are to master how to define the backend resources and how to correctly integrate them with the frontend.

Top comments (0)