Could you please point me to the version of Magento you deployed in AWS where you reproduced those commands?I just launched a fresh instance and copy-pasting the commands that I previously shared with you worked without problems:

root@bitnami-magento-dm-5ab2:/opt/bitnami/apps/magento/htdocs# composer --version
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Composer version 1.6-dev (edece864e7e4c668dcad6601df70777882d22116) 2017-09-19 08:42:10

And this is the content of my composer.json after I executed your command to update to 2.2.0:

I use a lightsail instance https://amazonlightsail.com/ , which comes already packed with a magento installation from bitnami. That means I do not deploy magento by my self. The current version there is 2.1.8.

That's it It worked! I was able to upgrade with the steps above.Following the steps above I was even able to do the upgrade with a 512MB Lightsail Instance.

Thanks to all (+jsalmeron +silvio) a lot!

For all other beginners, two tips:1. Use the public key from magento market place as username, and the private key as password.2. When following the steps above, u need to add .sh to ctlscript when u restart the service after all. >sudo /opt/bitnami/ctlscript.sh restart

Restart all the services again with sudo /opt/bitnami/ctlscript.sh restart

After that I was able to access to the Magento instance. It seems during the automatic update process of Magento there are some folders that are created by Magento that haven't set the correct permissions, so the webserver is not able to read them and it just shows you the error you faced before.

Would you mind to give a try? I hope this fixes this issue.

By our side, we will try to include this by default so the next users that wants to update the Magento instance don't face this error.

Now, as this support case is finished we proceed to close it, feel free to open more topics if you find any other issue.We will work on automating as much as possible to make it easier for the next user.