'Create a new key pair for your account.
This will create the key pair within the region you
are currently connected to.
:type key_name: string
:param key_name: The name of the new keypair
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
:rtype: :class:`boto.ec2.keypair.KeyPair`
:return: The newly created :class:`boto.ec2.keypair.KeyPair`.
The material attribute of the new KeyPair object
will contain the the unencrypted PEM encoded RSA private key.'

def create_key_pair(self, key_name, dry_run=False):

    params = {'KeyName': key_name}
    if dry_run:
        params['DryRun'] = 'true'
    return self.get_object('CreateKeyPair', params, KeyPair, verb='POST')
