Skip to content

Commit

Permalink
Remove /tmp/ from logs path.
Browse files Browse the repository at this point in the history
  • Loading branch information
niccolozanotti committed Sep 5, 2024
1 parent e37a1c0 commit ad1970c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lambda_function.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import json

import botocore
from flask import Flask, request
from flask_cors import CORS
import boto3
Expand Down Expand Up @@ -63,7 +61,7 @@ def log_action(name, action):
def append_log_to_s3(log_entry):
today = datetime.today()
LOG_FILE_KEY = f'{today.strftime("%Y-%m-%d")}-logs.csv'
log_file = f'/tmp/{LOG_FILE_KEY}' # Temporary file path
log_file = f'{LOG_FILE_KEY}' # Temporary file path

# Attempt to download the existing log file from S3 if it exists
try:
Expand Down

0 comments on commit ad1970c

Please sign in to comment.