Created
November 27, 2019 09:25
-
-
Save ross-humphrey/f0e3e6a648bb9c503f79c1ade3b25058 to your computer and use it in GitHub Desktop.
π How to connect to a local dynamo db
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
#boto3 client | |
ddb = boto3.client('dynamodb', endpoint_url='http://localhost:8000') | |
response = ddb.list_tables() | |
print(response) | |
#boto3 service resource | |
ddb = boto3.resource('dynamodb', endpoint_url='http://localhost:8000') | |
print(list(ddb.tables.all())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment