diff --git a/README.md b/README.md index 1ffe714..41e3143 100644 --- a/README.md +++ b/README.md @@ -113,8 +113,8 @@ Output images by default are returned in base64 format form the serverless API. ``` ENABLE_S3_UPLOAD="TRUE" -AWS_ACCESS_KEY="" -AWS_SECRET_KEY="" +AWS_ACCESS_KEY_ID="" +AWS_SECRET_ACCESS_KEY="" AWS_BUCKET_NAME="" AWS_REGION="" ``` diff --git a/src/handler.py b/src/handler.py index 317264e..a03aa0f 100644 --- a/src/handler.py +++ b/src/handler.py @@ -36,8 +36,8 @@ MODEL_CACHE_PATH = "/runpod-volume/models" if PROD else MODEL_CACHE_PATH_DEV # AWS config ENABLE_S3_UPLOAD = os.getenv('ENABLE_S3_UPLOAD', 'FALSE') == 'TRUE' -AWS_ACCESS_KEY = os.getenv('AWS_ACCESS_KEY', '') -AWS_SECRET_KEY = os.getenv('AWS_SECRET_KEY', '') +AWS_ACCESS_KEY_ID = os.getenv('AWS_ACCESS_KEY_ID_ID', '') +AWS_SECRET_ACCESS_KEY = os.getenv('AWS_SECRET_ACCESS_KEY', '') AWS_BUCKET_NAME = os.getenv('AWS_BUCKET_NAME', '') AWS_REGION_DEFAULT = 'us-east-1' AWS_REGION = os.getenv('AWS_REGION', AWS_REGION_DEFAULT) @@ -256,8 +256,8 @@ def get_s3_client(): print("Connecting to S3") s3_client = boto3.client( 's3', - aws_access_key_id=AWS_ACCESS_KEY, - aws_secret_access_key=AWS_SECRET_KEY, + AWS_ACCESS_KEY_ID_id=AWS_ACCESS_KEY_ID, + aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION ) print("Connected to S3")