I'm trying to create an empty object with just a metadata in the S3 bucket via Kotlin but it's not working. The object is created but the meta data isn't there. This is the code I'm using:
val metaList = mapOf("x-amz-website-redirect-location" to "https://someurl")
val metaData = ObjectMetadata()
metaData.userMetadata = metaList
s3client.putObject(
"somebucket",
"somekey",
InputStream.nullInputStream(),
ObjectMetadata()
)