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 Answer
1
Accepted Answer

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 ENGINEER
Tom_T
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions