Hello!
New here.
I'm working on modernizing an existing Next.js project that heavily utilizes AWS services via the AWS SDK using JS, but I was having a lot of issues trying to get any kind of authentication without hardcoding. This lead me to decide to start the switch to Gen 2 with Vite + React + TS instead. I need guidance on the best approach to convert it to Amplify Gen 2 using AWS CDK. I'm honestly pretty lost with all the options and whats recommended to use.
Here's my current setup:
- Next.js application with numerous API routes for backend functionality
- Extensive use of DynamoDB with AWS SDK v3 for complex data operations
- Amazon SES for email operations
- S3 for data storage and retrieval (including fetching location data)
- Custom authentication system (not using Cognito)
- Complex frontend React components with state management
- Integration with a third-party API for price data
Functionalities:
- Managing price changes across multiple locations
- Generating and managing links for price change operations
- Creating reports and sending emails
- Locking/unlocking price change capabilities
Some specific questions I have, any answered would be a great help, no need to answer them all:
-
What's the recommended approach for restructuring my Next.js app and API routes in the Amplify Gen 2 format? How can I maintain the current functionality while taking advantage of Amplify CDK and Gen 2?
-
Can I migrate my complex DynamoDB operations to Amplify's new Gen 2 data manager? My current setup includes intricate queries, updates, and data processing directly with DynamoDB - how would this translate to Amplify's data handling?
-
What's the best way to handle my current S3 and SES integrations in Amplify Gen 2? Are there Amplify-specific constructs I should be using for these services instead?
-
My site currently generates unique links for locations that can be passed to someone to change prices. The dashboard however should not be accessible to anyone but the admin. Is there a way to do this better in modern setups? With the Quickstart react documentation I saw users can see different things depending on who is accessing it. Could you manually create users so they can have access to a specific price sheet?
-
My project involves complex state management and data manipulation on the frontend. Are there any Amplify features or best practices that could help simplify this?
-
How can I use AWS CDK effectively to define my current AWS resources (DynamoDB tables, S3 buckets, etc.) in the Amplify Gen 2 setup?
-
I'm currently using a third-party API for some data. How can I integrate this external API call within the Amplify Gen 2 architecture?
-
Are there any specific strategies for handling my current use of Next.js API routes in an Amplify Gen 2 context?
Any insights, resources, or what to avoid would be greatly appreciated!