How do I tell the Laravel filesystem layer to use the s3 metadata on an EC2 instance? I don't want to provide hardcoded keys and secrets for my s3 buckets. I'm unclear on what the configuration should look like. When I exclude the key and secret from the filesystem configuration I get the following error
ErrorException
Undefined index: key
The fix is to leave empty placeholder values in place for key and secret. eg, in config/filesystems.php
return [
'cloud' => 's3',
'disks' => [
's3' => [
'driver' => 's3',
'key' => '',
'secret' => '',
'region' => env('S3_REGION'),
'bucket' => env('S3_BUCKET'),
],
],
];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With