brefphp / laravel-bridge

Package to use Laravel on AWS Lambda with Bref
https://bref.sh/docs/frameworks/laravel.html
MIT License
319 stars 63 forks source link

AWS_SESSION_TOKEN missing on Lambda #68

Closed aristidesneto-bnw closed 2 years ago

aristidesneto-bnw commented 2 years ago

Hi,

When debugging the filesystems settings, I see that the token was not added as described in the documentation: https://bref.sh/docs/frameworks/laravel.html#file-storage-on-s3

That's it! The 'AWS_ACCESS_KEY_ID', 'AWS_SECRET_ACCESS_KEY' and 'AWS_SESSION_TOKEN' variables are defined automatically on AWS Lambda, you don't have to define them.

The result of Laravel's dd command returns the configuration array as below without TOKEN.

"s3" => array:9 [
       "driver" => "s3"
       "key" => "ASIAZ7N74ORB26CAAAAA"
       "secret" => "EC3K2NFgsij3oUHYo7HDqAd21+iYoQ6BWNRAAAAA"
       "token" => null
       "region" => "us-east-1"
       "bucket" => "my-bucket"
       "url" => null
       "endpoint" => null
       "root" => "/my-path"
]

Any idea what it could be? Thanks

aristidesneto-bnw commented 2 years ago

Sorry, after a few days I managed to identify the error, minutes after opening this issue I identified that the variable I configured in filesystems was incorrect.

I will close this issue.

Thanks