Hello,
I’m trying to use a ServerModule to upload a file to s3.
while the aws key & secret are configured as “app secrets”, i’m getting “Access Denied” error
Please note the using the exact same key+secret locally works.
I’ve printed the key+secret to the console to make sure boto3 can use them and they printed ok.
This is the part from the ServerModule:
AWS_ACCESS_KEY_ID = anvil.secrets.get_secret(‘aws_key’)
AWS_SECRET_ACCESS_KEY = anvil.secrets.get_secret(‘aws_secret’)
AWS_DEFAULT_REGION = “us-east-1”
This is the Error:
ClientError: An error occurred (AccessDenied) when calling the PutObject operation: Access Denied
at /usr/local/lib/python3.6/site-packages/botocore/client.py, line 612
called from /usr/local/lib/python3.6/site-packages/botocore/client.py, line 314
called from /usr/local/lib/python3.6/site-packages/boto3/resources/action.py, line 83
called from /usr/local/lib/python3.6/site-packages/boto3/resources/factory.py, line 520
called from ServerModule1, line 53
called from Form6, line 20