Python code to start an ec2 instance

A generic python code using boto3 to launch an ec2 instance :

Install the python dependencies inside your virtualenv :

Modify the config file create_aws_ec2.conf and run the script.