Dynamically change dockerrun.aws.json image tag on deploy

I've written a bash script which runs

eb deploy

Before it executes that command I change a symlink depending on if I'm running production or staging. For Example:

ln -sf ../ebs/Dockerrun.aws.$deploy_type.json ../ebs/Dockerrun.aws.json


I also stumbled upon that last year, where AWS support stated there's no such feature at hand. I ended up writing a script that receives the docker tag as parameter and composes the dockerrun.aws.json file on the fly with the correct tagname.