Lambda layers with Serverless Framework and good practices | Serverless

Поделиться
HTML-код
  • Опубликовано: 3 дек 2024
  • НаукаНаука

Комментарии • 41

  • @foobar_codes
    @foobar_codes  5 лет назад

    I answer a lot of your questions in this video: ruclips.net/video/aKD9Vftr6i4/видео.html
    Go and check it out to see if it helps you out!

    • @chen-li
      @chen-li 5 лет назад +1

      Thanks for the informative video! BTW, the link above seems to be pointing to this same video

    • @rsdraul
      @rsdraul 5 лет назад

      @@chen-li Yup, these seems to be the one for those looking:
      ruclips.net/video/FyB0dsUwRSI/видео.html

    • @ayami123
      @ayami123 2 года назад

      is the new one the same ?

  • @vtp-uk
    @vtp-uk 5 лет назад +9

    Can you make another video about how to create separate Lambda Layers (a serverless project) and integrate them to different Lambdas (other serverless projects)?

  • @nikhilvaka8899
    @nikhilvaka8899 4 года назад +1

    Thank You ..Nice explanation. It helps me lot.. How we can customize lambda layer within account in serverless yml file using Pseudo parameters.

  • @yankee-in-london
    @yankee-in-london 5 лет назад +2

    Thanks Foo Bar. Was interested in if you had any additional info the the “don’t do the layers in the same repo” comment? I use the Serverless framework and being able to have automatic linking between layer and function is quite useful. Wondering how to work around this constraint if possible.

    • @foobar_codes
      @foobar_codes  5 лет назад +1

      you can put the ARN of the layer in the serverless.yml and use two different serverless framework projects.

  • @jlu
    @jlu 2 года назад +1

    Doing
    package:
    patterns:
    - '!layers/**'
    - '!node_modules/**'
    Always returns 'No file matches include / exclude patterns' for me, any idea why?

  • @codingexpedition4625
    @codingexpedition4625 6 лет назад +1

    Nice video. Certainly something to explore. Did aws put the re:invent talk about layers online?

    • @foobar_codes
      @foobar_codes  6 лет назад

      Yes SRV375 - [NEW LAUNCH!] Lambda Layers
      But its a chalk talk so it wont be in youtube :(

  • @codenjourney6656
    @codenjourney6656 4 года назад +1

    Thanks for the excellent lecture

  • @nihas_a
    @nihas_a 3 года назад

    Doubt, can we use layers in a custom authoriser?

  • @binary-brackets
    @binary-brackets 4 года назад +1

    Thank you foobar, Nice explanation! it helps me lot!

  • @DiegoRFGonz88
    @DiegoRFGonz88 5 лет назад

    Is there a way to make the lambda function to point to the lastest version of the layer? without having to make the same as you in this video? (I have them layer-service in different projects)

  • @benderino42
    @benderino42 3 года назад

    Hey. The link for serverless course does not work. Could you send me a new one?

  • @juliansanchez5461
    @juliansanchez5461 5 лет назад +1

    Geniales tus videos !! saludos desde Colombia

  • @KevinToala96
    @KevinToala96 5 лет назад

    Muy buen video. Gracias.
    Si quisiera hacer este mismo proceso pero con un proyecto Javen y Maven, como se deberia de hacer esto ?. No encuentro ejemplos de esto

    • @KevinToala96
      @KevinToala96 5 лет назад +2

      Lo tengo.
      Las dependencias en maven deben de ser marcadas con el scope "provided" y generar una copia de todas las depedencias con mvn copy-dependencies, para asi generar un zip que se podra utilizar como lambda layer.

  • @fede_balderas
    @fede_balderas 6 лет назад +1

    If we have another Serverless service just with the layers, is it possible to deploy just one layer (when it changes) or we have to deploy the all service everytime?

    • @EDUSidekick
      @EDUSidekick 6 лет назад +2

      Yep! Layer can be managed as a completely separate project/folder and can have its own deployment life-cycle.

    • @fede_balderas
      @fede_balderas 6 лет назад +1

      Nice!!! thanks @@EDUSidekick

  • @carvalho_vini
    @carvalho_vini Год назад

    I did the process of creating a .zip with the contents of a chartjs-node-canvas lib, and uploading it to a layer. I took the ARN of that layer and put it in my function, but I always get the error "errorMessage": "ChartJSNodeCanvas is not define. what to do? please someone help me with this question...

  • @DanielPereiraBP
    @DanielPereiraBP 5 лет назад

    Is it possible to use "local invoke" working with layers?

  • @contractorwolf
    @contractorwolf 6 лет назад +1

    if you are putting your layers in another project, how do you reference them from the project that contains your functions?

    • @fede_balderas
      @fede_balderas 6 лет назад +5

      With the ARN of the layer: serverless.com/framework/docs/providers/aws/guide/layers#using-your-layers
      functions:
      hello:
      handler: handler.hello
      layers:
      - arn:aws:lambda:region:XXXXXX:layer:LayerName:Y

    • @contractorwolf
      @contractorwolf 6 лет назад +1

      @@fede_balderas nice! thanks for the quick reply (and great content)

  • @tomding2789
    @tomding2789 4 месяца назад

    What if there are multiple projects using the same layer, and I want to develop under vscode, how to address with code intelligence? because the layer is up on aws, Thanks

  • @orrlevinger
    @orrlevinger 4 года назад

    can i make just a node_modules layer that points to the node_modules directory as default layer and point all my lambdas to it until i create a more granular layer? and than all my lambdas will be small?

  • @kiranmarati1201
    @kiranmarati1201 5 лет назад

    When we update layer package, will my lambda function automatically picks latest version of layer or do we also need to update the latest version of layer in lambda function.?

  • @kristofferhaukaasberg6258
    @kristofferhaukaasberg6258 6 лет назад

    Great explanation, thanks:) I ended up deploying functions individually instead of full deploy, and it worked great. So fast! Just a quick question: would a big library like Chrome puppeteer work in a layer like this you think? (haven't checked the size and howto, but I theory, would it work?).

    • @foobar_codes
      @foobar_codes  5 лет назад

      I have not tried that but there is an layer for it, so i imagine it can work github.com/mthenw/awesome-layers

  • @TheMainCOW
    @TheMainCOW 5 лет назад

    Hello! I am trying to run my Lambda function locally using AWS SAM and I have created TensorFlow Layer. But every time I try to run my function I get following error: error while loading shared libraries: libtensorflow.so: cannot open shared object file: No such file or directory. Any idea how can I fix this?

  • @thecloudfunction894
    @thecloudfunction894 5 лет назад

    have u been able to access to files into layers? when I try to require('/opt/layerPath/file') it cannot find the route

  • @youtubedemointegrator6836
    @youtubedemointegrator6836 5 лет назад

    any idea how we can access FFmpeg in lambda function for extract image from s3 video

  • @shacco6563
    @shacco6563 5 лет назад +1

    thank you

  • @JoshuaVillena-k4n
    @JoshuaVillena-k4n Год назад

    Someone has this error when try execute sls package ?
    ERROR: Cannot read file node_moduñes/.. - EMFILE: too many open files

  • @AbhijitSrivastava
    @AbhijitSrivastava 5 лет назад

    I appreciate the effort but there are few mistakes. Example, you can wrap layers in nodejs folder, and avoid changing the node path.

    • @shacco6563
      @shacco6563 5 лет назад

      it is not a mistake. yes you can do that but any time you deploy you create a new version. you wont be able to separate devdependencies from dependencies and you will have a huge layer probably so huge that will pass the limits. so listen to her and do separated projects ymls for your layers

  • @alexnguyen411
    @alexnguyen411 2 года назад

    Please code sample link in video 😍😍😍😍