Add support for endpoint_url for local dynamodb table#300
Add support for endpoint_url for local dynamodb table#300vaibhavkhurana2018 wants to merge 2 commits into
Conversation
|
Create Table: Put: List: Get: GetAll: Localstack Running on Local: |
|
Would love for this to go through |
SamCullin
left a comment
There was a problem hiding this comment.
Been using this on my local for the past day and works well
|
Thanks @SamCullin !! |
jason-fugue
left a comment
There was a problem hiding this comment.
Thanks for the PR! This is an awesome idea. I tried this out with localstack and it works great. I'm going to look into doing the same for KMS for offline testing.
I left one very minor suggestion about the new arg. Could you please update when you have time?
| "CREDSTASH_DEFAULT_TABLE env variable, " | ||
| "or if that is not set, the value " | ||
| "`credential-store` will be used") | ||
| parsers['super'].add_argument("--endpoint_url", default=os.environ.get("DYNAMODB_ENDPOINT_URL", None), |
There was a problem hiding this comment.
Super-small issue - could you please change this to --endpoint-url to be consistent with the other args?
| parsers['super'].add_argument("--endpoint_url", default=os.environ.get("DYNAMODB_ENDPOINT_URL", None), | |
| parsers['super'].add_argument("--endpoint-url", default=os.environ.get("DYNAMODB_ENDPOINT_URL", None), |
|
One thing that may be an issue is that people may expect the --endpoint-url to also update the KMS endpoint. Maybe something like --dynamo-endpoint-url might be more appropriate. So then if someone wants to add --kms-endpoint-url in the future they can. |
This is a good point - and matching the env variable name would also be intuitive I'll create a followup issue to add similar support for the KMS endpoint. |
|
This PR was needed for a use case I had, I had to make further changes to get it working, one typographic error and also add in KMS to the endpoint_url. |
We will like to use credstash with the local dynamodb table created using https://github.com/localstack/localstack.
This PR adds support for adding
endpoint_urlwhile making the session to connect to the local dynamodb table rather than the remote AWS service.It accepts the endpoint_url as an argument or via an environment variable
DYNAMODB_ENDPOINT_URL, defaulting to None.Have tested all the functions both with and without the endpoint_url. This will be a non-breaking change.