Skip to content

Instantly share code, notes, and snippets.

@jkielbaey
Last active November 25, 2018 20:03
Show Gist options
  • Save jkielbaey/e6d0a27885d79fcc4209423121545db1 to your computer and use it in GitHub Desktop.
Save jkielbaey/e6d0a27885d79fcc4209423121545db1 to your computer and use it in GitHub Desktop.
import boto3
instance = boto3.resource('ec2').Instance('id')
# To stop the instance
instance.stop()
# To start the instance
instance.start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment