awslabs / aws-streaming-media-analytics

AWS Streaming Media Analytics is a serverless end-to-end solution for analyzing the video streaming experience
MIT No Attribution
39 stars 17 forks source link

Runtime ImportModuleErrror for DeployFunction Lambda #29

Open dvesh23 opened 1 year ago

dvesh23 commented 1 year ago

{ "errorType": "Runtime.ImportModuleError", "errorMessage": "Error: Cannot find module 'aws-sdk'\nRequire stack:\n- /var/task/index.js\n- /var/runtime/index.mjs", "stack": [ "Runtime.ImportModuleError: Error: Cannot find module 'aws-sdk'", "Require stack:", "- /var/task/index.js", "- /var/runtime/index.mjs", " at _loadUserApp (file:///var/runtime/index.mjs:997:17)", " at async UserFunction.js.module.exports.load (file:///var/runtime/index.mjs:1029:21)", " at async start (file:///var/runtime/index.mjs:1192:23)", " at async file:///var/runtime/index.mjs:1198:1" ] }

alcousins commented 1 year ago

Looking. It would be helpful to know exactly where this error came from. Will do a test deploy soon as likely something has changed in lambda runtime as versions have been updated. We might need to package the sdk as part of the build.

dvesh23 commented 1 year ago

This error came from deploying the stack in CFN when DeployFunction Resource failed to create

CloudFormation did not receive a response from your Custom Resource. Please check your logs for requestId [331f939e-51dd-45eb-ab34-f2442936a6ac]. If you are using the Python cfn-response module, you may need to update your Lambda function code so that CloudFormation can attach the updated version.
velartur commented 1 year ago

aws-streaming-analyticsv2.yaml.zip

Uploading fixed CloudFormation Template. BR

alcousins commented 1 year ago

Thanks arturo; a diff shows the key change is the Runtime version in deployment.yaml.

Working on testing a build with this updated.

alcousins commented 1 year ago

I have merged an update for this now. I still need to rebuild the deployment artifacts in the documentation. Working on this.