0

I have been using DAX on top of my DynamoDB queries. I will write Lambda functions and test them locally. However I can only use DAX in a VPC so as far as I can tell I cannot use DAX locally. To get around this I have a databse handler that either uses DAX or Dynamo depending on the env. This means however that I am never using DAX during my development and have noticed that the Lambda logs show that the response from DAX is basically empty, and where I am using the expected ResponseMetadata in my code to verify the success or failure of a query.

I need to work out how to use DAX locally really but essentially I would love to know even more how to work with this lack of a response and whether I can get one out of it? Or if I should just rely on the result of try/except.

Thanks for any help or suggestions!

bldcaveman
  • 153
  • 1
  • 10
  • 1
    "Unfortunately DAX is a VPC only service, you would be unable to connect to it locally with ease. Can you share with me which ResponseMetadata you are dependent on, I can raise a feature request with the DAX team internally to expose the metadata in the response." is the response I got on the AWS forum – bldcaveman Jan 09 '23 at 19:09

1 Answers1

2

DAX would throw an exception if the response was a non 200, which you would catch in your try/catch. Allowing all_old is incase you overwrite an item and want to know its values, you already know the new values as thats what you are currently writing.

In DynamoDB you will only get a 200 if the item is persisted to at least 2/3 storage nodes, which means items are always durable when you receive a 200 response.

https://repost.aws/questions/QUEruXJYA7RSynZtxkcfhPyg/dax-in-front-of-dynamo-does-not-reply-with-response-metadata

TLDR: Don't rely on ResponseMetadata, use Try/Catch (exception)

Maurice
  • 11,482
  • 2
  • 25
  • 45
bldcaveman
  • 153
  • 1
  • 10