DEV Community

Cover image for EC2, Lambda, or Elastic Beanstalk?
Lara Wehbe
Lara Wehbe

Posted on

EC2, Lambda, or Elastic Beanstalk?

So, you have a simple node.js applicaiton that takes input an image from S3, applies some operations on it, and then saves it in another S3.

Here are the options that you might need to consider:

  • EC2: You can launch an instance with Linux AMI, download dependencies on the instance and launch it to communicate from and to the S3 buckets.
    However, you need to handle:

    • Scaling
    • High Availability
    • OS Patching

    If you want to let AWS manage all this for you , Check the
    second option!

  • Lambda function: Using Lambda function, you can put the code and add the triggers. In this way, it is fully SERVERLESS approach, you only care about the triggers logic and the code you upload.

    But, you need more control over the underlying resources? use the third option.

  • Elastic Beanstalk: Deploy your code without worrying about the underlying infrastructure, using more traditional application model.

Image description
Now that you can distinguish between each of the solutions, you will choose the one that mostly fits your situation!
If you want to build a IaaS, go with EC2.
If you want to build a FaaS ( Function as a Service!), go with Lambda!
And, you guessed it. If you want to build a PaaS, go with Beanstalk!

Let me know what do you think in the comments!:)

Thanks for reading! I hope you found this post helpful in your journey of AWS!

Feel free to reach me out on the following:
LinkedIn: https://www.linkedin.com/in/lara-wehbe/
Email: larawehbee@outlook.com

Top comments (0)