AWS Lambda Layers Step by Step Tutorial | Python Libraries Management

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

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

  • @denistsur3060
    @denistsur3060 Год назад +3

    you are first who explained about Linux/ Mac differences

  • @pa7235
    @pa7235 7 месяцев назад

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

  • @renukasrivastava1167
    @renukasrivastava1167 9 месяцев назад

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

  • @georgesmith9178
    @georgesmith9178 2 года назад +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 11 месяцев назад

    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 9 месяцев назад

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

    • @suryakirankannaa
      @suryakirankannaa 9 месяцев назад

      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.

  • @harinijaan3779
    @harinijaan3779 8 месяцев назад

    Thanks for detailed info

  • @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

  • @chanpreetsingh007
    @chanpreetsingh007 Год назад +6

    build the image first docker build . -t aws_lambda_builder_image

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

      @Felix you forgot to mention this step

  • @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 2 года назад +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 года назад +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 2 года назад

      I posted the solution on the comments.

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

    Great job, great information, very relevant, very important

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

      Thanks mate!!

  • @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 2 года назад

      I posted the solution on the comments.

  • @suryakirankannaa
    @suryakirankannaa 9 месяцев назад

    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.

  • @bessa0
    @bessa0 Год назад +1

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

  • @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 4 месяца назад

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

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

    does not work on windows

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

      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.

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

    this is old

  • @kharalanova
    @kharalanova 11 месяцев назад +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.

  • @mobinansarivlog9126
    @mobinansarivlog9126 9 дней назад

    Too good

  • @ManojKumar-zn2gf
    @ManojKumar-zn2gf Год назад

    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.

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

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