diff --git a/lib/nexrad/s3.py b/lib/nexrad/s3.py index dccdac8..b1232d9 100644 --- a/lib/nexrad/s3.py +++ b/lib/nexrad/s3.py @@ -1,6 +1,11 @@ import re import datetime +import boto3 + +from botocore import UNSIGNED +from botocore.config import Config + S3_BUCKET = 'noaa-nexrad-level2' S3_KEY_RE = re.compile(r'^(\d{4})/(\d{2})/(\d{2})/([A-Z]{4})/([A-Z]{4})(\d{4})(\d{2})(\d{2})_(\d{2})(\d{2})(\d{2})[_\.]') @@ -28,8 +33,8 @@ class S3Bucket(): name: str cache: dict - def __init__(self, s3, name: str=S3_BUCKET): - self.s3 = s3 + def __init__(self, name: str=S3_BUCKET): + self.s3 = boto3.client('s3', config=Config(signature_version=UNSIGNED)) self.name = name self.cache = dict()