add sample
This commit is contained in:
15
http-api/boto3clients.py
Normal file
15
http-api/boto3clients.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import os
|
||||
|
||||
import boto3
|
||||
|
||||
DYNAMODB_ENDPOINT_URL: str | None = None
|
||||
|
||||
if 'AWS_SAM_LOCAL' in os.environ:
|
||||
DYNAMODB_ENDPOINT_URL = 'http://host.docker.internal:8000'
|
||||
|
||||
|
||||
if 'DYNAMODB_ENDPOINT_URL' in os.environ:
|
||||
DYNAMODB_ENDPOINT_URL = os.getenv('DYNAMODB_ENDPOINT_URL')
|
||||
|
||||
|
||||
dynamodb_client = boto3.client('dynamodb', endpoint_url=DYNAMODB_ENDPOINT_URL)
|
||||
Reference in New Issue
Block a user