I created a laravel 10 project with a version of logging through the 'php artisan ui react' command. However, now I need to configure it with dynamoDB and I get this error 'Undefined array key “database”'.
I have set up env. AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= AWS_DEFAULT_REGION= AWS_DYNAMODB_TABLE=users.
config/database.php I also set the ' '
'connections' => [
'dynamodb' => [
'driver' => 'dynamodb',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
]
]
I created a laravel 10 project with a version of logging through the 'php artisan ui react' command. However, now I need to configure it with dynamoDB and I get this error 'Undefined array key “database”'.
I have set up env. AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= AWS_DEFAULT_REGION= AWS_DYNAMODB_TABLE=users.
config/database.php I also set the ' '
'connections' => [
'dynamodb' => [
'driver' => 'dynamodb',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
]
]
Share
Improve this question
edited Nov 20, 2024 at 22:46
Martin Zeitler
76.9k20 gold badges165 silver badges237 bronze badges
asked Nov 20, 2024 at 22:39
Szymon MastalerzSzymon Mastalerz
1
1 Answer
Reset to default 0How about giving it, what it demands?
'dynamodb' => [
'driver' => 'dynamodb',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'database' => 'insert name here'
]
Else the server won't know which database shall be connected.