Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package for Lambda #280

Open
bradmurray opened this issue Nov 12, 2015 · 13 comments
Open

Package for Lambda #280

bradmurray opened this issue Nov 12, 2015 · 13 comments

Comments

@bradmurray
Copy link

It would be great if we could run this in Lambda now that it supports python and scheduling.

@DanDiac
Copy link

DanDiac commented Nov 12, 2015

+1

@bradmurray
Copy link
Author

I have actually written a version of this in node that I will post once it's cleaned up. I am running it in Lambda on a schedule and it seems to be working fine. Basically you just have to setup the function and create a role with the proper permissions and let it run.

I also want to set it up to allow for multiple tables in the config so that one job can manage all of your tables and indexes.

@tmitchel2
Copy link

A lambda version of this would be awesome

@mbravorus
Copy link

+1

I wonder if it would be possible to run it statelessly, without scheduling, reacting to threshold alerts on Dynamo metrics and/or circuit breaker availability via Cloudwatch?

@bradmurray
Copy link
Author

You need a schedule to handle reductions since there is not a trigger that will indicate under utilization, but that can run once an hour or even less since you can only reduce 4x per day. I make my scaler only reduce a max of once per 6 hours, but if it is in the second 6 hour block of the day (UTC) and it hasn't reduced it will reduce more often so that it hopefully uses them all up by the end of the day.

I have mine one every 5 minutes and also on an SNS when my read throttles are over 2 for 2 consecutive minutes. I am still fine-tuning the logic, but my last 24 an auto pilot looks like this:
dynamo-history

My spikes are surges from search engines.

@tmitchel2
Copy link

I'm setting it up to run every minute on lambda.... I'm using the runonce option, set the cloudwatch data window to -1 minute and for a minute duration, set the check-interval to zero to avoid the sleep at the end, log-file off. Even running every minute it uses barely any lambda resource however Im not using this in anger just yet, mainly because my usage is very bursty at the moment and it can't keep up.

@alessandro-lac
Copy link

+1 for the Lambda version :)

@uded
Copy link

uded commented Dec 25, 2015

A Lambda package would make this complete and easy to use.
Looks not a like mission impossible - package for Lambda deployment, configuration via S3 bucket...

@sebdah
Copy link
Owner

sebdah commented Dec 26, 2015

A Lambda version of Dynamic DynamoDB would be really cool. PRs for this is more than welcome.

@bradmurray
Copy link
Author

@mtngld
Copy link

mtngld commented Apr 19, 2016

Another good lambda version:
https://github.com/rockeee/dynamic-dynamodb-lambda

@tmitchel2
Copy link

I've just released my version here: https://github.com/channl/dynamodb-lambda-autoscale

@angulito
Copy link

I've added new features to the dynamic-dynamodb-lambda developed by rockeee. New features:

  • Global Secondary Index support
  • Enable/Disable read/write autoscaling in config json file
  • Throttle Events in CloudWatch support
  • Enable/Disable throttle-read/throttle-write checking in config json file
  • Added test to lambda

You can download this lambda from here:
https://github.com/touchvie/dynamic-dynamodb-lambda

I hope that this lambda can help you. It works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants