Skip to content

Instantly share code, notes, and snippets.

@knil-sama
Last active February 18, 2018 21:39
Show Gist options
  • Select an option

  • Save knil-sama/e48b307ad12f7a1f695b49d3d2b53e24 to your computer and use it in GitHub Desktop.

Select an option

Save knil-sama/e48b307ad12f7a1f695b49d3d2b53e24 to your computer and use it in GitHub Desktop.
import boto3
autoscaling_client = boto3.client('application-autoscaling')
#Read capacity
autoscaling_client.register_scalable_target(ServiceNamespace='dynamodb',
ResourceId='table/fake_table',
ScalableDimension='dynamodb:table:ReadCapacityUnits',
MinCapacity=5,
MaxCapacity=100)
#Write capacity
autoscaling_client.register_scalable_target(ServiceNamespace='dynamodb',
ResourceId='table/fake_table',
ScalableDimension='dynamodb:table:WriteCapacityUnits',
MinCapacity=5,
MaxCapacity=100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment