AWS Lambda Layers Step by Step Tutorial | Python Libraries Management

Sdílet
Vložit
  • čas přidán 13. 09. 2024

Komentáře • 40

  • @denistsur3060
    @denistsur3060 Před rokem +3

    you are first who explained about Linux/ Mac differences

  • @pa7235
    @pa7235 Před 5 měsíci

    very very very good tutorial! If all tutorials were made like this our lives would be significantly easier.

  • @renukasrivastava1167
    @renukasrivastava1167 Před 7 měsíci

    Great video. Thanks. Somethings were missing but still helped a lot

  • @georgesmith9178
    @georgesmith9178 Před rokem +2

    Awesome info, gave you a thumbs-up, of course. Two suggestions: 1. Show a simple diagram that explains install docker, create a container, then a python environment in that container, which then does all the work and spits out the zip file with the library outside the container (a picture is worth a thousand words). 2. Suggest using virtual box with a Linux VM as an alternative - not everyone like containers :)

  • @onieniola5579
    @onieniola5579 Před 9 měsíci

    Thanks for the detailed explanation, for window user you might want to change /bin/bash to //bin//bash

  • @capocianni1043
    @capocianni1043 Před rokem +3

    I had issues like image named aws_lambda_builder_image, you should first build it with "docker build . -t aws_lambda_builder_image"
    Then in runner_sh, add quotes on $container_name and $docker_image. It should look like "$container_name"

    • @suryakirankannaa
      @suryakirankannaa Před 6 měsíci

      Thank you for writing this. I was stuck at this step.

    • @suryakirankannaa
      @suryakirankannaa Před 6 měsíci

      Though the layer didn't work in my Lambda function. I got this error. "Unable to import module 'lambda_function': No module named 'pandas'"
      I did add both layers in Lambda function. And selected Python 3.8 for Lambda and Layers.

  • @kesterbelgrove818
    @kesterbelgrove818 Před 2 lety +7

    Hi, this did not work for me. It would be good if you would consider those of us who are starting at this point or at least direct us to resources to have all the libraries and dependencies installed and ready for this to work. I am supposing that there are dependencies missing since I am starting at this point. I'm going to look for a video that can give me the full setup and running. Thanks though

  • @harinijaan3779
    @harinijaan3779 Před 6 měsíci

    Thanks for detailed info

  • @chanpreetsingh007
    @chanpreetsingh007 Před rokem +5

    build the image first docker build . -t aws_lambda_builder_image

    • @tylersnard
      @tylersnard Před rokem

      @Felix you forgot to mention this step

  • @khandoor7228
    @khandoor7228 Před 2 lety +3

    Hey Felix quick Question, Why not create 1 layer with all your commonly used packages and reuse it for your different projects instead of a separate layer for individual packages? Can you go either way as your preference?

    • @FelixYu
      @FelixYu  Před 2 lety +2

      We can certainly create a layer with all the commonly used packages (that’s what a lot of ppl do at work actually). One thing to watch out for is..projects evolve over time, we will needa adjust the layers over time when new projects are added and stuff

    • @faynercosta7134
      @faynercosta7134 Před rokem

      I posted the solution on the comments.

  • @khandoor7228
    @khandoor7228 Před 2 lety

    Great job, great information, very relevant, very important

  • @indraalapati989
    @indraalapati989 Před rokem

    Thank you for explaining the layers concept. How are these layers helpful in production ? Because I don't want to edit the code on console in production and moreover the code is shared in the repo. Can we pass handler to layer along with libs to execute my business logic instead of editing directly on console ?

  • @MMeffert
    @MMeffert Před 2 lety +2

    Great video! Thank you. Can you supply the code you pasted?

    • @FelixYu
      @FelixYu  Před 2 lety

      Thank you. Let me check if I save it!!

    • @faynercosta7134
      @faynercosta7134 Před rokem

      I posted the solution on the comments.

  • @bessa0
    @bessa0 Před rokem +1

    I've been stuck for ages wondering why my package wasnt working. I was using windows and the Lambda linux xD

  • @suryakirankannaa
    @suryakirankannaa Před 6 měsíci

    Didn't work. I got this error. "Unable to import module 'lambda_function': No module named 'pandas'"
    I did add both layers in Lambda function. And selected Python 3.8 for Lambda and Layers.

  • @georgelza
    @georgelza Před rokem

    i'm stuck when trying to import confluent_kafka as a layer, it keeps saying can't find confluent_kafka.cimpl.
    I've even tried what you showed as 1:09, still same problem (as just a work around).
    curious, is there a permission that needs to be assigned to a lambda function to get access to a lambda layer ?

    • @georgelza
      @georgelza Před rokem

      maybe ignore me for now. lookalike your video might be covering my problems.
      are your files you create available by any chance, otherwise we have to retype it allllll

    • @georgelza
      @georgelza Před rokem

      trying to map your instructions onto how to make this work on a M1 based MAC.

  • @tylersnard
    @tylersnard Před rokem

    docker: Error response from daemon: pull access denied for aws_lambda_builder_image, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.

  • @mikecmw8492
    @mikecmw8492 Před 2 měsíci

    Too much for a lambda layer. Why would you even use docker?

  • @gautamdawar5067
    @gautamdawar5067 Před 2 lety +1

    does not work on windows

    • @faynercosta7134
      @faynercosta7134 Před rokem

      I posted the solution on the comments.

    • @sherrygirgis9540
      @sherrygirgis9540 Před rokem +2

      @@faynercosta7134 where's the solution?

    • @faynercosta7134
      @faynercosta7134 Před rokem

      @@sherrygirgis9540 I'm sorry, but the author may have deleted it.
      If I'm not misstaken, at the end what I did was to set up the packages in a layer via AWS CLI directly and upload to lambda from there.

  • @kharalanova
    @kharalanova Před 9 měsíci +3

    VERY DISAPPOINTING! The solution is half baked, and half explained and half demonstrated. DON'T WASTE YOUR TIME on this video and author. I should have guessed as soon as I saw that there is no repo to copy the scripts from and I had to type them.

  • @ManojKumar-zn2gf
    @ManojKumar-zn2gf Před 11 měsíci

    Thanks for the video, it was very clear and precise, In the same way, I wanted to use the azure-identity package with my aws lambda function so for that purpose I created a directory and installed the azure-identity package using the pip command then converted it into a zip file and uploaded it to AWS lambda function along with function.py file. When I ran the script I got the import error stating that
    Error Message: {
    "errorMessage": "Unable to import module 'lambda_function': cannot import name 'x509' from 'cryptography.hazmat.bindings._rust' (unknown location)",
    "errorType": "Runtime.ImportModuleError",
    "requestId": "3e17800f-0330-40f5-af54-69d860fbfdc1",
    "stackTrace": []
    } which is the dependent package for the azure-identity package. I would be grateful if you could please help me on how to fix this issue.

  • @StanislavSkibitskyi
    @StanislavSkibitskyi Před 9 měsíci

    this is old

  • @jacobskinner3108
    @jacobskinner3108 Před 2 lety

    p̳r̳o̳m̳o̳s̳m̳