Configure Systems Manager proxy using Greengrass

0

We are trying to deploy AWS Systems Manager Agent using Greengrass, which should then connect via a proxy.

The deployment works successfully, however, the logs show that the http_proxy / https_proxy environment variables are not being read from the Greengrass configuration. This is because the Systems Manager Agent gets installed via Snap then runs as a systemd service and therefore has no access to the Greengrass environment variables.

We can terminal in to the device and set the proxy up manually (using systemctl edit snap.amazon-ssm-agent.amazon-ssm-agent), but we do not want to have to do this manually for each device.

Is there any way to configure the proxy from Greengrass?

1 Antwort
1
Akzeptierte Antwort

Hello,

Thank you for reaching out on re:Post. My name is Tom from AWS Support. I see that we would like to configure Systems Manager proxy from Greengrass programmatically.

After further research, the reason that http_proxy / https_proxy environment variables are not being read from the Greengrass configuration is that these environment variables are not Greegrass variables. These are general Linux environment variables for devices. For a list of supported environment variables from Greengrass, please see the reference here [1].

Reading through your use case, it is possible to create a customized component [2] to pull the http_proxy / https_proxy environment variables details from a source (such as a text file from a S3 bucket) and then use code to run the commands for deployment.

Alternatively, if the http_proxy / https_proxy environment variables are static, it can be hard coded into the component's config and use code to pull config for updating http/https_proxy environment.

If the devices are accessible through System Manager, once the System Manager Agent is installed, it could be possible to use run command [3] to update on its proxy settings and restart the device.

I hope the above information helps. Have a nice day.

Links and References

[1] Component environment variable reference - https://docs.aws.amazon.com/greengrass/v2/developerguide/component-environment-variables.html

[2] Create AWS IoT Greengrass components - https://docs.aws.amazon.com/greengrass/v2/developerguide/create-components.html

[3] AWS System Manager Run Command - https://docs.aws.amazon.com/systems-manager/latest/userguide/run-command.html

AWS
SUPPORT-TECHNIKER
Tom_T
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