add DDB_ENDPOINT env var to specify endpoint

This commit is contained in:
Emil Lerch 2020-11-25 12:20:04 -08:00
parent e0bc85503b
commit 4bf6cbfb76
Signed by: lobo
GPG Key ID: A7B62D657EF764F8

View File

@ -10,7 +10,8 @@ import sys
import traceback
session = FuturesSession()
ddb = boto3.client('dynamodb')
ddb_url = os.getenv('DDB_ENDPOINT', None)
ddb = boto3.client('dynamodb', endpoint_url=ddb_url)
events = boto3.client('events')
table = os.getenv('ETAGS_TABLE', 'etags')
event_bus_name = os.getenv('ETAGS_BUS_NAME', 'url-content-changes')