Skip to content

Commit

Permalink
ADD Changes in lambda functions to horizontally scale, instead of try…
Browse files Browse the repository at this point in the history
…ing to process a large amount of files in one lambda

Refer to task #54
  • Loading branch information
ramesh-maddegoda committed Feb 15, 2024
1 parent ee00168 commit ee9c906
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/pds/ingress/pds-nucleus-datasync-completion-trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@


def lambda_handler(event, context):
""" Lambda Handler """
""" Lambda Handler - The entry point of lambda """

logger.info(f"Lambda Request ID: {context.aws_request_id}")
logger.info(f"Event: {event}")
Expand Down
6 changes: 2 additions & 4 deletions src/pds/ingress/pds-nucleus-datasync-completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,12 @@
rds_data = boto3.client('rds-data')

def lambda_handler(event, context):
""" Lambda Handler """
""" Lambda Handler - The entry point of lambda """

logger.info(f"Lambda Request ID: {context.aws_request_id}")
logger.info(f"Event: {event}")

json_event = json.dumps(event)
transfer_report = json.loads(json_event)
content_object = s3.Object('pds-nucleus-datassync-reports', str(transfer_report["s3_key"]))
content_object = s3.Object('pds-nucleus-datassync-reports', str(event["s3_key"]))
transfer_report_file_content = content_object.get()['Body'].read().decode('utf-8')
transfer_report_json_content = json.loads(transfer_report_file_content)
verified_file_obj_list = transfer_report_json_content['Verified']
Expand Down
2 changes: 1 addition & 1 deletion src/pds/ingress/pds-nucleus-product-completion-checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
replace_prefix = efs_mount_path

def lambda_handler(event, context):
""" Main lambda handler """
""" Lambda Handler - The entry point of lambda """

logger.setLevel(logging.DEBUG)
logger.addHandler(logging.StreamHandler())
Expand Down

0 comments on commit ee9c906

Please sign in to comment.