I am installing Amazon S3 php SDK V3 on a shared hosting. I have so far done everything the aws php sdk v3 docs says apart from where and how to store the credentials
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
The documentation is not clear for me. This is my folder structure
home/sample/public_html/ /*index.php the root of my website*/
home/sample/public_html/media/aws/ /*s3 php v3 sdk stored here*/
home/sample/public_html/media/ /*my custom php script for upload stored here*/
My problem is basically 1) WHERE to store the credentials and 2) HOW to store the credentials
I will be glad if anyone can help thank you.
The start of the docs link you have posted says where to put these credentials:
The file should be placed at ~/.aws/credentials, where ~ represents your HOME directory.
With the structure of the file being.
The format of the AWS credentials file should look something like the following:
[default] aws_access_key_id = YOUR_AWS_ACCESS_KEY_ID aws_secret_access_key = YOUR_AWS_SECRET_ACCESS_KEY
[project1] aws_access_key_id = ANOTHER_AWS_ACCESS_KEY_ID aws_secret_access_key = ANOTHER_AWS_SECRET_ACCESS_KEY Each section (e.g., [default], [project1]), represents a separate credential profile. Profiles can be referenced from a SDK configuration file, or when you are instantiating a client, using the profile option: