Use aws dynamodb as a database on Laravel
composer require mehedimi/laravel-dynamodb
Add dynamodb configs to config/database.php:
'connections' => [
'dynamodb' => [
'driver' => 'dynamodb',
'region' => env('AWS_DEFAULT_REGION'),
'access_key' => env('AWS_ACCESS_KEY_ID'),
'secret_key' => env('AWS_SECRET_ACCESS_KEY'),
'endpoint' => env('AWS_ENDPOINT'),
],
...
],
<?php
$connection = new \Mehedi\LaravelDynamoDB\DynamoDBConnection([
// Configuration goes here
]);
$connection->table('Users')->query();
For more documentation click here