element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
IoT: In the Cloud
  • Challenges & Projects
  • Project14
  • IoT: In the Cloud
  • More
  • Cancel
IoT: In the Cloud
Blog Arduino MKR WIFI 1010 and Amazon Web Services: Safe MQTT with SSL and Certificate
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join IoT: In the Cloud to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 15 Mar 2019 5:04 PM Date Created
  • Views 4373 views
  • Likes 13 likes
  • Comments 13 comments
  • mqtt
  • mkr_1010
  • arduino mkr 1010
  • p14 mkr 1010
  • arduino_iot_cloud
  • aws
  • ssl
  • iotcloudch
  • certificate
  • secure
  • iot
  • arduino
Related
Recommended

Arduino MKR WIFI 1010 and Amazon Web Services: Safe MQTT with SSL and Certificate

Jan Cumps
Jan Cumps
15 Mar 2019
image

IoT: In the Cloud

Enter Your Project for a chance to win an Arduino MKR WAN 1300 Kit with a Compatable Lora Gateway or an MKR 1400 GSM with a Shield Combo + a $100 shopping cart!

Back to The Project14 homepage image

Project14 Home
Monthly Themes
Monthly Theme Poll

 

I'm preparing a project for Arduino Day.

I'll need to connect an Arduino MKR 1010 (thank you element14!) with AWS IoT.

And good news: the Arduino example is safe. An example where the safety is embedded from the get go.

Respect.

image

The exercise is easy. I just had to follow the tutorial from arduino.cc to make it work. And that proves that it isn't impossible to get everyone started with safe solution. The supplier just has to put the effort in to write the instructions and have no example where security is omitted.

 

What do you need?

 

You'll have to get a free AWS account, a Arduino MKR 1010 and a WiFi connection to the internet.

I am not repeating the excellent tutorial. If you haven't done so, read it now. Just follow it step by step.

There's one correction: where the tutorial says to download ArduinoMqtt, you actually have to install ArduinoMqttClient.

The example did compile out of the box on Arduino IDE 1.8.8. I had a compile error with version 1.8.1.

 

What does it do?

 

The sketch first logs on to your WiFi router. It will then make an SSL connection to AWS.

 

WiFiClient    wifiClient;            // Used for the TCP socket connection
BearSSLClient sslClient(wifiClient); // Used for SSL/TLS connection, integrates with ECC508
MqttClient    mqttClient(sslClient);

 

 

 

image

 

It uses certificates for authentication.

Once that's successful, it'll send messages to the topic arduino/outgoing and subscribe to messages posted on arduino/incoming.

 

Here you see messages from the MKR1010 arriving in AWS:

image

 

And this is a message from AWS retrieved by the MKR1010.

 

image

 

 

related blog posts
Manage Arduino MKR WIFI 1010 Battery Life in the Cloud - How Long until the Next Recharge?
Arduino MKR WIFI 1010 and Amazon Web Services: Safe MQTT with SSL and Certificate
Project14 | IoT in the Cloud: Make Use of a Wireless Technology and a Cloud Provider!
Keithley DMM6500: Measure Amp-Hours of an Arduino MKR WIFI 1010
Manage Arduino MKR WIFI 1010 Battery Life in the Cloud - AWS, Graphs and Alerts
Arduino MKR 10xx, ETH Shield and Amazon Web Services: Safe MQTT with SSL and Certificate
  • Sign in to reply

Top Comments

  • dubbie
    dubbie over 6 years ago +2
    Jan, I want to get a better understanding of IoT so I will follow your advice and work through the tutorial. Do you know if it will work with a MKR 1000 (rather than MKR 1010) as that is what I have. …
  • Jan Cumps
    Jan Cumps over 6 years ago in reply to dubbie +2
    no idea, Dubbie. I have this one since a few days and followed the tutorials. I don't have a 1000.
  • fmilburn
    fmilburn over 6 years ago in reply to fmilburn +2
    I went back this morning and started over and now it is working and I have no clue what is different. I have set up WiFi numerous times on Arduino, TI, and ESP microcontrollers without a problem. I usually…
  • Jan Cumps
    Jan Cumps over 6 years ago in reply to Workshopshed

    Workshopshed  wrote:

     

    Hey Jan, is there a free tier for AWS like there is with other cloud providers?

    Yes. I am using that. You have to be careful, because for some modules you get invoiced if you are exceeding number of connections, transactions, rules/ routings, email/text Messages per day/week/month.

    For other modules, they become invoiceable after a year if you keep on using them.

    Up till now (I'm using my account for 3 years now), I've been able to keep below the charge threshold for all my activities.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Workshopshed
    Workshopshed over 6 years ago

    Hey Jan, is there a free tier for AWS like there is with other cloud providers?

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • nona96
    nona96 over 6 years ago

    I guess this is amazing.

    wonderful work.

    keep doing this amazing work as well as keep posting it.

    Regards.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • kiri-ll
    kiri-ll over 6 years ago in reply to Jan Cumps

    I'd say network services should provide HTTP for people, and machine-reasonable protocols for IoT

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 6 years ago in reply to kiri-ll

    kiri-ll  wrote:

     

    What attracted my attention is MQTT. I've seen so many times, how people solve *everything* with HTTP. Like there is nothing more in the network.

     

    I am very glad to see the screw being handled with a screwdriver, not a hammer image

    If that HTTP is a call to a web service, I'd say it's OK.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube