Giter Site home page Giter Site logo

iot-ingest-large-size's Introduction

IoT Ingest Large-Sized Payloads

Securely ingest large sized payloads from IoT devices using AWS.

Description

This project is mainly based on this AWS Blog which leverages the power of S3 pre-signed URLs, MQTT and IoT Core to upload large files. Once the object is uploaded, the S3 Notification triggers a Lambda which sends an email to view the file.

alt text

Getting Started

Dependencies

  • An AWS Account
    • Generate the certificate needed to authenticate the IoT device(s). The following are needed:
      • Amazon Root CA certificate file (Amazon-root-CA-1.pem)
      • Private key file (private.pem.key)
      • A certificate for this thing (device.pem.crt)
    • Obtain the device-data-endpoint. Looks similar to account-specific-prefix.jobs.iot.aws-region.amazonaws.com.
    • Register your email address for the SES to be able to send emails.
  • An IoT device (eg. a Raspberry Pi).
  • Terraform

Terraform setup

  • Clone this repository on the laptop/desktop/server
git clone https://github.com/vikramaditya91/iot-ingest-large-size.git
  • Get the ARN of the certificate and set it in the terraform/variables.tf
  • Adjust other variables in terraform/variables.tf as required
  • Apply the terraform configuration:
cd terraform
terraform apply

Set-up on IoT device

  • Copy the certificates onto the IoT device
  • Clone this repository on the IoT device
git clone https://github.com/vikramaditya91/iot-ingest-large-size.git
  • Create a virtual environment of Python3+
  • Install the dependencies listed in pip_requirements.txt
  • Set the correct values in send_large_file.py
    • paths to the certificates
    • bucket-name as set in variables.tf
    • end-point url as obtained above
    • request url topic as set in variables.tf
  • Run the script python send_large_file.py <full_path_to_file_to_be_uploaded>

Additional information

  • This project was originally meant for a motion detection system for when my cat Doudou wanted to be let in Dudu cat
  • Motion was detected using the Motion Project

Authors

Vikramaditya Gaonkar

iot-ingest-large-size's People

Contributors

vikramaditya91 avatar

Stargazers

Nguyen Huu Ty avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.