https://github.com/cloudtechmasters/p...
Lambda layers allow us to share code among lambda functions. We just have to upload the layer once and reference it in any lambda function.
The code in a layer could be anything. It could be dependencies, configurations, helper functions i.e. Logging, Recording metrics, etc…
We can link up-to five lambda layers per function where one of that can optionally be a custom runtime e.g. Python, Nodejs, etc.. However adding your custom runtime is not the most frequent use-case for lambda layers but sharing code across your serverless microservices.
The main purpose of a lambda layer is to avoid duplicate codes across many lambdas thereby promote separation of concerns design principle.
Before lambda layers, developers used to either duplicate common code in every lambda function or create local npm packages and refer them in lambdas. Now with lambda layers, you can securely share code among your lambda functions in the same AWS account, cross-accounts or in public.
Sur cette page du site, vous pouvez voir la vidéo en ligne AWS | Project | AWS Lambda Layers for Python | How to use Lambda Layers in Lambda Function| Part-5 durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Cloud Tech Masters 20 septembre 2020, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 3,917 fois et il a aimé 30 téléspectateurs. Bon visionnage!