Spotinst Functions Website • Spointst Community Slack • Spotinst Serverless Documentation • Spoitinst Serverless Help
Here are a few examples to help you get started with Spotinst Serverless Functions
If you are new to using Spotinst Serverless Functions you can view the documentation on the Serverless Fameworks Documentation. You will need to have the serverless framework installed on your local machine as well as set up your Spotinst credentials.
Each of the projects listed here have their own README.md
that will help you set up each project and their use cases
Have an example? Fork this repository and submit a PR for review
To start any of the examples you can use any of the URLs as a template with the serverless framework. Simply type in:
serverless create --template-url <Project URL>
Example:
serverless create --template-url https://github.com/spotinst/spotinst-functions-examples/tree/master/node-spotinst-api-getGroups
Spotinst Elastigroup & EMR Examples | Runtime |
---|---|
Node Spotinst Stateful Instance Pause and Resume All This example will allow you to pause and resume all your stateful insances in your account |
nodeJS |
Node Spotinst API Get All Elastigroups This example shows you how to connect to the Spotinst API and return all the Elastigroups that were created in the past hour |
nodeJS |
Node Spotinst Scale Down Elastigroups This function will allow you to connect to your Elastigroup and scale it down. This is super useful if you hook them up to a timer to auto-scale for you |
nodeJS |
Node Spotinst Scale Up Elastigroups This function will allow you to connect to your Elastigroup and scale it up. This is super useful if you hook them up to a timer to auto-scale for you |
nodeJS |
Node Spotinst Elastigroup Set Target This example will allow you to connect to your Elastigroup and set the target, min and max capacity limits |
nodeJS |
Node Spotinst API Suspend Scaling Policies This example shows you how to connect to the Spotinst API to suspend scaling policies on your elastigroups |
nodeJS |
Node Spotinst API Resume Scaling Policies This example shows you how to connect to the Spotinst API to resume scaling policies on your elastigroups |
nodeJS |
Python Spotinst SDK Get All Elastigroups This example shows you how to connect to the Spotinst SDK and return all the Elastigroups that were created in the past hour |
Python |
Node Spotinst EMR Scale Down This example will allow you to connect to your EMR Elastigroup and scale it down |
nodeJS |
Node Spotinst EMR Scale Up This example will allow you to connect to your EMR Elastigroup and scale it up |
nodeJS |
Node Spotinst EMR Set Target This example will allow you to connect to your EMR Elastigroup and set the target, min and max capacity limits |
nodeJS |
Java8 Spotinst Elastigroup Scale Down This example will allow you to connect to your EMR Elastigroup and scale it down |
Java8 |
Java8 Spotinst Elastigroup Scale Up This example will allow you to connect to your EMR Elastigroup and scale it up |
Java8 |
Java8 Spotinst Elastigroup Set Target This example will allow you to connect to your EMR Elastigroup and set the target, min and max capacity limits |
Java8 |
Java8 Spotinst API Suspend Scaling Policies This example shows you how to connect to the Spotinst API to suspend scaling policies on your elastigroups |
nodeJS |
Java8 Spotinst API Resume Scaling Policies This example shows you how to connect to the Spotinst API to resume scaling policies on your elastigroups |
nodeJS |
Spotinst Function Features Examples | Runtime |
---|---|
Node Spotinst Add Endpoint Alias This example will create a new endpoint alias for you function environment |
nodeJS |
Node Spotinst Add Endpoint Pattern This example will create an endpoint pattern that maps to a specific function |
nodeJS |
Node Spotinst Delete Endpoint Alias This example will delete a specific endpoint alias |
nodeJS |
Node Spotinst Delete Endpoint Pattern This example will a specific endpoint pattern |
nodeJS |
Node Spotinst Get All Endpoint Alias This example will return all the alias in a specific environment |
nodeJS |
Node Spotinst Get All Endpoint Patterns This example will return all the patterns in a specific environment |
nodeJS |
Node Spotinst Update Endpoint Pattern This example will allow you to update an existing endpoint pattern |
nodeJS |
Node Get All Values From Document Store This function will allow you to get all the key value pairs from your document store in a specific region |
nodeJS |
Node Insert New Value Into Document Store This function will allow you to insert a new value into your document store in a specific region |
nodeJS |
Node Microservice This application will allow you to create a API microservice backend with custom endpoints |
nodeJS |
External Connection Examples | Runtime |
---|---|
Node MySQL Connection This example shows you how to connect to a MySQL table and insert new values or return all the entries in your table |
nodeJS |
Python MySQL Connection This example shows you how to connect to a MySQL table and insert new values or return all the entries in your table |
Python |
Node Elastigroup-PagerDuty Connection You can use this function to connect your Elastigroup to PagerDuty to push notification when you launch and terminate instances as well as other supported notifications |
nodeJS |
Python AWS Batch Queue and Elastigroup Connect This function will check the jobs in your batch queue and either scale your Elastigroup up or down based on the requirements for the upcoming jobs |
python |
Simple Node Chatbot This example simulates a basic chat bot that allows the user to enter a message and get a pre programmed response |
nodeJS |
Alexa Skill Running on Spotinst This function is an Alexa skill that runs entirly on Spotinst. It allows you to check your Elastigroups from your Alexa |
nodeJS |
Node Raffle App This project is a simple raffle app where users are able to enter to win and one user is randomly selected |
nodeJS |
Node Slack Bot This app will create a basic Slack bot that connects to your GitHub and message you once a week with a status update on your repos |
nodeJS |
Node Elastigroup-Data Dog Metrics This app has two funcitons to connect your Elastigroup to Data Dog and posts Metrics to track your group |
nodeJS |
Node Elastigroup-Data Dog Events This app has two funcitons to connect your Elastigroup to Data Dog and posts Events to track your group |
nodeJS |
Lyft Web App This services is three functions working together to allow you to request a lyft |
nodeJS |
Twitter Vision App This services is three functions working together to allow you to capture tweets that have an image and contain any word you want |
nodeJS |
Node Static Binary (with ffmpeg) This is an example of how to use astatic binary included in your function package. |
nodeJs |
Node SNS Endpoint This example allows you to create a SNS endpoint allowing you to have total control of the response |
nodeJS |
Node Simple Map Reduce This example allows you to run map reduce on a random JSON or key value pairs |
nodeJS |