Today, AWS IoT Core a fully managed cloud service that lets you connect billions of devices and process trillions of messages, announces a new inline Rule function that enables you to extract the source IP address of the publisher of an IoT message. Once you extract the source IP address, you can send it to other AWS and third-party services for further analytics based on your business needs. For example, you can use the source IP address with location solvers (such as, AWS IoT Core Device Location) to determine the approximate location of an IoT device and build location-based applications, such as asset tracking, video content delivery etc.
Source:: Amazon AWS