wio
This commit is contained in:
@@ -7,7 +7,7 @@ def get_dynamodb_client():
|
||||
if os.getenv('AWS_LAMBDA_FUNCTION_NAME'):
|
||||
return boto3.client('dynamodb')
|
||||
|
||||
return boto3.client('dynamodb', endpoint_url='http://localhost:8000')
|
||||
return boto3.client('dynamodb', endpoint_url='http://127.0.0.1:8000')
|
||||
|
||||
|
||||
dynamodb_client = get_dynamodb_client()
|
||||
|
||||
@@ -3,3 +3,4 @@ import os
|
||||
USER_TABLE: str = os.getenv('USER_TABLE') # type: ignore
|
||||
ORDER_TABLE: str = os.getenv('ORDER_TABLE') # type: ignore
|
||||
ENROLLMENT_TABLE: str = os.getenv('ENROLLMENT_TABLE') # type: ignore
|
||||
NEW_ENROLLMENT_TABLE: str = os.getenv('NEW_ENROLLMENT_TABLE') # type: ignore
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
"""
|
||||
Stopgap events. Everything here is a quick fix and should be replaced with
|
||||
proper solutions.
|
||||
"""
|
||||
|
||||
14
enrollment-management/app/events/stopgap/enroll.py
Normal file
14
enrollment-management/app/events/stopgap/enroll.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from aws_lambda_powertools import Logger
|
||||
from aws_lambda_powertools.utilities.data_classes import (
|
||||
EventBridgeEvent,
|
||||
event_source,
|
||||
)
|
||||
from aws_lambda_powertools.utilities.typing import LambdaContext
|
||||
|
||||
logger = Logger(__name__)
|
||||
|
||||
|
||||
@event_source(data_class=EventBridgeEvent)
|
||||
@logger.inject_lambda_context
|
||||
def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
|
||||
return True
|
||||
Reference in New Issue
Block a user