environments = [(os.path.dirname(k['Key']).split('/', 1))[0] for k in files]