Hi all,
Lately, AWS discontinued support for node12 in AWS Lambda, so I’m attempting to update the Serverless framework used in AWS Fhir Works Deployment from v2 to v3, as v2 was deploying an API logging Lambda that was hard-coded to use node12.
Updating from v2 to v3 removes errors from AWS that node12 is no longer supported, however I am now getting the following error with stack trace:
Error:
TypeError: Cannot read property 'cloudFront' of undefined
at /codebuild/output/src3573154942/src/fhirworks/fhir-works-on-aws-deployment/node_modules/serverless/lib/plugins/aws/package/compile/events/cloud-front.js:275:52
at Array.find (<anonymous>)
at /codebuild/output/src3573154942/src/fhirworks/fhir-works-on-aws-deployment/node_modules/serverless/lib/plugins/aws/package/compile/events/cloud-front.js:275:30
at Array.forEach (<anonymous>)
at AwsCompileCloudFrontEvents.prepareFunctions (/codebuild/output/src3573154942/src/fhirworks/fhir-works-on-aws-deployment/node_modules/serverless/lib/plugins/aws/package/compile/events/cloud-front.js:273:47)
at before:package:compileFunctions (/codebuild/output/src3573154942/src/fhirworks/fhir-works-on-aws-deployment/node_modules/serverless/lib/plugins/aws/package/compile/events/cloud-front.js:219:59)
at PluginManager.runHooks (/codebuild/output/src3573154942/src/fhirworks/fhir-works-on-aws-deployment/node_modules/serverless/lib/classes/plugin-manager.js:530:15)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async PluginManager.invoke (/codebuild/output/src3573154942/src/fhirworks/fhir-works-on-aws-deployment/node_modules/serverless/lib/classes/plugin-manager.js:563:9)
at async PluginManager.spawn (/codebuild/output/src3573154942/src/fhirworks/fhir-works-on-aws-deployment/node_modules/serverless/lib/classes/plugin-manager.js:585:5)
at async before:deploy:deploy (/codebuild/output/src3573154942/src/fhirworks/fhir-works-on-aws-deployment/node_modules/serverless/lib/plugins/deploy.js:40:11)
at async PluginManager.runHooks (/codebuild/output/src3573154942/src/fhirworks/fhir-works-on-aws-deployment/node_modules/serverless/lib/classes/plugin-manager.js:530:9)
at async PluginManager.invoke (/codebuild/output/src3573154942/src/fhirworks/fhir-works-on-aws-deployment/node_modules/serverless/lib/classes/plugin-manager.js:563:9)
at async PluginManager.run (/codebuild/output/src3573154942/src/fhirworks/fhir-works-on-aws-deployment/node_modules/serverless/lib/classes/plugin-manager.js:604:7)
at async Serverless.run (/codebuild/output/src3573154942/src/fhirworks/fhir-works-on-aws-deployment/node_modules/serverless/lib/serverless.js:179:5)
at async /codebuild/output/src3573154942/src/fhirworks/fhir-works-on-aws-deployment/node_modules/serverless/scripts/serverless.js:834:9
My confusion with this is that the AWS Fhir Works architecture doesn’t use cloudFront. There’s also no configuration in the serverless.yaml for cloudFront events (see linked repo serverless.yaml in base directory - I am unfortunately limited to 2 links in this post).
Am I missing something here? Perhaps some sort of default behavior of Serverless with AWS provider? Perhaps some dependencies are causing the issue?
Thanks in advance for any support anyone can offer!