silverstripe / silverstripe-s3

Silverstripe module to store assets in S3 rather than on the local filesystem (SS4/SS5 only)
BSD 3-Clause "New" or "Revised" License
20 stars 25 forks source link

AWS Env Settings Mismatch #27

Closed phptek closed 2 years ago

phptek commented 5 years ago

At the moment, the silverstripe/dynamodb and silverstripe/s3 modules use two different settings for the same AWS config:

AWS_REGION_NAME
AWS_ACCESS_KEY
AWS_SECRET_KEY

and

AWS_REGION
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY

....respectively.

It would be good to standardise on one set or the other.

obj63mc commented 5 years ago

If you are using this module outside of AWS you have to add your own yaml config specifying the s3 client to use your key and secret. Those environment variables could be called anything really so there is nothing stopping someone from naming them the same. I believe this project is using what Amazon would set the env variables to depending on your ec2 setup as well

As to the region that specifically is named how Amazon provides that env variable on your ec2 instances so not sure we would change it.

I don't know much about the dynamodb module other than it is primarily for sessions so will need to look at that.

obj63mc commented 5 years ago

Looking at Amazon's docs the names we are using are the default for the php sdk https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_credentials_environment.html

The documentation and setup of dynamodb module looks quite old too as the readme still mentions the ss environment php file which isn't used in 4.x any more.