By using AWS re:Post, you agree to the Terms of Use
/Report Greengrass Component External Facing IP Address/

Report Greengrass Component External Facing IP Address


Use-case: Automatically build AWS Security groups by reporting the external-facing IP address of an edge device running AWS Greengrass V2. Is there an AWS provided component that does this ?

I see that the IoT Device Defender Component posts some information regarding how many bytes over which ports. We are looking for a component that can report:

  • External facing IP
  • Bandwidth usage (or at least, bandwidth used by the Greengrass software)

Does such a public component exist, or would it have to be a custom-built component ?

2 Answers
answered a month ago
  • Does this component report the external ip address of the edge device to the cloud, or just to the local log ?

    All I can see is that it writes the local IP address on the local network, as opposed to the external-facing ip address .

    2022-05-25T14:17:20.372Z [INFO] (pool-1-thread-2) Acquired host IP addresses. {IpAddresses=[/]}

  • It reports local connectivity information of Greengrass Core to the cloud, so that client-devices can discover and connect to the core. (For more information:

    There is no AWS provided component that reports external IP address.


We also had a need to know the external-facing (i.e public) IP address. We achieved it by just publishing it to the device's twin, where it's easily looked up. Here's how we did it:

mosquitto_pub -h $GG_HOST --cert $GG_HOME/thingCert.crt --key $GG_HOME/privKey.key --cafile $GG_HOME/rootCA.pem -t '$aws/things/'$GG_THING'/shadow/update' -m "$jsonString"

The $jsonString needed to look like so:

{"state":{"reported":{"key1":"val1" ...  "IP": $IP }}}'

with $IP looked up easily with a call to:

curl -4

All bash, and worked for us. Hope this helps.

answered a month 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