Autoscaling in Dynamodb with boto3

  • Load huge amount of ML results in dynamodb every night
  • Read each of them during the day in order to set up a newsletter
table created in AWS console
boto3.client(‘application-autoscaling’)
  • ServiceNamepace as dynamodb¹
  • RessourceId is in format “/table/<table_name>”
  • the ScalableDimension in this case are ReadCapacityUnits and WriteCapacityUnits but you can only put down one value and keep the other set.
NOPE !

TargetTrackingScaling

  • ScalableDimension here dynamodb:table:ReadCapacityUnits or dynamodb:table:WriteCapacityUnits
  • TargetValue percent of resource we expect to use in a typical situation
  • PredefinedMetricType any existing CloudWatch metric that will be used to indicate if we need to scale up or down

StepScaling

  • ChangeInCapacity: Add or substract to the current capacity (specified at the table creation time) the ScalingAdjustment.
  • ExactCapacity: Change the current capacity to the ScalingAdjustment value.
  • PercentChangeInCapacity: Multiplies current capacity by the percent in ScalingAdjustment.
  • ScalableDimension: Here dynamodb:table:ReadCapacityUnits or dynamodb:table:WriteCapacityUnits.
  • TargetValue: Percent of resource we expect to use in normal situations.
  • PredefinedMetricType: Any existing CloudWatch metric that will be used to indicate if we need to scale up or down

Conclusion

  1. We need to fill this info because this client is not restricted to dynamodb

--

--

--

Data engineer @Talend, python enthusiast and cat lover

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

DevOps’ish 023: Week of 1494734400

A Bug of Such Cunning That I Admire It

//: The First Space Robots AMA

Rails Today

How to Automate user configurations using codes

Event Sourcing Versus Event-Driven Architecture

A Sloep 650

Asloep

What’s New in the FileMaker 18 Platform?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Clement Demonchy

Clement Demonchy

Data engineer @Talend, python enthusiast and cat lover

More from Medium

Thoughts about managing Kafka clusters: How to deal with disaster

Monolith to Microservices: Refactoring Relational Databases

Amazon S3: Features and Storage Classes

AWS System Manager Parameter Store