1

I've been working on a simple messaging website. So far I've used AWS Lambda for my server, which accesses DynamoDB regularly, and API Gateway.

But I saw a website called Repl.it that seems to do the same thing as AWS Lambda, but for free.

I'm using Node.js, and read and write to DynamoDB very often. I also use the AWS SDK.

What are the differences between Repl.it and AWS Lambda?

aryanm
  • 1,183
  • 14
  • 26

1 Answers1

3

REPL stands for Read-Evaluate-Print Loop, basically meaning that it waits for the user to enter a single statement or expression, evaluates it, prints it (or returns it to the client in this case), and then loops. It looks like repl.it only exposes an API that will allow you to execute a single line of code at a time. This would make feeding your program into the repl.it API very cumbersome.

It also looks like repl.it has some hard limits on how often you can access their API before being rate limited and how many concurrent requests can be sent, which will affect your website's functionality as you scale. Also, repl.it is apparently not intended for commercial usage and you would probably be banned from the site if you use it for commercial purposes without contacting them and making an arrangement.

Lambda will allow you to execute any piece of code (now that it supports custom runtimes) that takes up to 15 minutes to execute, and will scale horizontally to match the amount of incoming requests.

For what it's worth, if you're considering repl.it for your application, you can probably use AWS Lambda for free indefinitely. The Lambda free tier does not expire after 12 months. Lambda always-free tier

jkeys
  • 3,803
  • 11
  • 39
  • 63
  • To be fair, I think you can't use AWS Lambda without an API Gateway, and that one isn't "always free". – Suzanne Soy Aug 21 '20 at 22:06
  • @SuzanneDupéron not true, the AWS SDK can be used to invoke a lambda (not inside a VPC) directly. Some restrictions apply, notably cross-region invocations don't work e.g. you can't set the client to eu-west-1 and invoke the us-east-1 lambda. Also the CLI offers equivalent operations -- with the note that the CLI is a thin wrapper around BOTO3, the AWS SDK for Python. The hard part is securely using and parsing credentials to invoke the lambda API, which is one of the reasons to consider using API Gateway. – jkeys Sep 07 '20 at 02:08