Examples to help get you started creating your own Spotinst serverless functions!
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 1 commit ahead, 25 commits behind spotinst:master.
Latest commit f3bde7b Apr 12, 2018
Permalink
Failed to load latest commit information.
asg-elastigroup-connect adding asg Apr 11, 2018
assets Changing header image Nov 1, 2017
java8-elastigroup-scaleDown adding link to code Jan 23, 2018
java8-elastigroup-scaleUp adding link to code Jan 23, 2018
java8-elastigroup-setCapacity removing example from pages to add them the right way through the main Jan 24, 2018
java8-hello-world adding hello world and two java8 examples Jan 24, 2018
java8-spotinst-api-resumePolicy fixing readmes again Jan 24, 2018
java8-spotinst-api-suspendPolicy fixing readmes again Jan 24, 2018
node-alexa-skill adding link to code Jan 23, 2018
node-datadog-event adding link to code Jan 23, 2018
node-datadog-metric adding link to code Jan 23, 2018
node-docstore-getAll adding link to code Jan 23, 2018
node-docstore-newValue adding link to code Jan 23, 2018
node-elastigroup-scaleDown adding link to code Jan 23, 2018
node-elastigroup-scaleUp adding link to code Jan 23, 2018
node-elastigroup-setTarget adding link to code Jan 23, 2018
node-emr-scaleDown adding link to code Jan 23, 2018
node-emr-scaleUp adding link to code Jan 23, 2018
node-emr-setTarget adding link to code Jan 23, 2018
node-endpoint-addAlias adding link to code Jan 23, 2018
node-endpoint-addPattern adding link to code Jan 23, 2018
node-endpoint-deleteAlias adding link to code Jan 23, 2018
node-endpoint-deletePattern adding link to code Jan 23, 2018
node-endpoint-getAlias adding link to code Jan 23, 2018
node-endpoint-getPattern adding link to code Jan 23, 2018
node-endpoint-updatePattern adding link to code Jan 23, 2018
node-hello-world adding hello world and two java8 examples Jan 24, 2018
node-lyft-webApp adding link to code Jan 23, 2018
node-map-reduce adding microservoce and simple mapreduce Jan 27, 2018
node-microservice adding microservoce and simple mapreduce Jan 27, 2018
node-mysql-connection adding link to code Jan 23, 2018
node-pagerduty-connection Merge branch 'master' of https://github.com/spotinst/spotinst-functio… Jan 25, 2018
node-raffle-app adding link to code Jan 23, 2018
node-simple-chatbot adding link to code Jan 23, 2018
node-slack-bot adding link to code Jan 23, 2018
node-sns-endpoint adding sns endpoint example Jan 25, 2018
node-spotinst-api-getGroups adding link to code Jan 23, 2018
node-spotinst-api-resumePolicy adding link to code Jan 23, 2018
node-spotinst-api-suspendPolicy adding link to code Jan 23, 2018
node-stateful-instance-service fixing readme Mar 27, 2018
node-static-binary reconfigured yaml Jan 25, 2018
node-twitter-vision adding link to code Jan 23, 2018
python-aws-batch adding link to code Jan 23, 2018
python-hello-world adding hello world and two java8 examples Jan 24, 2018
python-mysql-connection adding link to code Jan 23, 2018
python-spotinst-sdk-getGroups adding link to code Jan 23, 2018
.DS_Store adding microservoce and simple mapreduce Jan 27, 2018
.spotinst.json Addint twitter vision app from webinar Jan 17, 2018
README.md adding statful examplewq Mar 27, 2018
_config.yml Merge branch 'master' of https://github.com/spotinst/spotinst-functio… Jan 25, 2018

README.md

Spotinst Serverless Functions

Spotinst Functions WebsiteSpointst Community SlackSpotinst Serverless DocumentationSpoitinst Serverless Help

Spotinst Serverless Examples

Here are a few examples to help you get started with Spotinst Serverless Functions

Getting Started

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.

Examples

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