We've seen it time and time again: companies get tremendous cost savings when they port over into the serverless realm.
Some real world examples:
What if I told you...it just got even cheaper?
Introducing the latest serverless provider integration, Spotinst.
Spotinst Functions enables users to deploy multi-cloud functions at Spot Prices. By leveraging spot instances, you could save 50 to 80% over standard serverless FaaS pricing.
Spotinst currently supports Node (4, 6, & 8.3), Java, Python, Ruby, Go as function runtimes.
Spotinst functions can be deployed simultaneously in AWS, Azure and Google Cloud Platform.
This ability to deploy across clouds improves SLA and offers higher function availability. If one cloud provider goes down (or pricing is cheaper elsewhere), Spotinst handles this for you under the hood.
Reduce data transfer costs with edge location support. Unlike other edge FaaS solutions, Spotinst Functions doesn’t have limitations on external api calls or execution time limits.
They are currently supporting 15 different locations around the US and 10+ locations in APAC, SEA & Europe.
Lets see how pricing stacks up with an example.
With 500,000 Requests per Minute (21,600,000,000 Monthly) with 256MB of RAM & <10ms execution time, the prices would break down like so:
Here’s what you need to get started with the Spotinst plug-in now:
Start here in our docs.
Or continue reading for step by step instructions on how to set up and deploy your first service on Spotinst.
Pre-requisites: Make sure you have the latest version of serverless installed on your machine.
# install serverless in your command line npm install serverless -g
Inside of Spotinst, head into the Functions console.
Create a new app and give it a name.
application in Spotinst is a logical group of several environments. Most commonly, it stores environments that share the same business application (e.g., testing and production of a specific function). More on Spotinst applications in the Spotinst docs
Name the Environment and choose which regions and providers you want to run the function in.
This is where you can choose to run your function across cloud providers and within multiple regions. 🎉
Inside Spotinst, the
environment refers to a configuration group that contains actual Functions. Learn more in the spotinst docs
Now head into spotinst setting. We need to grab an API key!
Click on API in settings and then on Generate Token. Generate SpotInst API tokens here
Name your token and click generate.
Now copy the token, we will need to use it with the
sls config credentials command in our terminal.
We also need your Spotinst account ID. You can grab that here: https://console.spotinst.com/#/settings/account/general
sls createand create a Spotinst service
Back in your terminal, create a new Spotinst service.
sls config credentials -p spotinst -t hhhhhhhh -a act-73192739
You will need your spotInst environment ID from the UI to deploy your functions.
Grab the environment ID and drop it in the serverless.yml of the service.
The serverless framework will read your config from
serverless.yml, package up the function and deploy the code to your Spotinst function environment
sls info for information and live endpoints of your service.
or via the
sls info command in your terminal.
🎉 Congrats you are now leveraging spot instance prices and running your functions across multiple clouds.
If you have questions or comments about the integration, we'd love to hear from you in the comments below or over on the serverless forums.
David Wells is a developer at Serverless, Inc.
We're posting the full videos and transcripts from Emit 2017! Here's Rob with his talk—towards a serverless event-sourced Nordstrom.
written by Andrea Passwater
guides-and-tutorials - 14.02.18
Learn how to create GraphQL endpoints using the Serverless Framework, Lambda, DynamoDB, RDS and a REST backend.
written by Siddharth Gupta