-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I confirm that env variables are being added to Hosting Lambdas (Web Compute)? #3345
Comments
Hi @foobarnes 👋🏽 thanks for providing this detailed information. You mentioned in your CloudWatch logs that the Lambda function is reporting the correct environment variable. Where are you running into the I'm continuing to investigate this issue and will update with more information shortly. |
According to our documentation:
You are following the correct steps for making those variables accessible at runtime. Feel free to create a new issue if you run into issues with this behavior. |
|
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Before opening, please confirm:
App Id
d263pg34gxs8oh
AWS Region
us-east-1
Amplify Hosting feature
Environment variables
Question
I am using NextAuth. It requires an env variable
NEXTAUTH_URL
to be set.NextAuth makes available several auth-related api routes with a catchall/decomp. route.
api/auth/[...nextauth].js
I am logging
process.env.NEXTAUTH_URL
at the bottom of this route generator/config, and it seems to be correctly set at the time of NextAuth's initialization.Immediately after, however, it appears to be unavailable from NextAuth's perspective. I receive the
[next-auth][warn][NEXTAUTH_URL]
warning statingEnvironment variable NEXTAUTH_URL missing. Please set it in your .env file.
I'm not sure why that would be the case.How can I confirm that my env variables have been applied to my SSR Lambdas? I'm using Amplify Hosting in web compute mode. These instructions for web dynamic deployments used to be the steps I'd follow to find my lambda IDs.
api/auth/[...nextauth].js
CloudWatch Logs
Amplify Console Env Variables
next.config.js
amplify.yml
Questions:
I appreciate any sanity checking as well. This has been driving me crazy. 🥲
The text was updated successfully, but these errors were encountered: