Skip to content

Commit

Permalink
updated logging info #6
Browse files Browse the repository at this point in the history
  • Loading branch information
kunduso committed Aug 29, 2024
1 parent 1f5a78e commit 68d8497
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lambda_function/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,12 @@ def lambda_handler(event, context):
# Setup the client
#service_client = boto3.client('secretsmanager', config=config, endpoint_url=os.environ['SECRETS_MANAGER_ENDPOINT'])
secret_arn = event['SecretId']
step = event['Step']
log_group_name = os.environ['log_group_name']
log_stream_name = os.environ['log_stream_name']
try:
log_cloudwatch(log_group_name, log_stream_name, f"Lambda Function Run")
log_cloudwatch(log_group_name, log_stream_name, secret_arn)
log_cloudwatch(log_group_name, log_stream_name, step)
except Exception as e:
logging.error(f"An error occurred: {e}")
Binary file added lambda_function/lambda_function.zip
Binary file not shown.

0 comments on commit 68d8497

Please sign in to comment.