View more context

 

taoceanz

Anyone here run their site on AWS and have assets in an S3 bucket? If so, do you use the silverstripe-s3 module to connect to the bucket, or something else? https://github.com/silverstripe/silverstripe-s3

Show 1 attachment(s)
GitHub  
silverstripe/silverstripe-s3

SilverStripe module to store assets in S3 rather than on the local filesystem (SS4 only) - silverstripe/silverstripe-s3

Hide attachment content
taoceanz

How do you configure it to know where to look/how to connect to S3? Is it just variables in .env or server env vars for region, bucket name, access key id and secret access key?

thats4shaw

Yep, environment vars. Well last time I played with it.

thats4shaw

Server environment vars are probably more desirable.

dorsetdigital
  1. ---
  2. Only:
  3. envvarset: AWS_BUCKET_NAME
  4. After:
  5. - '#assetsflysystem'
  6. ---
  7. SilverStripe\Core\Injector\Injector:
  8. Aws\S3\S3Client:
  9. constructor:
  10. configuration:
  11. region: '`AWS_REGION`'
  12. version: latest
  13. credentials:
  14. key: '`AWS_ACCESS_KEY_ID`'
  15. secret: '`AWS_SECRET_ACCESS_KEY`'
taoceanz

Readme says full details on env vars can be seen in SilverStripeS3AdapterTrait though that doesn't appear to exist

dorsetdigital

That's the YML I use... and that picks up from the env vars