AWS Lambda is a serverless computing platform that lets users run code without provisioning or managing servers. With Lambda, users can run code for virtually any type of app or backend service—all with zero administration. It takes of requirements to run and scale code with high availability.
$NaN
Per 1 ms
HashiCorp Terraform
Score 8.5 out of 10
N/A
Terraform from HashiCorp is a cloud infrastructure automation tool that enables users to create, change, and improve production infrastructure, and it allows infrastructure to be expressed as code. It codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned. It is available Open Source, and via Cloud and Self-Hosted editions.
I have used Azure Functions and Google Cloud Functions. In comparison, AWS Lambda is a bit more difficult to configure out of the gate. But in most cases once the function is in place and running the operation becomes completely hands-off. While I've used Azure Functions and …
I can't find these applications listed, but other IaC tools I have used include: AWS CloudFormation, Azure Resource Manager Templates, and GCP Cloud Deployment Templates. For a comparable tool, I have the most experience with CloudFormation.
Scenarios where AWS Lambda is well suited: 1. When we need to run a periodic task few times in a day or every hour, we may deploy it on AWS Lambda so it would not increase load on our server which is handling client requests and at the same time we don't have to pay for AWS Lambda when it is not running. So, overall we only pay for few function invocations. 2. When some compute intensive processing is to be done but the number of requests per unit of time fluctuates. For example, we had deployed an AWS Lambda for processing images into different sizes and storing them on AWS S3 once user uploads them. Now, this is something that may happen few times every hour on a particular day or may not happen even once on other days. To handle this kind of tasks AWS Lambda is a better choice as we don't have to pay for the idle time of the server and also we don't have to worry about scaling when the load is high. Scenarios where AWS Lambda is not appropriate to use: 1. When we expect a large request volume continuously on the server. 2. When we don't want latency even in case of concurrent requests.
Anything that needs to be repeated en masse. Terraform is great at taking a template and have it be repeated across your estate. You can dynamically change the assets they're generating depending on certain variables. Which means though templated assets will all be similar, they're allowed to have unique properties about them. For example flattening JSON into tabular data and ensuring the flattening code is unique to the file's schema.
Lambda provides multiple methods for triggering functions, this includes AWS resources and services and external triggers like APIs and CLI calls.
The compute provided my Lambda is largely hands off for operations teams. Once the function is deployed, the management overhead is minimal since there are no servers to maintain.
Lambda's pricing can be very cost effective given that users are only charged for the time the function runs and associated costs like network or storage if those are used. A function that executes quickly and is not called often can cost next to nothing.
Putting a significant portion of your codebase into AWS Lambda and taking advantage of the high level of integration with other AWS services comes with the risk of vendor lock-in.
While the AWS Lambda environment is "not your problem," it's also not at your disposal to extend or modify, nor does it preserve state between function executions.
AWS Lambda functions are subject to strict time limitations, and will be aborted if they exceed five minutes of execution time. This can be a problem for some longer-running tasks that are otherwise well-suited to serverless delivery.
The language itself is a bit unusual and this makes it hard for new users to get onboarded into the codebase. While it's improving with later releases, basic concepts like "map an array of options into a set of configurations" or "apply this logic if a variable is specified" are possible but unnecessarily cumbersome.
The 'Terraform Plan' operation could be substantially more sophisticated. There are many situations where a Terraform file could never work but successfully passes the 'plan' phase only to fail during the 'apply' phase.
Environment migrations could be smoother. Renaming/refactoring files is a challenge because of the need to use 'Terraform mv' commands, etc.
I give it a seven is usability because it's AWS. Their UI's are always clunkier than the competition and their documentation is rather cumbersome. There's SO MUCH to dig through and it's a gamble if you actually end up finding the corresponding info if it will actually help. Like I said before, going to google with a specific problem is likely a better route because AWS is quite ubiquitous and chances are you're not the first to encounter the problem. That being said, using SAM (Serverless application model) and it's SAM Local environment makes running local instances of your Lambdas in dev environments painless and quite fun. Using Nodejs + Lambda + SAM Local + VS Code debugger = AWESOME.
I love Terraform and I think it has done some great things for people that are working to automate their provisioning processes and also for those that are in the process of moving to the cloud or managing cloud resources. There are some quirks to HCL that take a little bit of getting used to and give picking up Terraform a little bit of a learning curve, thus the rating
Terraform's performance is quite amazing when it comes to deployment of resources in AWS. Of course, the deployment times depend on various parameters like the number of resources to deploy and different regions to deploy. Terraform cannot control that. The only minor drawback probably shows up when a terraform job is terminated mid way. Then in many cases, time-consuming manual cleanup is required.
I have not needed support for AWS Lambda, since it is already using Python, which has resources all over the internet. AWS blog posts have information about how to install some libraries, which is necessary for some more complex operations, but this is available online and didn't require specific customer support for.
I have yet to have an opportunity to reach out directly to HashiCorp for support on Terraform. However, I have spent a great deal of time considering their documentation as I use the tool. This opinion is based solely on that. I find the Terraform documentation to have great breadth but lacking in depth in many areas. I appreciate that all of the tool's resources have an entry in the docs but often the examples are lacking. Often, the examples provided are very basic and prompt additional exploration. Also, the links in the documentation often link back to the same page where one might expect to be linked to a different source with additional information.
Azure Functions is another product that provides lambda functionality, but the documentation for some of Azure's products is quite hard to read. Additionally, AWS Lambda was one of the first cloud computing products on a large cloud service that implemented lambda functions, so they have had the most time to develop the product, increase the quality of service, and extend functionality to more languages. Amazon, by far, has the best service for Lambda that I know.
Terraform is the solid leader in the space. It allows you to do more then just provisioning within a pre-existing servers. It is more extensible and has more providers available than it competitors. It is also open source and more adopted by the community then some of the other solutions that are available in the market place.
I was able to perform a lot of processing on data delivered from my website and little or no cost. This was a big plus to me.
Programming AWS Lambda is quite easy once you understand the time limits to the functions.
AWS Lambda has really good integration with the AWS S3 storage system. This a very good method of delivering data to be processed and a good place to pick it up after processing.
we are able to deploy our infrastructure in a couple of ours in an automated and repeatable way, before this could take weeks if the work was done manually and was a lot of error prone.
having the state file, you can see a diff of what things have changed manually out side of Terraform which is a huge plus
if state file gets corrupted, it is very hard to debug or restore it without an impact or spending hours ..
writing big scale code can be very challenging and hard to be efficient so it's usable by the whole team