1 Answer
- Newest
- Most votes
- Most comments
0
Hi,
SSM Agent is not able to access Greengrass variables since it is not executed as a child process of Greengrass, but as an independent process executed by systemd
, even when you deploy it via aws.greengrass.SystemManagerAgent
component.
What you can do is to write a component that export that variable so that it is available to the script run by the SSM Agent. One example would be to write that ThingName in a file inside /var/
or /etc/
folders, and then read it from your script before executing it. Alternatively the custom component could add an export
to the .bashrc
file of the SSM Agent user and execute your script in bash.
Cheers,
Massimiliano
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
Hi Massimiliano, Is there a way to get the Managed node "SourceId" using the SSM run command to run a shell script?
Could you please explain what you are trying to do?