I just followed the NextJS demo tutorial to the le...
# help
j
I just followed the NextJS demo tutorial to the letter - the live Lambda part worked fine then deployment to prod seemed ok, but on clicking the "Click Me" I got the lovely inline error: 503 Error, The lambda function associated with the Cloudfront distrib is invalid or doesn't have the required permissions.... this isn't inspiring much confidence for a first go I gotta say!
d
I’m not sure what your specific issue might be. But I’d recommend reviewing this thread regarding env variables and the nuance they have. https://serverless-stack.slack.com/archives/C01JG3B20RY/p1633529817256700
This might be some help with your issue.
j
Thanks Devin
r
I haven't done that specific demo but I wonder, are you able to call the lambda via Postman?
j
Not sure yet how to find its URL
d
Not sure yet how to find its URL
Do you mean the prod url?
j
the lambda URL in prod yea
r
It's printed to the terminal after deployment or you'd be able to find it in the API Gateway console in AWS.
j
right so you want to bypass cloudfront
I'll check
r
yeah, just narrowing things down - remove any frontend and cloudfront
f
@Justin Philpott did u manage to get this to work?
@Justin Philpott can you pin Next.js to v11 and give it a try?
j
I'll check this at some point today, thanks! 🙂