Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are some of the pros and cons for using SAM vs serverless framework? [closed]

I was wondering which approach to use/explore more, I am currently exploring options to choose the best/suitable framework for building microservices on AWS Lambda, and canary deployments is a huge feature (SAM supports it, but serverless dont right now). Following are my questions:

  1. In general, what would be pros and cons of choosing SAM over serverless or vice-versa?
  2. Can you write SAM in serverless.yaml? Like SAM has some useful features and if we could utilize them in serverless that would be great

Thanks

like image 315
obaid Avatar asked Dec 03 '17 18:12

obaid


People also ask

Is serverless better than Sam?

Comparing AWS SAM with the Serverless FrameworkAllows you to run Lambda features locally. Thus, it is easier to build and test Lambda functions without needing to deploy them to AWS. You can invoke Lambda functions from the command line, but only in case they are available through API Gateway.

Is AWS Sam the same as serverless?

AWS SAM is another framework similar to Serverless Framework that it let's the developer write less code when building serverless applications. Unlike Serverless Framework, SAM is specific to AWS and its main configuration file template. yml is written with CloudFormation.

What is serverless not good for?

Loss Of Control‍ One of the biggest disadvantages of serverless is that you don't have the control over your services. We use a lot of services that are managed by third-party cloud providers, like Cloudwatch for logs and DynamoDB for databases.


1 Answers

AWS SAM

The focus on the AWS Serverless Application Model(At least for the moment), is to simplify defining AWS Resources related with Serverless Technology Stack (Lambda, API Gateway & etc.) in CloudFormation.

There are several limitations that comes with SAM. Its currently not providing full support for Custom Authorizers in a flexible manner. Also the DevOps tooling and plugins support is minimal compared to Serverless Framework.

Since SAM is native to AWS, support for AWS features will be available in SAM earlier than the Serverless Framework.

Serverless Framework

A DevOps Framework which allows to simplify defining and deploying AWS, Azure, Google Cloud and IBM Open Wisk in an unified manner. It uses CloudFormation underneath for AWS Serverless Stack Provisioning and comes with Plugins Eco System as well as simple commands to carryout DevOps tasks.

Serverless Framework has several limitations

  • Deploys new API Gateways for each stage.
  • Serverless Framework combines all the Lambda functions (If many defined in a single Serverless Project) and deploy all the code for all the functions, unless blacklisted specifically.
like image 71
Ashan Avatar answered Sep 21 '22 00:09

Ashan