kmcgrath / spotinst-functions-examples

Examples to help get you started creating your own Spotinst serverless functions!

Home Page:https://spotinst.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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
Examples Runtime
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 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
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 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
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

About

Examples to help get you started creating your own Spotinst serverless functions!

https://spotinst.com


Languages

Language:JavaScript 75.6%Language:Python 18.8%Language:Java 5.6%