serverless-nextjs / serverless-next.js

⚡ Deploy your Next.js apps on AWS Lambda@Edge via Serverless Components
MIT License
4.47k stars 457 forks source link

regeneration lambda arm64 #2134

Open moshfrid opened 2 years ago

moshfrid commented 2 years ago

Is there any way to run the lambda functions on the arm64 lambda architecture?

thiskevinwang commented 2 years ago

It looks like Lambda@Edge doesn't yet support arm64 architecture.

So, defaultNextLambda, nextApiLambda, nextImageLambda (all lambda @ edge) won't be able to be run on Arm64 arch.

The only regular lambda is the regenerationFunction for ISR, which could potentially run on Arm64

moshfrid commented 2 years ago

I see the restriction in the link you provided, however, weirdly enough I was able to simply switch the architecture on the lambda@edge image optimization function and its working correctly (and faster).

Screenshot 2021-11-30 110500_LI

thiskevinwang commented 2 years ago

@moshfrid 💭 you might be seeing a false positive (with the speed boost)? 🤔

Given that it's an Edge lambda, you'd need to deploy a new version. (But I wouldn't recommend doing so manually, since all this is managed through CDK/CloudFormation, and it's best to avoid "drift" due to manual editing)

image

moshfrid commented 2 years ago

You are absolutely correct, my bad, still would be nice to be able to take advantage of the arm architecture for the regeneration lambda.