Skip to content

Instantly share code, notes, and snippets.

@ross-humphrey
Created November 27, 2019 09:25
Show Gist options
  • Save ross-humphrey/f0e3e6a648bb9c503f79c1ade3b25058 to your computer and use it in GitHub Desktop.
Save ross-humphrey/f0e3e6a648bb9c503f79c1ade3b25058 to your computer and use it in GitHub Desktop.
🏭 How to connect to a local dynamo db
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