Giter Site home page Giter Site logo

tanandy / aws-serverless-data-pipeline-by-terraform Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gnokoheat/aws-serverless-data-pipeline-by-terraform

0.0 0.0 0.0 124 KB

AWS Serverless Data Pipeline by Terraform ( API Gateway + Lambda + Kinesis + S3 + Athena )

License: MIT License

Smarty 5.90% HCL 94.10%

aws-serverless-data-pipeline-by-terraform's Introduction

aws-serverless-data-pipeline-by-terraform

GitHub GitHub top language GitHub repo size GitHub last commit

AWS Serverless Data Pipeline example by Terraform

  • AWS Serverless Data Pipeline by Terraform ( API Gateway + Lambda + Kinesis + S3 + Athena )

Include

This terraform code include All-In-One for AWS Serverless Data Pipeline

  • API Gateway
  • Lambda
  • Kinesis
  • S3
  • Athena

Customize main.tf in terraform code

  workspace      = "dev"
  aws_account_id = "1111111111111"
  region         = "${var.region}"
  service_name = "testservice"

  // api gateway method
  apigw_method = "POST"

  // kinesis firehose option
  s3_buffer_size = 5
  s3_buffer_interval = 300

  // glue table patition
  columns = {
    id = "int"
    type = "string"
    status = "int"
    created_at = "timestamp"
  }

Steps after apply terraform

  1. Send 'JSON Data' to API Gateway with API key.
curl -X POST \
  https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com/dev/testservice \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
  -d '{"id": 1, "type": "click", "status": 0, "created_at": "2019-02-26 04:00:00"}'
  1. Query your 'JSON Data' in Athena.
  • Added partition to metastore
MSCK REPAIR TABLE testservice_logs;
  • Get your data
SELECT * FROM testservice_logs;

aws-serverless-data-pipeline-by-terraform's People

Contributors

gnokoheat 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.