Best Practices for Layer Management in Serverless Environments

Hello everybody, I was wondering if there is any good practice or recommendations for serverless environments. The reason I am asking are layers and how they are created. In a normal server environment, it is fine to create all the layers at once because you only pay that cost once, and then every time you access the layer, you get the cache/memoized.

But in a serverless environment where each instance starts from scratch, each request creates the entire environment, I'm not sure if the same rules apply. Will it be better to move the dependency requirements to the edges and have the different services provided on a per-function or per-handler basis? or will a different approach to build layers like more specialized layers be recommended in this kind of scenario?
Was this page helpful?