Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for specifying endpoint_url in the Boto3 resource #16

Closed
CalgaryMichael opened this issue Nov 30, 2021 · 1 comment
Closed

Allow for specifying endpoint_url in the Boto3 resource #16

CalgaryMichael opened this issue Nov 30, 2021 · 1 comment

Comments

@CalgaryMichael
Copy link

CalgaryMichael commented Nov 30, 2021

Problem

I am trying to get my development team running a DynamoDB instance locally to help with my team's dev process.

In order to be able to run a local version of the DB, you need to specify the endpoint_url to your locally running version (e.g. localhost:8000). Unfortunately, AWS cli does not support supplying the endpoint_url in the config (ref). That leaves the only real option as passing the endpoint_url to all calls to boto3.resource().

However, this package does not allow us to drill down into its call to boto3.resource() to pass in this value. Without this, we can't use this package for development purposes.

Proposed Solution

The DynamoDbMutex and MutexTable classes should accept a parameter for endpoint_url (similar to how it accepts region_name) that it passes to boto3.resource()

Long term, I anticipate it might be simpler to have these classes accept a dict resource_params that gets passed as kwargs to boto3.resource. This would help alleviate any one-off instances like this. However, this would require a breaking change (we would have to specify region_name in the params, instead as a standalone kwarg).

I can put up a PR for the first solution if you are comfortable with the proposal?

@CalgaryMichael
Copy link
Author

Just realized that we are on a previous version of this package, and the newest version supports this functionality with DYNAMO_DB_URL. I'll close this issue as there is no development needed. Sorry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant