aws-samples / aws-lambda-extensions

A collection of sample extensions to help you get started with AWS Lambda Extensions
MIT No Attribution
442 stars 145 forks source link

cache-extension-demo #73

Closed agnel0410 closed 11 months ago

agnel0410 commented 2 years ago

Hi,

It looks like this extension works only for string data type. If "Data" has an object it returns none.

DDB entry: { "pKey": "pKey2", "sKey": "sKey2", "Data": { "Admission": "12345" } }

Query: const options = { hostname: 'localhost', port: 4000, path: '/dynamodb?name=DynamoDbTable-pKey2-sKey2', method: 'GET' };

output : {"pKey":"pKey2"}

hariohmprasath commented 1 year ago

Hi @agnel0410, Yes currently the code only works for string data types (https://github.com/aws-samples/aws-lambda-extensions/blob/main/cache-extension-demo/plugins/dynamodb.go#L86), but you can tweak this code to be more generic. We would be happy to receive any pull request and contributions on this. Thanks