Upload File To S3
Description
Uploads a file to S3 using a signed URL with retry logic and a hard timeout.
Function Signature:
def upload_file_to_s3(file_path: str, signed_url: str, timeout: int = 0) -> int:
Parameters
- file_path (str): Full path to the file on disk.
- signed_url (str): Input value for
signed_url. - timeout (int): Request timeout in seconds.
Returns
- int: Return value from the function.
Example Usage
# Example usage
file_path = "example"
signed_url = "example"
timeout = 1
result = upload_file_to_s3(file_path, signed_url, timeout)
print(result)
Behavior
- Executes the function logic with the provided arguments.
- On success, returns the computed value or result object.
Error Handling
- Exceptions are handled within the function where implemented.