Warwick Grigg
09/23/2021, 5:44 PMFrank
Warwick Grigg
09/23/2021, 6:12 PMFrank
.build/cdk.out
?Frank
ApiFunction
in its name;
3. then go to CloudWatch console > select Log Groups on the left
4. because this is a Lambda@Edge function, you need to switch to the AWS region you made the request from, ie. eu-west-1
.
5. search for a log group that matches the function name in step 2, you should see a log group called /aws/lambda/us-east-1.ur-lambda-function-name
6. go into the log group, and select the first log streamFrank
Warwick Grigg
09/24/2021, 9:17 AMmodule.exports = {
env: {
TABLE_NAME: process.env.TABLE_NAME,
REGION: process.env.REGION,
}}
Nextjs info here
The serverless-nextjs repo's README has a FAQ about this.
PS Thanks Frank, your help was invaluable in tracking down the problemFrank
next.config.js
any more!Warwick Grigg
09/24/2021, 3:01 PMFrank
NextjsSiteProps
to all the Next.js Lambdas. For example this:
environment: {
API_URL: ...
}
You can reference process.env.API_URL
in Server Side Render, Incremental Static Regeneration, API routes, etc.Warwick Grigg
09/24/2021, 4:36 PMFrank