Deploy web app to aws iot greengrass

0

I have developed a react project run by npm start and I would like to deploy it to AWS Iot greengrass. I initialized my component with the component template,and configure the gdk-config and recipe. But when I am building the component of my web application by gdk component build, it said the artifact file is not found. I have placed my project in the s3 bucket with a pth similar to this artifacts/componentName/componentVersion/ and tried placing my project in the src directory and a artifacts directory, but the problem consist. How can I solve this problem? 在此处输入图片描述

2 Antworten
1
profile pictureAWS
EXPERTE
beantwortet vor einem Jahr
1

Hi. I think if you look in Desktop/cp/zip-build you will see you have an archive named cp.zip. The zip build system creates an archive named after the current directory: https://github.com/aws-greengrass/aws-greengrass-gdk-cli/blob/a2b4a4b7b6867a39e12d52a2a3997b9a4a605ac2/gdk/commands/component/BuildCommand.py#L186 . Therefore your recipe should specify a zip file name that matches the directory name.

I recommend you add the --debug switch to your 'gdk component build command to get a better understanding on how the zip build system works: https://github.com/aws-greengrass/aws-greengrass-gdk-cli/blob/a2b4a4b7b6867a39e12d52a2a3997b9a4a605ac2/gdk/commands/component/BuildCommand.py#L161-L194

profile pictureAWS
EXPERTE
Greg_B
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen