boto3 keypair
import boto3 import logging import traceback logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger("test") aki=" ... my access key id .... " sak="... my secure access key ...." client = boto3.client('ec2',region_name='us-west-2',aws_access_key_id=aki, aws_secret_access_key=sak) def create_keypair(client, KeyName): try: res = client.create_key_pair(KeyName=KeyName) print res['KeyNam..