rji-futures-lab / django-fcc-opif

For extracting and analyzing data from the FCC Public Inspection files
0 stars 0 forks source link

Figure out InvalidToken error with S3 #31

Closed gordonje closed 4 years ago

gordonje commented 4 years ago
Traceback (most recent call last):
    File "/var/task/s3transfer/tasks.py", line 126, in __call__
    return self._execute_main(kwargs)
    File "/var/task/s3transfer/tasks.py", line 150, in _execute_main
    return_value = self._main(**kwargs)
    File "/var/task/s3transfer/upload.py", line 692, in _main
    client.put_object(Bucket=bucket, Key=key, Body=body, **extra_args)
    File "/var/task/botocore/client.py", line 357, in _api_call
    return self._make_api_call(operation_name, kwargs)
    File "/var/task/botocore/client.py", line 661, in _make_api_call
    raise error_class(parsed_response, operation_name)
    botocore.exceptions.ClientError: An error occurred (InvalidToken) when calling the PutObject operation: The provided token is malformed or otherwise invalid.
gordonje commented 4 years ago

Just tried re-issuing new security credentials to the fcc-opif IAM user. Still not working after adding these to secrets.cfg

gordonje commented 4 years ago

Appears to be connected to this issue: https://github.com/jschneier/django-storages/issues/606

gordonje commented 4 years ago

I commented out AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY is `settings/prod.py. Now it's working.