2

I was wondering if it's possible to send data from my Arduino Uno (e.g. from the temperature sensor) to the Amazon Web Service RDS or anything there, which will then upload the data to a website on my localhost?

If yes, could someone give me guidance please?

I've been messing with this for a few weeks now, but I am just getting lost with linking it all up together.

Thanks.

4
  • First of all you must post your code how you are progressing, like @Majenko said it is not easily possible but it can work. I will guide you along the way Jan 26 '17 at 18:08
  • You'll probably only need one server, and let the Arduino's upload to that directly?
    – Paul
    Jan 27 '17 at 6:13
  • 1
    No... by definition the only thing that can upload anything to "localhost" is that host itself, because "localhost" always refers to oneself. It may well be possible to contact this from some other device, but never by referring to it as "localhost"! Feb 26 '17 at 4:42
  • 1
    If the goal is to get the data from the arduino to your local machine? Is the arduino on the same local network as the your local machine? if so, skip AWS altogether and just have the arduino talk directly to your local machine...
    – Mazaryk
    Mar 28 '17 at 5:34
2

No, it is not (easily) possible.

AWS has no access to your localhost - you are (most likely) behind a NAT router.

You could possibly open up port forwarding on your router and then ensure that AWS knows always what the IP address of your router is so it can connect (using some dynamic DNS service maybe).

However, that is not secure, and dynamic IP address assignments makes it a real pain. It opens up your computer to hacking from the internet. A more secure method is to use AWS as the "central point" and have your computer go and fetch data from there rather than having it send data to your computer.

3
  • What would you suggest would be a good idea doing what I want to achieve? Thanks
    – deeveeABC
    Apr 24 '16 at 14:33
  • 3
    @deeveeABC The last sentence of the last paragraph.
    – Majenko
    Apr 24 '16 at 14:34
  • You can always setup a dynamic dns (as I do), with no-ip or dyndns clients (most routers allow you to configure that), and use the port forwarding thing. You can even configure a afraid.org dns redirection (pretty easy), but you have to note that you won't be capable of fetching / posting via https, so it's very likely it's not gonna work or be very prone to attacks.
    – fabrosell
    Apr 25 '16 at 15:44
2

I realize that this probably two years too late for the OP; however, I'd like to provide insight to anyone else who might be interested.

It is possible to do what you're asking. What you are looking for my friend is AWS IoT Core and the related IoT Services (e.g. IoT Device Management).

There are several steps that you're going to need to perform prior to being able to send telemetry to AWS:

  1. Ensure that your device has the necessary components to connect to the Internet (e.g. a network shield).
  2. Once you are Internet-capable, locate here the AWS IoT SDK that will work well with your device.
  3. Read the documentation (I'll let you look that part up ;-)...probably within the sub-links on the page from #2) on how to connect your device to an MQTT-based Web Sockets connection to AWS IoT Core.
  4. Once you've figured out how (using the SDK from your device) to connect to AWS using MQTT, read about AWS Lambda and how you can setup various triggers off of IoT Core, which can then propagate data down to your RDS DB or the like.
  5. Once you have your data in AWS, you can then connect your "localhost" website to RDS, using the appropriate connection string, and pull the data from there.

Good luck and happy IoTing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.