How do I deploy AWS Lambda using Terraform?

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ส.ค. 2024
  • Learn More about terraform - jhooq.com/categories/terraform/
    GitHub Repo - github.com/rahulwagh/Terrafor...
    AWS Lambda allows you to execute the code without any server and if you are using Terraform to manage your AWS infrastructure then you can use AWS Lambda module to write your Lambda implementation using Terraform. AWS Lambda natively supports Java, Go, PowerShell, Node. js, C#, Python, and Ruby.
    In this lab session, we will go through the following steps -
    1. What is AWS Lambda?
    2. What is work flow of AWS lmabda along with Terraform?
    3. How to write AWS Lambda using Terraform?
    4. How to verify your AWS Lambda created by Terraform
    5. How to create test event for AWS Lambda?
    ▬▬▬▬▬▬ ⭐️ 🕘Timestamps ⭐️ ▬▬▬▬▬▬
    0:00 - Intro
    1:53 - Terraform AWS Lambda workflow
    03:53 - AWS Lambda python code and Project structure
    04:52 - Terraform modules needed for implementing AWS Lambda
    06:30 - Demo
    15:26 - Verify AWS Lambda
    To learn more on DevOps visit - jhooq.com/
    For more official documentation refer to - www.terraform.io/
    Disclaimer/Policy: All the content/instructions are solely mine. The source is completely open-source.
    Video is copyrighted and can not be re-distributed on any platform.
    #github #devops #terraform #aws
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 82

  • @stevenchavez706
    @stevenchavez706 2 ปีที่แล้ว +1

    Great video! Thank you. I would love to see a small example of passing variables from Terraform to the Lambda's Python script... a common use case for automation/modularization.

  • @anilpatil8299
    @anilpatil8299 13 ชั่วโมงที่ผ่านมา

    Nice example and explanation!!

    • @RahulWagh
      @RahulWagh  13 ชั่วโมงที่ผ่านมา

      Glad it helped!

  • @malikabdullah100
    @malikabdullah100 ปีที่แล้ว

    Excellent explanation. Thank you so much for your effort.

    • @RahulWagh
      @RahulWagh  ปีที่แล้ว

      You are welcome

  • @xhoitravel
    @xhoitravel ปีที่แล้ว

    Very good explanation for beginners. Thank you :)

    • @RahulWagh
      @RahulWagh  ปีที่แล้ว

      You're very welcome!

  • @atulsachan3908
    @atulsachan3908 ปีที่แล้ว

    Really Liked it

  • @dissident4383
    @dissident4383 7 หลายเดือนก่อน +2

    By far the best explanation of this on TH-cam. Thank you for going through each step clearly instead of the others who just provide the example with no explanation.

    • @RahulWagh
      @RahulWagh  7 หลายเดือนก่อน

      Glad it was helpful!

    • @dus10dnd
      @dus10dnd 3 หลายเดือนก่อน

      No, it isn't.

  • @AwargiforSirTarar
    @AwargiforSirTarar ปีที่แล้ว

    One of the best explaination.

    • @RahulWagh
      @RahulWagh  ปีที่แล้ว

      You are welcome

  • @philippesantossimoes9241
    @philippesantossimoes9241 4 หลายเดือนก่อน

    Succinct explanation! Thanks for the collaboration.

    • @RahulWagh
      @RahulWagh  4 หลายเดือนก่อน

      Cheers to that

  • @CuteBoy735
    @CuteBoy735 3 วันที่ผ่านมา

    best tutorial! thanks

  • @sotolaolusegun3955
    @sotolaolusegun3955 5 หลายเดือนก่อน

    Best explanation. Thanks

    • @RahulWagh
      @RahulWagh  5 หลายเดือนก่อน

      You are welcome!

  • @pritamdeokule
    @pritamdeokule 4 หลายเดือนก่อน

    very useful session. Thank You :)

    • @RahulWagh
      @RahulWagh  4 หลายเดือนก่อน

      Glad it was helpful!

  • @paoloblaquera-guitarist461
    @paoloblaquera-guitarist461 9 หลายเดือนก่อน

    Great video, Thanks!

    • @RahulWagh
      @RahulWagh  9 หลายเดือนก่อน

      Glad you liked it!

  • @praveenbhogade
    @praveenbhogade ปีที่แล้ว +2

    Nice work Bro!! Thanks for making it so simple.

    • @RahulWagh
      @RahulWagh  ปีที่แล้ว

      Glad it helped

  • @aaronholt6595
    @aaronholt6595 ปีที่แล้ว

    really useful and well explained. Have you any advice or pointers on how to include non-default libraries in the zip file? thanks again

  • @RahulPatil-st3bu
    @RahulPatil-st3bu 5 หลายเดือนก่อน

    Superb explanation possibly cover real-time

    • @RahulWagh
      @RahulWagh  5 หลายเดือนก่อน +1

      Noted

  • @fauxz3782
    @fauxz3782 9 หลายเดือนก่อน

    You are a genius !

    • @RahulWagh
      @RahulWagh  9 หลายเดือนก่อน

      You are welcome

  • @olanrewajubakare451
    @olanrewajubakare451 ปีที่แล้ว +1

    Hi Rahul, its nicely done video especially for beginners. you mentioned you added code in git and shared a link , but actually it isn't there, could you add it, Thank you

  • @pawanbasu350
    @pawanbasu350 2 ปีที่แล้ว +1

    Please also create a video on creating the EKS cluster along with its IAM roles and vertical scaling on the cluster using the terraform.Please!!!

    • @RahulWagh
      @RahulWagh  2 ปีที่แล้ว +1

      Surely I will add it to my list

  • @mandlaanilbabu
    @mandlaanilbabu ปีที่แล้ว

    Great video and thank you, then how we can create alarms based on lambda monitoring how we can do using terraform?
    please help me here?

  • @AriKhuu
    @AriKhuu 9 หลายเดือนก่อน

    Thank you.

    • @RahulWagh
      @RahulWagh  9 หลายเดือนก่อน

      Welcome

  • @PTM1008
    @PTM1008 ปีที่แล้ว

    I already have a role created for Lambda function in IAM console. How to use that role directly?

  • @parames3039
    @parames3039 2 ปีที่แล้ว

    I have a one question how to create blue green deployment using lambda function with ansible scripts

  • @kartikeyasingh2798
    @kartikeyasingh2798 11 หลายเดือนก่อน

    Its great 😃👍

    • @RahulWagh
      @RahulWagh  11 หลายเดือนก่อน

      Thank you! Cheers!

  • @sumanth8576
    @sumanth8576 9 หลายเดือนก่อน

    Thank you very much, it helped in resolving my error while giving handler

    • @RahulWagh
      @RahulWagh  9 หลายเดือนก่อน

      Glad it helped you

  • @koemdjiev
    @koemdjiev ปีที่แล้ว

    Is it possible to locally debug the lambda function before deploying? (Same way we can do it with AWS SAM)

  • @harikamorisetti3360
    @harikamorisetti3360 ปีที่แล้ว

    I have a requirement where I need to place the zip file in specified S3 bucket. Where should I place bucket details in tf files? Can you please explain?

  • @AshishKumar-dl2mc
    @AshishKumar-dl2mc 2 ปีที่แล้ว

    Can you make video for doing crud operation of IAM user into Dynamodb using flask framework and deploy that flask app using api gateway, lambda, dynmodb

  • @luc917
    @luc917 5 หลายเดือนก่อน

    Great explanation, i have been struggling with the iam role creation and attachment . Do you cover trigger in any future videos ex s3 file type uploaded to s3 triggers lambda sending to sqs or insert to db table? This seems as if it would cover so many scenarios.

    • @RahulWagh
      @RahulWagh  5 หลายเดือนก่อน

      Great suggestion! But not covered yet

  • @gabrielmartinphilot980
    @gabrielmartinphilot980 2 หลายเดือนก่อน

    still working!
    Pretty easy to add layers and the policy to write files to s3!
    Thanks very much for sharing it.

  • @hemantpharande2567
    @hemantpharande2567 2 ปีที่แล้ว

    how to search path of /.aws/credential file?
    1. in our personal windows laptop
    2. in our aws ec2 machine with amazonlinux2 os

  • @AriKhuu
    @AriKhuu 9 หลายเดือนก่อน

    thank you

    • @RahulWagh
      @RahulWagh  9 หลายเดือนก่อน

      Welcome

    • @AriKhuu
      @AriKhuu 9 หลายเดือนก่อน

      @@RahulWagh Do you have a tutorial for terraform to spin up an ECS fargate?

  • @2mahender
    @2mahender ปีที่แล้ว

    can i just execite just lambda in terraform with actually creating it?

  • @somefunwithpal2627
    @somefunwithpal2627 2 ปีที่แล้ว +2

    Hi, its nicely done video especially for beginners. you mentioned you added code in git and shared a link , but actually it isnt there, could you add it, TQ!

    • @RahulWagh
      @RahulWagh  2 ปีที่แล้ว

      Hey thanks for noticing I will share GitHub repo soon

  • @emekaanachebe415
    @emekaanachebe415 9 หลายเดือนก่อน

    is it a good idea put the zip file in the same python directory?
    doesn't that mean that whenever the file is zipped again, the old zip file would be zipped along with the code?

  • @VGaming-msv
    @VGaming-msv 9 หลายเดือนก่อน

    Hi Rahul can we automate the testing process as well

    • @RahulWagh
      @RahulWagh  9 หลายเดือนก่อน

      Yes offcourse it is possible to automate the testing process

  • @rajashekarvt3799
    @rajashekarvt3799 ปีที่แล้ว

  • @MrMadmaggot
    @MrMadmaggot 3 หลายเดือนก่อน

    Cool but how do you create a trigger for that Lambda?

    • @RahulWagh
      @RahulWagh  3 หลายเดือนก่อน

      You can create a trigger it is upto you how you wanna implement it

  • @olanrewajubakare451
    @olanrewajubakare451 ปีที่แล้ว

    Great video rahul. Could you please paste the link to the github repo. I can't see it on the comment section. thank you

    • @RahulWagh
      @RahulWagh  ปีที่แล้ว

      Here it is - github.com/rahulwagh/Terraform-Topics/tree/master/aws-lambda

  • @mimathew1
    @mimathew1 4 หลายเดือนก่อน

    How to add lambda test events in terraform?

    • @RahulWagh
      @RahulWagh  4 หลายเดือนก่อน

      You should use aws_lambda_function_event_invoke_config here is the link for the reference- registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_function_event_invoke_config

  • @dus10dnd
    @dus10dnd 3 หลายเดือนก่อน

    Dude... you don't need a depends_on in your aws_lambda_function resource. You specify the role and that automatically establishes the dependency mapping within Terraform. In addition, the filename argument should not be a literal string. It should data.archive_file.zip_the_python_code.output_path.

    • @RahulWagh
      @RahulWagh  3 หลายเดือนก่อน

      Thanks for noticing

  • @ZachariBarnes
    @ZachariBarnes ปีที่แล้ว

    Repo link?

  • @prashantsukhadeve9642
    @prashantsukhadeve9642 2 ปีที่แล้ว

    Good evening Rahul

    • @RahulWagh
      @RahulWagh  2 ปีที่แล้ว

      Hey prashant

  • @sahadevdahit
    @sahadevdahit 4 หลายเดือนก่อน

    ❤❤❤❤❤❤

    • @RahulWagh
      @RahulWagh  4 หลายเดือนก่อน

      Cheers!

  • @veeranarayanaganji5293
    @veeranarayanaganji5293 ปีที่แล้ว +1

    can i get the code repo git link

    • @RahulWagh
      @RahulWagh  ปีที่แล้ว

      Here is the git repo link - github.com/rahulwagh/Terraform-Topics/tree/master/aws-lambda
      Please hit a star button on github repo link if you really liked the content

  • @chuckhughes6090
    @chuckhughes6090 ปีที่แล้ว

    Could you please paste the link to the github repo

    • @RahulWagh
      @RahulWagh  ปีที่แล้ว

      Here it is - github.com/rahulwagh/Terraform-Topics/tree/master/aws-lambda

  • @2mahender
    @2mahender ปีที่แล้ว

    can i get source code of this

    • @RahulWagh
      @RahulWagh  ปีที่แล้ว

      Here is the code repo for this - github.com/rahulwagh/Terraform-Topics/tree/master/aws-lambda

  • @tatajsr13
    @tatajsr13 10 หลายเดือนก่อน

    Why are you using lambda source in Terraform? This is not practical solution, we need to refer actual zip file from source version control systems like Azure, GitHub etc where the actual zip file will be build. Please let us know how to do that.

    • @rishabhbhatnagar6795
      @rishabhbhatnagar6795 3 หลายเดือนก่อน

      You can clone the source code and zip it

  • @kamkum2k
    @kamkum2k ปีที่แล้ว

    • @RahulWagh
      @RahulWagh  ปีที่แล้ว

      You are welcome