Skip to content

Commit ce31baa

Browse files
authored
Merge pull request #143 from howardlopez/config_changes
Config changes
2 parents 379eb23 + ef616fc commit ce31baa

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ To customize the configuration file, publish the package configuration using Art
8080
php artisan vendor:publish --provider="Aws\Laravel\AwsServiceProvider"
8181
```
8282

83-
Update your settings in the generated `config/aws.php` configuration file.
83+
The settings can be found in the generated `config/aws.php` configuration file. By default, the credentials and region settings will pull from your `.env` file.
8484

8585
```php
8686
return [
8787
'credentials' => [
88-
'key' => 'YOUR_AWS_ACCESS_KEY_ID',
89-
'secret' => 'YOUR_AWS_SECRET_ACCESS_KEY',
88+
'key' => env('AWS_ACCESS_KEY_ID', ''),
89+
'secret' => env('AWS_SECRET_ACCESS_KEY', ''),
9090
],
91-
'region' => 'us-west-2',
91+
'region' => env('AWS_REGION', 'us-east-1'),
9292
'version' => 'latest',
9393

9494
// You can override settings for specific services
@@ -98,6 +98,8 @@ return [
9898
];
9999
```
100100

101+
Note that you can always delete the `credentials` line from this file if you'd like to use the [default SDK Configuration Provider chain](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_credentials.html#default-credential-chain) instead.
102+
101103
Referring Laravel 5.2.0 [Upgrade guide](https://laravel.com/docs/5.2/upgrade#upgrade-5.2.0), you must using config

102104
file instead of environment variable option if using php artisan `config:cache`.
103105

config/aws.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@
1616
| http://docs.aws.amazon.com/aws-sdk-php/v3/guide/guide/configuration.html
1717
|
1818
*/
19-
19+
'credentials' => [
20+
'key' => env('AWS_ACCESS_KEY_ID', ''),
21+
'secret' => env('AWS_SECRET_ACCESS_KEY', ''),
22+
],
2023
'region' => env('AWS_REGION', 'us-east-1'),
2124
'version' => 'latest',
2225
'ua_append' => [

0 commit comments

Comments
 (0)