This commit is contained in:
2025-06-06 18:32:09 -03:00
parent 3e44761e69
commit 53613d0a48
34 changed files with 939 additions and 752 deletions

View File

@@ -9,8 +9,11 @@ def get_dynamodb_client():
if os.getenv('AWS_LAMBDA_FUNCTION_NAME') and not running_sam_local:
return boto3.client('dynamodb')
url = 'host.docker.internal' if running_sam_local else 'localhost'
return boto3.client('dynamodb', endpoint_url=f'http://{url}:8000')
docker_host = 'host.docker.internal'
local_host = '127.0.0.1'
host = docker_host if running_sam_local else local_host
return boto3.client('dynamodb', endpoint_url=f'http://{host}:8000')
dynamodb_client = get_dynamodb_client()