Home > other >  Deploy compiled file to AWS Greengrass V2
Deploy compiled file to AWS Greengrass V2

Time:07-13

I have a compiled file of C/C , and I want to deploy this file to core device in Greengrass V2. If I use GUI, what do I need to change in recipe.YAML file to deploy successfully?

For Example: After compiled C/C file I have helloworld.out file, how can I deploy helloworld.out file and make it run in core device of Greengrass V2. With Python, I just deploy normally but with C/C I don't know how to do it?

Sorry for my English.

CodePudding user response:

With Greengrass v2, you need to put in the recipe yaml file the command to execute your C application. For python you might have done this:

Lifecycle:
  Run: |
    python3 -u {artifacts:path}/hello_world.py

Well in C , something like this should work:

Lifecycle:
  Run: |
    ./{artifacts:path}/helloworld.out

CodePudding user response:

After read document carefully and have some advice I could solve my problem.

I changed Lifecycle part in recipe file:

Lifecycle:
   Run: | 
      /{artifacts:path}/./helloworld.out

And Don't forget to change Execute Part from None to All(or Owner). If not you will get error about Permission.

  • Related