AWS recovery error

Hi all,

I have been trying to perform a recovery using the recovery template (openemr-devops/OpenEMR-Standard-Recovery.json at master · openemr/openemr-devops · GitHub) and followed the directions to the best of my abilities. However, the AWS cloudformation failed and gave me this error

API: ec2:RunInstances Not authorized for images: [ami-f5d6c995]

I’m using OpenEMR version 6.1.0 and I am hoping to use the recovery operation to upgrade to 7.0.0.

I’m using Chrome

I’m using windows 11

Did you check the logs? yes
Was there anything pertinent in them? see above

Thanks!

I have tried the 7.0.0 and 6.1.0 templates and switched different AWS regions (west-1 to east-1) and nothing has worked so far. Has anyone successfully used the official automated recovery procedure?

I’m not surprised the recovery template failed, actually. Now that I think about it, the template list it knows isn’t kept up to date with the list AWS uses.

I’m not sure how long it’ll take me to catch it up, but until I do, here’s some self-service that may help – look at the current AWS-provided CFN template for Standard, and you’ll see a block that represents AMIs in every region, one copy of the master OpenEMR AMI exported to everywhere the template could be used.

Paste that block back into the recovery template (or just adjust the AMI for your singular region of relevance) and you’ll be using a good AMI and you should be able to continue launching.

I tried that already and replaced ami-f5d6c995 with ami-02d796d5c07c2a86c for west-1. Still didn’t work.

Same or different error? It’s very strange that you could be denied access to launch an image you should have access to. It might be that CFN has changed the permissions it uses internally – I don’t think my recovery script is used very often (either that or it always works perfectly and nobody ever tells me).

Absent me sittting down to mess with this, which might not happen until the weekend, consider (as was suggested elsethread):

  • Create a native Docker-based OpenEMR 6.1.0 instance somewhere.
  • Export your system with the native OpenEMR backup tool (the tarball creator).
  • Reload your system into the 6.1.0 instance (use openemr-devops/ingestion.sh at master · openemr/openemr-devops · GitHub as a guide for how to interact with tarballs).
  • Run the 7.0.0 upgrade process (adjust docker-compose image level, restart container).
  • Export that as a native OpenEMR backup (a new 7.0.0 tarball).
  • Start a new 7.0.0 AWS Standard instance and load your tarball into that.
  • Trigger file system and RDS backups because nobody wants to do this again.

This is a lot of steps but it sounds harder than it is – each one is safe and won’t break anything that came before it because you’re copying backup files to new systems and working with fresh, disposable environments.