I am trying to list the Items
and other values from the AWS Dynamodb table(DDNS
), However, if only look for InstnaceId
then I am able to get the entire list of my instances, however i want to get few more selective values from the table which is a nested json, I am not able to figure about how to do that.
Below is Successful while only looking for InstanceId
:
(awscliv2) $ aws dynamodb scan --table-name DDNS --query "Items[*].{InstanceId:InstanceId}" --region us-west-2
[
{
"InstanceId": {
"S": "i-03dd05693e4y43b9b"
}
},
{
"InstanceId": {
"S": "i-07b4a8yr38d89faf1"
}
},
{
"InstanceId": {
"S": "i-029340cb56eeae8a1"
}
},
View From AWS DynamoDB console:
Below I could see, there are two columns
- one is
InstanceId
- another is
InstanceAttributes
and all these values nested in this only
Below is just what the nested output looks like:
- precisely from the below I want to list down values like
InstanceId
,RootDeviceName
,ImageId
andInstanceType
etc. - I am failing to get there to list them.
apologies, i am adding pics here Just to address my issues. any help will be very much appreciated.