Skip to content

oimoralest/timestream_plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DATAPLUGIN TIMESTREAM

Dataplugin

Description

Due to the needs in the analysis of the information obtained from users' devices, we develop a dataplugin that allows to articulate the information collected by the company through the devices, performing a periodic backup in an S3 bucket that is migrated to a database from AWS Timestream and thus, improve the compatibility of the data for its integration with the rest of the services offered by Amazon Web Services and other services such as Grafana.

Technologies

  • Python 3.7
  • Boto3 (SDK for python)
  • JSON
  • XML
  • AWS Lambda Function
  • AWS Cloudwatch
  • AWS S3
  • AWS Timestream

Table of contents

FILES DESCRIPTION
src/control.py

Contains the functions:

setup: Set all the variables to execute the dataplugin.

login: Use the kwargs to log into the user's AWS account.

create_role: Creates IAM role( permissions for AWS services)

src/function.py

Contains the functions:

main: Principal function that takes AWS data, timezone data, backup time data and set up parameters object.

make_request: Make a request to the ubidots server.

get_time_frame: Get a given time frame based on the actual time passed by the user.

get_last_month_time_frame: First date of the last month.

src/lambda_timestream_backup.py

Contains the functions:

read_s3: Gets an object from an AWS S3 bucket and prepares the data stored (AWS Timestream).

write_timestream: Write records on AWS timestream.

lambda_handler: Handler for the AWS Lambda function.

src/view.xml
Contains the form with the fields required for the plugin working.
manifest.json
Describes essential information about the plugin
LICENSE
MIT License ( Copyright (c) 2021 Ubidots )

Infraestructure

Below, we present the general infrastructure of this project, which was carried out as a final project for Holberton School to the Ubidots company.

Infrastructure

Usage

Read more : (https://github.com/oimoralest/timestream_ubidots/documentation.pdf)

Demo

Here is a working live demo: (https://drive.google.com/file/d/11ru1DBxqjo8AOQpEgFnb5KyIoKEA7Oob/view)

Team

Laura Álvarez - Manager Engineer and Full Stack Developer (apla02@gmail.com)
Fabian Carmona - Product Design Engineer and Full Stack Developer (carmona.vargas.fabian@gmail.com)
Luis Carvajal - Mechatronic Engineer Stud. and Full Stack Developer (luiscarvajal05@gmail.com)
Luis Calderón Mechanical Engineer and Full Stack Developer (luismiguel.calderone@gmail.com)
Óscar Morales - Chemical Engineer and Full Stack Developer (oimoralest@gmail.com)

License

MIT License - Copyright (c) 2021 Ubidots

About

Ubidots plugin to make backups on AWS Timestream

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages