14 lines
256 B
Python
14 lines
256 B
Python
import os
|
|
|
|
import boto3
|
|
|
|
|
|
def get_dynamodb_client():
|
|
if os.getenv('AWS_LAMBDA_FUNCTION_NAME'):
|
|
return boto3.client('dynamodb')
|
|
|
|
return boto3.client('dynamodb', endpoint_url='http://localhost:8000')
|
|
|
|
|
|
dynamodb_client = get_dynamodb_client()
|