Database
[{_id:1,image:[{path:"https://url1/uploads/abc",other_field:"keep"},{path:"https://url2/uploads/pqr",other_field:"still"},{path:"https://url3/uploads/xyz",other_field:"also"},{path:"https://anotherURL/uploads/wontchange",other_field:"this URL will not change"}]},{_id:2,image:[{path:"https://url2/uploads/pqr"}]}]
Query
db.collection.update({},[{$set:{"image":{$map:{input:"$image",as:"item",in:{$mergeObjects:["$$item",{"path":{$cond:{if:{$regexFind:{input:"$$item.path",regex:"^https://(url1|url2|url3)/uploads/"}},then:{$replaceOne:{input:"$$item.path",find:{$getField:{/** the `match` field contains the part which matched*/field:"match",input:{$regexFind:{input:"$$item.path",regex:"^https://(url1|url2|url3)/uploads/"}}}},replacement:"https://urlForAmazonaws/"}},else:"$$item.path"}}}]}}}}}],{multi:true})