in createHeaders. Note this is a short-lived token so likely this has to be looked up each time anyways (I don't think this can be cached)...
I can confirm this fix works for deno+dynamodb on aws lambda 🎉 but perhaps there is a better way to do it from a style/testing point of view?
Aside: Without this fix the underlying request gives a "The security token included in the request is invalid." error, but you don't see that without modifying the dynamodb code just Error: http query request failed: 400 Bad Request, it'd be great to bubble up the json error message (which was googleable / suggested this solution).
For example in aws lambda, in order for the client to work it needs to pass the header (if it exists):
in createHeaders. Note this is a short-lived token so likely this has to be looked up each time anyways (I don't think this can be cached)...
I can confirm this fix works for deno+dynamodb on aws lambda 🎉 but perhaps there is a better way to do it from a style/testing point of view?
Aside: Without this fix the underlying request gives a "The security token included in the request is invalid." error, but you don't see that without modifying the dynamodb code just
Error: http query request failed: 400 Bad Request
, it'd be great to bubble up the json error message (which was googleable / suggested this solution).