Skip to content

Instantly share code, notes, and snippets.

@jkielbaey
Created November 25, 2018 20:05
Show Gist options
  • Save jkielbaey/aa8e5924022d470362e50fef033d3b02 to your computer and use it in GitHub Desktop.
Save jkielbaey/aa8e5924022d470362e50fef033d3b02 to your computer and use it in GitHub Desktop.
import boto3
client = boto3.client('rds')
db_instance_id = ‘id’
# To stop a DB instance.
response = client.stop_db_instance(
DBInstanceIdentifier=db_instance_id
)
# To start a DB instance
response = client.start_db_instance(
DBInstanceIdentifier=db_instance_id
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment