Intro to AWS Lambda with Python | AWS Lambda Python Tutorial

///Intro to AWS Lambda with Python | AWS Lambda Python Tutorial

Intro to AWS Lambda with Python | AWS Lambda Python Tutorial

FavoriteLoadingAdd to favorites

Join us in this video tutorial we walk through step-by-step how to write AWS Lambda functions in Python to interact with S3 and DynamoDB.

Topics covered include: AWS Lambda functions, Python, Python Boto3 SDK, DynamoDB, S3

Intro to AWS Lambda (NodeJS / Javascript version):

source

By |2020-09-28T09:45:44+00:00September 28th, 2020|Python Video Tutorials|42 Comments

42 Comments

  1. Anuj Dhiman September 28, 2020 at 9:45 am - Reply

    Thank you so much for such a great explanation step by step

  2. rajsona September 28, 2020 at 9:45 am - Reply

    Liked the way you are teaching and resolving errors on the go.

  3. Yogesh Agrawal September 28, 2020 at 9:45 am - Reply

    checkout this link for lambda function :
    https://cloudtechsavvy.com/2020/08/10/aws-lambda-101/

  4. Aashish Mainali September 28, 2020 at 9:45 am - Reply

    You sound like Eminem. 😀

  5. Noah Broyles September 28, 2020 at 9:45 am - Reply

    "I'm missing my colon"

  6. alexander September 28, 2020 at 9:45 am - Reply

    liked just because of minecraft

  7. Aravind Padigala September 28, 2020 at 9:45 am - Reply

    “`

    import json
    import boto3

    dynamodb = boto3.resource('dynamodb')
    table = dynamodb.Table('planets')

    def lambda_handler(event, context):
    response = table.get_item(
    key={
    'id': 'mercury'
    }
    )
    print(response)
    return {
    'statusCode': 200,
    'body': response
    }

    “`
    whats wrong my code getting error
    “`
    "errorMessage": "Parameter validation failed:nMissing required parameter in input: "Key"nUnknown parameter in input: "key", must be one of: TableName, Key, AttributesToGet, ConsistentRead, ReturnConsumedCapacity, ProjectionExpression, ExpressionAttributeNames",
    "errorType": "ParamValidationError",
    "stackTrace": [
    " File "/var/task/lambda_function.py", line 8, in lambda_handlern response = table.get_item(n",
    “`

    Role has got the correct permissions
    And Table created as mentioned in the video

  8. divesh keswani September 28, 2020 at 9:45 am - Reply

    New videos coming? Eagerly waiting 🙂

  9. Jacob SP September 28, 2020 at 9:45 am - Reply

    the js-caused mental damage shows

  10. Febin Mohammed September 28, 2020 at 9:45 am - Reply

    Please continue doing videos with pyton. Thaknx👍🏻

  11. Imad Amahmid September 28, 2020 at 9:45 am - Reply

    beautiful and fun tutorial! thanks sir

  12. Carlos Alan Jiménez Avila September 28, 2020 at 9:45 am - Reply

    Thank youuuuuuuu!!!!!!!!!!!!!!!

  13. Marc McRae September 28, 2020 at 9:45 am - Reply

    Like most people here, am learning, specifically python and how to use it within AWS. This tied a whole bunch of tech and concepts together for me. Really appreciate this kind of sharing, with real-time errors. Thank you.

  14. Affan Shahab September 28, 2020 at 9:45 am - Reply

    Helpful content

  15. chaitanya kumar September 28, 2020 at 9:45 am - Reply

    I enjoyed troubleshooting which is unconventional content creation…sub'ed instantly. Looking forward to see more videos on Boto3/python and AWS combination. way to go.

  16. Swathi NR September 28, 2020 at 9:45 am - Reply

    Exactly what I was looking for. Brilliant video!! Liked, subscribed 🙂

  17. Jeff Carson September 28, 2020 at 9:45 am - Reply

    EXCELLENT VIDEO! Thank you!

  18. Aakansha Jain September 28, 2020 at 9:45 am - Reply

    Thanks for sharing video, very informative.

    But I'm getting below error while trying to put item in DynamoDB and it is not clear to me. Could you please help me on this.
    Where I'm missing, I'm following your steps as u mentioned in the Video but still nt able to do…

    Response:
    {
    "errorMessage": "2020-06-13T14:09:54.866Z 1b4ed8e4-9e7e-4f21-9b18-59e7a43afe92 Task timed out after 3.00 seconds"
    }

    Request ID:
    "1b4ed8e4-9e7e-4f21-9b18-59e7a43afe92"

    Function Logs:
    START RequestId: 1b4ed8e4-9e7e-4f21-9b18-59e7a43afe92 Version: $LATEST
    [ERROR] NameError: name 'dynamodb' is not defined
    Traceback (most recent call last):
      File "/var/lang/lib/python3.8/imp.py", line 234, in load_module
        return load_source(name, filename, file)
      File "/var/lang/lib/python3.8/imp.py", line 171, in load_source
        module = _load(spec)
      File "<frozen importlib._bootstrap>", line 702, in _load
      File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 783, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/var/task/lambda_function.py", line 4, in <module>
        dynamodb = boto3.resource(dynamodb)END RequestId: 1b4ed8e4-9e7e-4f21-9b18-59e7a43afe92
    REPORT RequestId: 1b4ed8e4-9e7e-4f21-9b18-59e7a43afe92 Duration: 3003.44 ms Billed Duration: 3000 ms Memory Size: 128 MB Max Memory Used: 21 MB
    2020-06-13T14:09:54.866Z 1b4ed8e4-9e7e-4f21-9b18-59e7a43afe92 Task timed out after 3.00 seconds

  19. Bisma Akram September 28, 2020 at 9:45 am - Reply

    hey, Im getting an error, s3.Bucket(name='test283393') is not JSON serializable, can you help me resolve it.

  20. Sameer Bhatia September 28, 2020 at 9:45 am - Reply

    can i run curl commands from aws lambda? please share!!

  21. Mohan Kumar September 28, 2020 at 9:45 am - Reply

    Great stuff Man. Thanks for uploading.

  22. Bilal Malik September 28, 2020 at 9:45 am - Reply

    Why does it automatically add the destination as Amazon Cloud Watch Logs on yours?

  23. Zachary Gonzales September 28, 2020 at 9:45 am - Reply

    Thank you for uploading this tutorial. This has given me the confidence to go forth and learn python by creating lambda functions!

  24. Ant Johnson September 28, 2020 at 9:45 am - Reply

    Subbed, a good and honest walk through. Really helped me with Lambdas thanks 🙂

  25. Jason McNulty September 28, 2020 at 9:45 am - Reply

    Great video, I enjoyed seeing you make mistakes and how you resolved them!

  26. Himanshu Gupta September 28, 2020 at 9:45 am - Reply

    Those errors were really helpful! Thanks for a great video!

  27. Peter Lom September 28, 2020 at 9:45 am - Reply

    Very nice tutorial! Non-sarcastic comment: your tiny hiccups made this EXCELLENT because you showed us how to locate errors.

  28. Psycho Buddha September 28, 2020 at 9:45 am - Reply

    Awesome tutorial! I recently started learning AWS, and I will need to combine it with Python, so this really helped. I am just curious why do have to pass event and context every time, if we're not using it? Also, do we must return a dict with statusCode and body, why we just don't return the content?

  29. Palash Sarkar September 28, 2020 at 9:45 am - Reply

    I like your style wherein you encounter issues and solve them on the fly. Thank you..

  30. Hycinth HerGroves September 28, 2020 at 9:45 am - Reply

    Excellent! Thank you!

  31. Hasif Zulkifli September 28, 2020 at 9:45 am - Reply

    Thanks for this tutorial! Ive tried many nodejs but python makes my life easier with this tut!

  32. coder coder September 28, 2020 at 9:45 am - Reply

    missed colon 12:30

  33. Tyler Davis September 28, 2020 at 9:45 am - Reply

    I agree with the others. You leaving the errors in the video was super helpful to me. It really cleared up a lot of the questions I was having on permissions. Thank you so much!

  34. Ted Manasa September 28, 2020 at 9:45 am - Reply

    Great video, really helpful! I’ll use this to get my own serverless Python web app up and running. Thanks!

  35. SRIDHAR B September 28, 2020 at 9:45 am - Reply

    Awesome video , please upload more videos on Lambda with Python

  36. Natnael Ganoro September 28, 2020 at 9:45 am - Reply

    How does it know to put an item for put_item and to return an item for get_item, are they functions?

  37. Manish arora September 28, 2020 at 9:45 am - Reply

    great video !! Thank you. Good troublehsooting

  38. Kundan Kumar September 28, 2020 at 9:45 am - Reply

    Great job…keep up the good work. It was really helpful. Your content was very good.

  39. pcomalumni September 28, 2020 at 9:45 am - Reply

    very good. thank you

  40. Ben Weaver September 28, 2020 at 9:45 am - Reply

    This is one of the best tutorials I have seen in a long time. It was candid and practical. It started with a very simple example that nevertheless showed most of the many setup details for lamdas. These details of setup are not obvious to the newcomer, but the tutorial explained them very clearly. Then it moved on to other very useful examples, like accessing a database also in AWS. Along the way, the author courageously showed, and then very well explained, what kind of mistakes python newbies like myself might make. Excellent.

  41. Subhajit Mishra September 28, 2020 at 9:45 am - Reply

    That helped me a lot. Thanks for he video and also can you please make a video on how to get data from a form or any dynamic page and store it in dynamodb using lambda and apigateway ! Also if possible please make a video abt how to use boto3 commands(u know the aws boto3 documents)

Leave A Comment

*