How do I mock dynamoDB.DocumentClient batchWrite? "Requested resource not found"
See original GitHub issueThis is my pattern on all, works for ‘get’ ‘put’ ‘delete’ and so on. But when I try to mock batchWrite it doesn’t find my mockup. Have also tried ‘batchWriteItem’ does not work.
AWS.mock('DynamoDB.DocumentClient', 'batchWrite', (params: any, callback: any) => callback(null, {}));
Anyone know how?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top Results From Across the Web
AWS DynamoDB resource not found exception - Stack Overflow
I got Error warning Lambda : lifecycleIteration=0 lambda handler returned an error: ResourceNotFoundException: Requested resource not found.
Read more >Error handling with DynamoDB - AWS Documentation
Message: Requested resource not found. Example: The table that is being requested does not exist, or is too early in the CREATING state....
Read more >A brand new website interface for an even better experience!
How do I mock dynamoDB.DocumentClient batchWrite? "Requested resource not found"
Read more >[Solved] AWS DynamoDB errors ResourceNotFoundException
DynamoDB responds with this error when you're trying to run an operation against non-existent or not active table. Troubleshooting steps:.
Read more >Using with DynamoDB - Jest
Jest DynamoDB provides all required configuration to run your tests using ... const {DocumentClient} = require('aws-sdk/clients/dynamodb');
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Is there any plans to mock batchWrite on
DynamoDB.DocumentClient
from the aws docs:
so @kevinrambaud was right, i was able to mock using a sinon stub doing this:
fwiw, this will only apply to
dynamoDb.DocumentClient.batchWrite().promise()