The problem here may be that you did not set a handler in your configuration file so the web server knows that .php files are to be processed by the PHP engine. I assume you are using Apache. See the AddHandler, AddType, or SetHandler. See the information and especially the comments in these pages: http://php.net/manual/en/install.unix.php http://php.net/manual/en/install.unix.apache2.php
have you set up right permissions for anyone to view files? http://docs.aws.amazon.com/gettingstarted/latest/swh/getting-started-configure-bucket.html