-
-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Home Assistant OS: 12.4
Home Assistant Core: 2024.6.4
HASS-S3: 1.12 installed with HACS
The region in configuration file is ignored when I make a Sign URL Service request.
I have the following in my configuration.yaml:
s3:
aws_access_key_id: <key>
aws_secret_access_key: <secret>
region_name: us-east-2
I am using the Sign URL Service request in a script:
get_snapshot_url:
alias: Get snapshot URL
sequence:
- service: s3.signurl
data:
bucket: <bucket>
key: snapshots/backyard/snapshot.jpg
duration: 3600
I have confirmed the image exists on my S3 bucket.
The URL I get back gives me the following error:
InvalidRequestThe authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.
I added a log statement to line 239 of custom_components/s3/init.py to log the region being used:
_LOGGER.error("Region %s", entry.data[CONF_REGION])
"Region us-east-1" is printed in the log.
Everything works if I hard code the region as below.
The Put Service was working as expected.