Building and deploying using alternate options

There are alternative options to deploying your AWS serverless stack. The first one is the AWS Command-Line Interface (CLI). The AWS CLI is an option when, for example, your organization does not want to use cloud formation stacks for everything or for parts of your serverless stack. The AWS CLI is also usually ahead of SAM in terms of feature releases. So, in this book, I use some commands to complement what is not built into SAM yet.

Serverless Framework, initially called JAWS, is built using Node.js technology. It was ahead of its time when it was first released, but now with the AWS SAM, it's an additional layer on top of AWS that's maintained by a third party. However, it does allow you to use other functions from other cloud providers, such as Google and Azure, which is a great feature, but I personally question the reuse of your function code across cloud providers as the event source, security, and data shape are different anyway.

Chalice and Zappa are Python-based frameworks for AWS and are similar to Python Flask and Bottle micro web frameworks, but again, they are another abstraction on top of AWS. You need to wait for any improvements to cascade through.

In addition, there's also the risk of having a dependency on those frameworks when AWS features are deprecated. You will need to keep in sync with them or rely on those other frameworks' open source committers to actually make changes or contribute directly. If I had to go for one, I would choose SAM, but I do accept that some people prefer serverless.

SAM needs an S3 bucket for package deployment, and the Lambda needs IAM policies and IAM roles. So let's look at that next.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset