Note that you can not change values of these metadatas: file-hash, storage,location. When you set MetadataDirective: 'REPLACE' any existing metadatas will be overridden. So if you want to edit only some of metadatas then include existing metadatas too.