I did it a bit differently, as Replicate adapter should also have the Amazon metadata if one of its adapters is S3.
Will test it in my app, in a moment to see if all is ok.