AWS lambda resin + multicontainer = device not found (undefined)


#1

Hello,

I am using the Intel NUC, with the newest resin image + multicontainer function.
I am using this on my AWS: https://github.com/resin-io-projects/resin-aws-lambda

and this on my device: https://github.com/resin-io-projects/resin-aws-device
I followed the instructions and when the device boots it invokes the lambda api gateway of AWS, but I am not getting the keys back. I get following error when I look into my logs (AWS):
{
“errorMessage”: “Device not found: undefined”,
“errorType”: “ResinDeviceNotFound”,
“stackTrace”: [
“/var/task/node_modules/resin-sdk/build/models/device.js:217:15”,
“PassThroughHandlerContext.finallyHandler (/var/task/node_modules/resin-settings-storage/node_modules/bluebird/js/release/finally.js:57:23)”,
“PassThroughHandlerContext.tryCatcher (/var/task/node_modules/resin-settings-storage/node_modules/bluebird/js/release/util.js:16:23)”,
“Promise._settlePromiseFromHandler (/var/task/node_modules/resin-settings-storage/node_modules/bluebird/js/release/promise.js:512:31)”,
“Promise._settlePromise (/var/task/node_modules/resin-settings-storage/node_modules/bluebird/js/release/promise.js:569:18)”,
“Promise._settlePromise0 (/var/task/node_modules/resin-settings-storage/node_modules/bluebird/js/release/promise.js:614:10)”,
“Promise._settlePromises (/var/task/node_modules/resin-settings-storage/node_modules/bluebird/js/release/promise.js:693:18)”,
“Async._drainQueue (/var/task/node_modules/resin-settings-storage/node_modules/bluebird/js/release/async.js:133:16)”,
“Async._drainQueues (/var/task/node_modules/resin-settings-storage/node_modules/bluebird/js/release/async.js:143:10)”,
“Immediate.Async.drainQueues [as _onImmediate] (/var/task/node_modules/resin-settings-storage/node_modules/bluebird/js/release/async.js:17:14)”,
“processImmediate [as _immediateCallback] (timers.js:383:17)”
]
}

This should mean that the POST request using:

curl -X POST -H "Cache-Control: no-cache" -H 'Content-Type: application/json' \
-v -d '{ "uuid": "'$RESIN_DEVICE_UUID'", "attributes": { "type": "Intel_NUC" } }' \

is sending a undefined uuid value? If I use printenv in the container, I see RESIN_DEVICE_UUID

What do you think am I missing?

Thanks