How to remotely update AMI id in Jenkins EC2 plugin?
The PR you are linking to contains a link to a python script that does exactly this, since you can run that script from anywhere you can access your Jenkins server.