Forum How do I...?

AWS Lambda on arm64 architecture?

zach.langner
Recently, I stood up a proof of concept lambda running using the AWS Lambda zip from your packages page. It was a great help, thank you for providing it.

Now, I'm wondering what the performance difference would be if the lambda was using arm64 instead of amd64. This AWS documentation says:
Lambda functions that use arm64 architecture (AWS Graviton2 processor) can achieve significantly better price and performance than the equivalent function running on x86_64 architecture. Consider using arm64 for compute-intensive applications such as high-performance computing, video encoding, and simulation workloads.


Do you think it would be possible in the near term for you to offer a lambda package that targets arm64? If not I think I can still get something functional using one of the arm64 builds from the latest page.

Any tips or things to look out for before I start on this project would be very much appreciated. I'm planning to use docker with a base image public.ecr.aws/lambda/dotnet:6-arm64 from the Amazone ECR Public Gallery.

Thanks
wangp
You can probably take the AWS Lambda package zip, delete the lib/ directory, and replace the prince-engine directory with the contents of the linux-generic-aarch64 package.
zach.langner
That is what I am hoping but it does have a parent /lib/ with 3 files:
libexpat.so.1
libfontconfig.so.1
libfreetype.so.6

I'm not sure if those also need to be updated to arm64 version or not.
wangp
You should delete those files. The aarch64 prince binary only needs the following shared libraries, which should be standard in any base image (though the exact versions may be a problem).

libc.so.6
libdl.so.2
libm.so.6
libpthread.so.0
librt.so.1