AWS Lambda Layers Step by Step Tutorial | Python Libraries Management

Поділитися
Вставка
  • Опубліковано 5 вер 2024

КОМЕНТАРІ • 40

  • @denistsur3060
    @denistsur3060 Рік тому +3

    you are first who explained about Linux/ Mac differences

  • @pa7235
    @pa7235 5 місяців тому

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

  • @georgesmith9178
    @georgesmith9178 Рік тому +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 9 місяців тому

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

  • @capocianni1043
    @capocianni1043 Рік тому +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 6 місяців тому

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

    • @suryakirankannaa
      @suryakirankannaa 6 місяців тому

      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.

  • @renukasrivastava1167
    @renukasrivastava1167 6 місяців тому

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

  • @chanpreetsingh007
    @chanpreetsingh007 Рік тому +5

    build the image first docker build . -t aws_lambda_builder_image

    • @tylersnard
      @tylersnard Рік тому

      @Felix you forgot to mention this step

  • @kesterbelgrove818
    @kesterbelgrove818 2 роки тому +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 5 місяців тому

    Thanks for detailed info

  • @khandoor7228
    @khandoor7228 2 роки тому

    Great job, great information, very relevant, very important

  • @indraalapati989
    @indraalapati989 Рік тому

    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 ?

  • @khandoor7228
    @khandoor7228 Рік тому +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  Рік тому +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 Рік тому

      I posted the solution on the comments.

  • @MMeffert
    @MMeffert 2 роки тому +2

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

    • @FelixYu
      @FelixYu  2 роки тому

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

    • @faynercosta7134
      @faynercosta7134 Рік тому

      I posted the solution on the comments.

  • @bessa0
    @bessa0 Рік тому +1

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

  • @suryakirankannaa
    @suryakirankannaa 6 місяців тому

    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 Рік тому

    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 Рік тому

      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 Рік тому

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

  • @tylersnard
    @tylersnard Рік тому

    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 2 місяці тому

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

  • @gautamdawar5067
    @gautamdawar5067 2 роки тому +1

    does not work on windows

    • @faynercosta7134
      @faynercosta7134 Рік тому

      I posted the solution on the comments.

    • @sherrygirgis9540
      @sherrygirgis9540 Рік тому +2

      @@faynercosta7134 where's the solution?

    • @faynercosta7134
      @faynercosta7134 Рік тому

      @@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 8 місяців тому +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 11 місяців тому

    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 9 місяців тому

    this is old

  • @jacobskinner3108
    @jacobskinner3108 2 роки тому

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