I have a file called samconfig.toml
version = 0.1 ~~~ parameter_overrides = "CognitoUserPoolName=\"aaa\" ApiAllowOrigin=\"'https://dev.xxxxxxxxx.amplifyapp.com'\" etc.. ~~~ My sed command
sed -i '' -e "s#ApiAllowOrigin=\\\"'https.*com'\\\"#ApiAllowOrigin=\\\"'https://dev.yyyyyyyy.amplify.com'\\\"#g" ./samconfig.toml It doesn't substitute the url. What's confusing about this, is that it contains all those single quotes, double quotes, back slashes..
I even checked with visualized regexp checker

\'within a shell e.g.sed 'blah'\''blah'\''blah' file.