You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
512 B
Python

import boto3
from yt_dlp_stream_to_s3.config import (
AWS_ENDPOINT_URL,
AWS_SECRET_ACCESS_KEY,
AWS_ACCESS_KEY_ID,
)
from yt_dlp_stream_to_s3.errors import YtDlpStreamToS3ConnectionError
try:
s3 = boto3.client(
"s3",
endpoint_url=AWS_ENDPOINT_URL,
aws_secret_access_key=AWS_SECRET_ACCESS_KEY,
aws_access_key_id=AWS_ACCESS_KEY_ID,
)
except Exception:
raise YtDlpStreamToS3ConnectionError(
f"Could not connect to S3 service {AWS_ENDPOINT_URL}"
)