dynamorm icon indicating copy to clipboard operation
dynamorm copied to clipboard

AWS DAX Integration

Open ricky-sb opened this issue 5 years ago • 0 comments

Since this library sits on top of boto3, it makes it really easy to integrate it with DAX.

https://pypi.org/project/amazon-dax-client/

On instantiation, perhaps in resource_kwargs, we should have an option for dax_endpoint_url, which, if set, would return a DAX client instance.

Example:

Over here, we just add something like:

if `dax_endpoint_url` in resource_kwargs:
    return AmazonDaxClient.resource(endpoint_url=resource_kwargs['dax_endpoint_url'])

and import the DAX client library at the top of the file.

Everything else remains the same. The calls are automatically mapped to DAX. The one caveat being:

The Amazon DAX client does not support table operations. Any table manipulation operations must use the regular Boto3 or botocore DynamoDB client.

So in our table operations method, we'd need to check if we're using DAX or not, and raise an error accordingly.

ricky-sb avatar Nov 15 '19 00:11 ricky-sb