DEV Community

hirooka kazuya
hirooka kazuya

Posted on

div diary 20251105

Role Technology Stack Details/Benefits
Frontend/Hosting AWS Amplify Hosting (Next.js) Integrates Next.js deployment, CI/CD, and Edge CDN.
Backend (API) Amplify Gen 2 (TypeScript/JavaScript) Automatically generates/defines APIs and Lambda functions from a data model.
Backend (Data) AWS RDS (PostgreSQL) Managed within a VPC as a custom resource by Amplify Gen 2.
Infrastructure Management Amplify Gen 2 (CDK-based) Amplify's definition files are converted to CDK to build the infrastructure. Offers a higher level of abstraction than SAM.
Integration/Connection Amplify Functions (Lambda) Amplify abstracts the complex VPC configuration and Secrets Manager integration required for RDS connectivity.

Advantages of This Architecture

  • Integrated Developer Experience: Backend definitions (data models, Lambda functions) are done within the Next.js project root, making frontend integration extremely smooth.
  • Reduced VPC Complexity: Amplify automatically or simply handles much of the configuration for connecting Lambda to RDS within a VPC (Security Groups, Subnets, etc.), reducing the manual effort required with SAM.
  • Built-in Auth/Authorization: AWS Cognito for authentication can be easily incorporated. AWS Amplify Architecture Amplify is primarily composed of the following three elements:
  • AWS Amplify Services (AWS Services) These are the components that run within your AWS account and incur costs.
  • Amplify Hosting: A cloud service that hosts frontend applications like Next.js and provides integrated CI/CD (Continuous Integration/Continuous Delivery) and a CDN.
  • Amplify Studio (Management Console): A Web UI for visually managing backend resources (data models, authentication, etc.).
  • Amplify Framework (Local Development Tools) This is the toolkit developers use in their local environment.
  • Amplify CLI: The command-line interface for defining and deploying the backend. (Used in the previous generation of Amplify)
  • Amplify Gen 2 (Framework/Abstraction Layer):
    • Gen 2 is a new development paradigm that abstracts AWS services.
    • It allows you to define the backend (Lambda, API Gateway, RDS, etc.) using TypeScript or JavaScript directly within your local project.
    • This local definition is then converted into the AWS infrastructure management tool, AWS CDK (Cloud Development Kit), and finally deployed to the AWS cloud.
  • Amplify Libraries (In-App SDKs) This is the SDK to be integrated into the frontend application.
  • Libraries for JavaScript/React/Next.js, etc.: API clients that allow frontend code to easily call backend APIs, authentication, and other features.

Top comments (0)