Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

Option to pass custom endpoint when using DynamoDB Cache driver #1654

Open
hmazter opened this issue May 23, 2019 · 0 comments
Open

Option to pass custom endpoint when using DynamoDB Cache driver #1654

hmazter opened this issue May 23, 2019 · 0 comments

Comments

@hmazter
Copy link

hmazter commented May 23, 2019

Would it be possible to add a config option to specify the endpoint to use when configuring the DynamoDB cache driver?

    'dynamodb' => [
        'driver' => 'dynamodb',
        'key' => env('AWS_KEY'),
        'secret' => env('AWS_SECRET'),
        'region' => env('AWS_DEFAULT_REGION', 'eu-north-1'),
        'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
        'endpoint' => env('DYNAMODB_ENDPOINT', null), # <--- This
    ],

It should be passed to the DynamoDBClient in \Illuminate\Cache\CacheManager::createDynamodbDriver

$dynamoConfig = [
            'region' => $config['region'],
            'version' => 'latest',
            'endpoint' => $config['endpoint'] ?? null,
        ];

That would enable to run a local version of DynamoDB when running the application locally

taylorotwell pushed a commit to illuminate/cache that referenced this issue May 24, 2019
This commit adds the option to configure the DynamoDBClient that is used for cache
This is done by passing the `endpoint` propery in the config for cache stores.
When passing `null` or not passing the propery at all the default AWS endpoint is used.

This solves laravel/ideas#1654
dominikb pushed a commit to dominikb/framework that referenced this issue May 25, 2019
This commit adds the option to configure the DynamoDBClient that is used for cache
This is done by passing the `endpoint` propery in the config for cache stores.
When passing `null` or not passing the propery at all the default AWS endpoint is used.

This solves laravel/ideas#1654
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant