Skip to content

Commit

Permalink
fix json formatting of cma invoke
Browse files Browse the repository at this point in the history
  • Loading branch information
torimcd committed May 2, 2024
1 parent 49f0af2 commit 191f76d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bignbit/handle_gitc_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ def handler(event, _):

cma_event = ('{"pobit_audit_bucket": "' + os.environ['POBIT_AUDIT_BUCKET_NAME']
+ '", "cma_key_name": "' + cma_key.format(os.environ['POBIT_AUDIT_PATH_NAME'], collection, gitc_id, received_time)
+ '", "cma_content": "' + json.dumps(message_body) + '"}')
+ '", "cma_content": ' + json.dumps(message_body) + '}')

try:
client.invoke(
FunctionName=os.environ['SAVE_CMA_LAMBDA_FUNCTION_NAME'],
InvocationType='Event',
Payload=cma_event)
logger.info("Save CMA message lambda invoked for uuid %s", gitc_id)
logger.info("Save CMA message lambda invoked for id %s", gitc_id)
except ClientError:
logger.warning("Error invoking save cma lambda for messageId %s gitcID %s",
message['messageId'], gitc_id,
Expand Down
2 changes: 1 addition & 1 deletion bignbit/save_cma_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ def lambda_handler(event, _context):

gitc_id = cma_content['identifier']

logger.info("Uploading CMA message to S3 for uuid %s", gitc_id)
logger.info("Uploading CMA message to S3 for id %s", gitc_id)
upload_cma(pobit_audit_bucket, cma_key_name, cma_content)

0 comments on commit 191f76d

Please sign in to comment.