Reputation: 242
I am trying to write to a Timestream database I have created. But, before that it should be stated that I have my AWS account set up with a DEV account and a Prod account which I role switch into.
I created the Timestream database and Table in cloudformation and deployed it to the DEV account.
I then went to my pycharm editor and wrote a script to ingest data to this table
However, I keep getting the error botocore.errorfactory.ResourceNotFoundException: An error occurred (ResourceNotFoundException) when calling the WriteRecords operation: The table experiment does not exist.
The table definitely does exist, I can verify that in the AWS console in the DEV account and by calling the timestream-write list-tables cli call within the DEV account
I think the pycharm editor is trying to connect to the admin account when running the script but not entirely sure. I am switched into the DEV account in my pycharm editor so maybe it could be something else?
I should add that if I deploy the CF template into the Master account and then run my script it works just fine. All the data gets imported into the database and table which were created in the master account.
It just wont work when I do the exact same steps in the DEV account
Any help would be appreciated!
Upvotes: 2
Views: 821
Reputation: 91
I was using AWS-SDK in the NodeJs and got to same problem (and to this thread in SO).
First I tried using using full (piped) table name (as was provided by SAM template):
DatabaseName: 'MyTimeseriesDb-dev',
TableName: 'MyTimeseriesDb-dev|Measurements',
but when i changed table name to be "just table name" without the pipe symbol, it worked.
DatabaseName: 'MyTimeseriesDb-dev',
TableName: 'Measurements',
I hope this works for anybody else who wanders here.
Upvotes: 1