fugue / credstash

A little utility for managing credentials in the cloud
Apache License 2.0
2.06k stars 214 forks source link

ResourceNotFoundException error after upgrade to 1.16.2 #270

Closed tt-sergey closed 4 years ago

tt-sergey commented 4 years ago

Started getting error with credstash v1.16.2:

2020-02-10 15:33:10,131 ERROR An error occurred (ResourceNotFoundException) when calling the Scan operation: Requested resource not found Traceback (most recent call last): File "/Users/sergeytopchiy/Library/Python/3.7/bin/credstash.py", line 262, in func_wrapper return func(args, kwargs) File "/Users/sergeytopchiy/Library/Python/3.7/bin/credstash.py", line 296, in listSecrets response = secrets.scan(params) File "/Users/sergeytopchiy/Library/Python/3.7/lib/python/site-packages/boto3/resources/factory.py", line 520, in do_action response = action(self, args, kwargs) File "/Users/sergeytopchiy/Library/Python/3.7/lib/python/site-packages/boto3/resources/action.py", line 83, in call response = getattr(parent.meta.client, operation_name)(params) File "/Users/sergeytopchiy/Library/Python/3.7/lib/python/site-packages/botocore/client.py", line 276, in _api_call return self._make_api_call(operation_name, kwargs) File "/Users/sergeytopchiy/Library/Python/3.7/lib/python/site-packages/botocore/client.py", line 586, in _make_api_call raise error_class(parsed_response, operation_name) botocore.errorfactory.ResourceNotFoundException: An error occurred (ResourceNotFoundException) when calling the Scan operation: Requested resource not found

but everything works fine with v1.16.1

Example of usage: credstash -p dev -t credstash-dev getall

python -V Python 3.7.3

mike-luminal commented 4 years ago

@tt-sergey is there a region set in the dev AWS profile? Can you check if the credstash-dev table is in the correct region?

tt-sergey commented 4 years ago

Region in the dev AWS profile is set to us-east-1 and credstash-dev table is in correct region. Same configuration works without any issues with credstash v1.16.1.

mike-luminal commented 4 years ago

This is fixed on master and will go out in the next release.

Here's the test scenario I ran: AWS profile region: us-east-1

[credstash 1.16.1]
credstash -p profile -t credstash setup
credstash -p profile -t credstash put test blah
credstash -p profile -t credstash getall
{
    "test": "blah"
}
[credstash 1.16.2]
credstash -p profile -t credstash getall
An error occurred (ResourceNotFoundException) when calling the Scan operation: Requested resource not found
[credstash master]
credstash -p profile -t credstash getall
{
    "test": "blah"
}