I've set up an instance running Amazon Linux AMI x86_64 EBS.
I installed httpd, and PEAR, then installed the AWS SDK.
Now, I'm new to all this server configuration so forgive my naivety.
My web root is at var/www/html.
The only reference to the AWS SDK I can find is at tmp/pear/download/sdk-1.4.7 - I'm confused by this, it seems to me this tmp folder is is a temp directory so is the SDK installed somewhere else and i've just not seen it?
But the crux is this: http://aws.amazon.com/articles/PHP/4261#configurecredentials states I need to
To add your AWS credentials the simple way (non-PEAR)
Navigate to the config-sample.inc.php file in the SDK directory, and rename it to config.inc.php.
Open config.inc.php for editing. There are instructions in this file for what each configuration value, should be and where you can find it.
When the SDK is loaded, it will first look for config.inc.php in the same directory as sdk.class.php. You are now ready to run the sample!
or
To add your AWS credentials the flexible way (PEAR)
Create a new configuration file at ~/.aws/sdk/config.inc.php.
You can either download and copy the contents of a config-sample.inc.php file, or grabdirectly from the above GitHub link.
Open config.inc.php for editing. There are instructions in this file for what each configuration value, and where you can find it.
Enter echo getenv('HOME'); to verify that PHP can access the HOME environment variable .
If the previous command doesn't t return the correct file path to your user directory, configure it with putenv('HOME=');.
The first option could work for me, but the folder is not writable. I'm unsure if sudo chown ec2-user /tmp/pear/download/sdk-1.4.7 would be safe to do.
The second option. I placed my config.inc.php file into home/ec2-user/.aws/sdk/config.inc.php (.aws I had to create).
Then on my webpage echo getenv('HOME'); returns /root. If I try and navigate to /root through FTP I get an error 'could not retrieve file listing - make sure you have permission to modify...'.
Where should I go from here? Do I put the putenv('HOME=<your-user-path>'); into my php.ini file? And what exactly is 'your-user-path'? Or do I have to put that at the top of every web accessible file?
If someone could guide me a little I'd be most grateful.