You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm new to moto so apologies if this is trivial. I am trying to mock dynamodb, but running into authorization problems. I am fairly sure it is an environment issue, but can't figure out what exactly I am doing wrong.
The mock_dynamodb function was iterated quite a lot. I tried to use boto3.resource.Table, also tried to create a session, passing it the credentials directly and then create the table, but no luck.
The ProjectConfig class receives a boto3.resource('dynamodb').Table instance as an argument so I don't think this is an import issue. The config class doesn't set up any clients just uses whatever it receives. As you can see I am setting up the mock credentials, but regardless whenever I am running my tests I receive: An error occurred (UnrecognizedClientException) when calling the Scan operation: The security token included in the request is invalid.
I should probably mention I use VsCode with an AWS plugin. I also set up a "moto" profile with with dummy credentials and tried to use that profile, but same result.
I am using python 3.12.1. The project dependencies from pyproject.toml are the following:
I tried moving the imports and pathing the resource, but no luck. I get the exact same result. Unfortunately I won't be able to test this further for a while. Hopefully my colleagues will have better luck with this.
Hi!
I'm new to moto so apologies if this is trivial. I am trying to mock dynamodb, but running into authorization problems. I am fairly sure it is an environment issue, but can't figure out what exactly I am doing wrong.
Here is the relevant part of the test script:
The mock_dynamodb function was iterated quite a lot. I tried to use boto3.resource.Table, also tried to create a session, passing it the credentials directly and then create the table, but no luck.
The ProjectConfig class receives a boto3.resource('dynamodb').Table instance as an argument so I don't think this is an import issue. The config class doesn't set up any clients just uses whatever it receives. As you can see I am setting up the mock credentials, but regardless whenever I am running my tests I receive:
An error occurred (UnrecognizedClientException) when calling the Scan operation: The security token included in the request is invalid.
I should probably mention I use VsCode with an AWS plugin. I also set up a "moto" profile with with dummy credentials and tried to use that profile, but same result.
I am using python 3.12.1. The project dependencies from pyproject.toml are the following:
The text was updated successfully, but these errors were encountered: