The directory /var/www/vhosts which WordPress is installed is owned by the user of nginx who runs the web server, so you can’t upload files there with sftp client and so on.
So as Nginx and PHP-FPM (or HHVM) is operating in the ec2-user, it will change the Web server user.

Execution of Run HTTPD as ec2-user

Introduction you login to the server (instance) in SSH.

$ ssh -i {path_to_key}xxxx.pem ec2-user@{your_instance_ip_address}

Next, run the following command.

$ curl -L | sudo bash

Run this command only once after you create the instance.

Did this answer your question?