T
TanStack8mo ago
genetic-orange

Tanstack Start + AWS Amplify v2 experience?

Hello, does anyone would like to share their experience using Tanstack Start with AWS Amplify?
2 Replies
wee-brown
wee-brown4mo ago
Hey @gegi I've tried AWS Amplify Gen 2. Everything mostly works out of the box When you set
server: { preset: 'aws-amplify' }
server: { preset: 'aws-amplify' }
The thing that's been a blocker for my team is loading in environment variables from the Amplify Console at runtime. The lambdas that Amplify spins up do not get the env vars added to its runtime environment. They expect you to load these in at build-time somehow. I've been scratching my head at how to solve this. I have several createServerFn functions that rely on process.env.SOME_ENV_VAR and cannot figure out how to inject the Amplify Console-defined variables. AWS only has documentation for Next.js, which is unfortunate. https://docs.aws.amazon.com/amplify/latest/userguide/ssr-environment-variables.html
Making environment variables accessible to server-side runtimes - A...
Modify your app's build specification to make environment variables accessible to Next.js.
extended-salmon
extended-salmon3mo ago
Hi @nick_at_bedrock Did you managed to get it working?

Did you find this page helpful?