format function for s3 adapter