Terraform scripts for setting up InfluxDb and Grafana in AWS (and notes on the Raspberry Pi setup)

A bit beyond my level of understanding but for a coding dork could you explain how the Rpi communicates with the AWS service?