Hi, I'm trying to get some items from dynamodb, I ...
# aws
h
Hi, I'm trying to get some items from dynamodb, I could get it using aws-sdk, I wonder if someone have an example using this function: https://www.pulumi.com/docs/reference/pkg/aws/dynamodb/tableitem/#look-up
b
Are you looking to use the items retrieved in your pulumi program?
h
yes right
b
So I did some experimenting and the ID that you can get out of the tableItem resource is of the format
{tablename}|{hashkeyname}||{hashkeyvalue}||{rangekeyname}||{rangekeyvalue}|
(so swap the {} values for what you have - in the example that you get from https://www.pulumi.com/docs/reference/pkg/aws/dynamodb/tableitem/ you get something like
exampleTable-9d70e8a|exampleHashKey||something|
(because it doesn't have a rangekey). So you can pass that into the ID parameter of the look up function
h
thanks Pier, I will try that