aws-samples / aws-greengrass-samples

Samples for AWS Greengrass
MIT No Attribution
96 stars 68 forks source link

MessageSecurityMode & SecurityPolicy #11

Closed str3tch closed 4 years ago

str3tch commented 6 years ago

Issue #, if available: The enums that are used within index.js are actually defined in two external packages (not node-opcua). Without this fix, the code will fail stating MessageSecurityMode & SecurityPolicy are undefined:

/runtime/nodejs6.10/lambda_nodejs_runtime.js:171 throw e; ^

ReferenceError: MessageSecurityMode is not defined at Object. (/lambda/index.js:32:20) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at new Runtime (/runtime/nodejs6.10/lambda_nodejs_runtime.js:166:28) at Object. (/runtime/nodejs6.10/lambda_nodejs_runtime.js:366:17)

Description of changes: The relevant packages have been added to package.json, and index.js has been updated to pull in the enums from those packages.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

hudsonmd commented 5 years ago

Just ran into this issue and was able to resolve it using the commits in this PR. Would recommend merging in

MikeDombo commented 4 years ago

We have removed the OPC-UA example code from this repository. We suggest that customers look into using AWS IoT SiteWise as a replacement for ingesting data into AWS.