code: def InitKeypair(aws_id, aws_secret, ec2, s3, keypair_name, src_region, 
                  dst_regions):
    
    # check if a keypair has been created
    metadata = CirrusAccessIdMetadata(s3, aws_id)
    keypair = ec2.get_key_pair(keypair_name)
    ssh_key = None
    if keypair:
      # if created, check that private key is available in s3
      ssh_key = metadata.GetSshKey(keypair_name)
    
    # if the private key is not created or not available in s3, recreate it
    if not ssh_key:
      if keypair:
        ec2.delete_key_pair(keypair_name)
  
      print 'Recreating keypair: %s' % (keypair_name)
      # create new key in current region_name
      keypair = ec2.create_key_pair(keypair_name)
      ssh_key = keypair.material
      metadata.SetSshKey(keypair_name, ssh_key)
      DistributeKeyToRegions(src_region, dst_regions, keypair, aws_id, aws_secret)
    assert(keypair)
    assert(ssh_key)
    return ssh_key
docs: Returns the ssh private key for the given keypair name Cirrus created bucket.
    Creates the keypair if it doesn't yet exist and stores private key in S3.