Multiple Lambda@Edge Function Not Supported?

Hello Guys,

I was able to try using serverless frame for my personal CI/CD task and it seems working fine, the code of Lambda@Edge has been updated and the updated Lambda@Edge function was attached to Cloudfront. Unfortunately, it seems the serverless does not support multiple Lambda@Edge functions?

For instance, I want to have 3 Lambda@Edge Functions and each have their own folder which contains “index.js”, see screenshot below for your reference.

untitled

When I run the serverless deploy command line, 3 Lambda@Edge Functions were created but the Cloudformation copied all 3 folders for each Lambda@Edge function. What I am expecting is that, the serverless will create 3 lambda@edge function and it will copy only the correct folder.

Not sure though if this is just a config problem on my local instance or the problem relies on the serverless framework.

Any inputs from your end is highly appreciated. Thanks

Regards,
Larry DC

Yes, multiple Lambda@Edge functions are supported. Your question seems to do more with packaging - you want each of those functions to package the code of just one function. See https://serverless.com/framework/docs/providers/aws/guide/packaging/#packaging-functions-separately for more information on how to do that.

1 Like

Thanks for your help. This is now considered as resolved.