def ListKeysInBucket(*, session, bucketname, prefix=None):
  """List the keys available in a bucket

  :param session: The boto3 session to use
  :type session: boto3.Session
  :param bucketname: Bucket name within which to find keys
  :type bucketname: str
  :param prefix: If provided, the list will be restricted to keys starting with prefix
  :type prefix: str
  :return: List of keys available in the bucket
  :rtype: list
  """
  s3conn = session.connect_to("s3")
  S3Objects = session.get_collection("s3", "S3ObjectCollection")
  s3objects = S3Objects(connection=s3conn, bucket=bucketname)
  return s3objects.each(Prefix=prefix)