The issue is... it won't work as shown in the lesson:
sed -i -E 's_(amigoscode/amigoscode-api:)([^"]*)_\1'123456789'_' Dockerrun.aws.json
if you want it to work with the -E flag (extended mode), place a pair of single quote between two flags.
sed -i '' -E 's_(amigoscode/amigoscode-api:)([^"]*)_\1'123456789'_' Dockerrun.aws.json
or you may not use the extended mode you therefore need to escape each braces:
sed -i s_\(hazartilirot/hazartilirot-api:\)\([^\"]*\)_\1'123456789'_' Dockerrun.aws.json