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 - วิทยาศาสตร์และเทคโนโลยี
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.
Nice example and explanation!!
Glad it helped!
Excellent explanation. Thank you so much for your effort.
You are welcome
Very good explanation for beginners. Thank you :)
You're very welcome!
Really Liked it
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.
Glad it was helpful!
No, it isn't.
One of the best explaination.
You are welcome
Succinct explanation! Thanks for the collaboration.
Cheers to that
best tutorial! thanks
Best explanation. Thanks
You are welcome!
very useful session. Thank You :)
Glad it was helpful!
Great video, Thanks!
Glad you liked it!
Nice work Bro!! Thanks for making it so simple.
Glad it helped
really useful and well explained. Have you any advice or pointers on how to include non-default libraries in the zip file? thanks again
Superb explanation possibly cover real-time
Noted
You are a genius !
You are welcome
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
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!!!
Surely I will add it to my list
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?
Thank you.
Welcome
I already have a role created for Lambda function in IAM console. How to use that role directly?
I have a one question how to create blue green deployment using lambda function with ansible scripts
Its great 😃👍
Thank you! Cheers!
Thank you very much, it helped in resolving my error while giving handler
Glad it helped you
Is it possible to locally debug the lambda function before deploying? (Same way we can do it with AWS SAM)
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?
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
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.
Great suggestion! But not covered yet
still working!
Pretty easy to add layers and the policy to write files to s3!
Thanks very much for sharing it.
how to search path of /.aws/credential file?
1. in our personal windows laptop
2. in our aws ec2 machine with amazonlinux2 os
thank you
Welcome
@@RahulWagh Do you have a tutorial for terraform to spin up an ECS fargate?
can i just execite just lambda in terraform with actually creating it?
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!
Hey thanks for noticing I will share GitHub repo soon
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?
Hi Rahul can we automate the testing process as well
Yes offcourse it is possible to automate the testing process
❤
Cool but how do you create a trigger for that Lambda?
You can create a trigger it is upto you how you wanna implement it
Great video rahul. Could you please paste the link to the github repo. I can't see it on the comment section. thank you
Here it is - github.com/rahulwagh/Terraform-Topics/tree/master/aws-lambda
How to add lambda test events in terraform?
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
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.
Thanks for noticing
Repo link?
Good evening Rahul
Hey prashant
❤❤❤❤❤❤
Cheers!
can i get the code repo git link
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
Could you please paste the link to the github repo
Here it is - github.com/rahulwagh/Terraform-Topics/tree/master/aws-lambda
can i get source code of this
Here is the code repo for this - github.com/rahulwagh/Terraform-Topics/tree/master/aws-lambda
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.
You can clone the source code and zip it
❤
You are welcome