Giter VIP home page Giter VIP logo

awslambdalaunchemrviasqs's Introduction

awsLambdaLaunchEMRViaSQS

This repository contains python applications that automate the deployment of a data warehouse ETL job with AWS lambda. They specifically launch an EMR cluster, monitor state, and log details via email in case of failure.

The utilities folder contains test event data and clients that mock various AWS API requests like deleting files, sending notifications via SNS, and sending notifications to Slack in regards to application state. The folder also contains two test events for use in Lambda. The sqsEventEmrLaunch.json API event corresponds to launchEmrJob.py while emrStepStateChange.json API event corresponds to logEMRJob.py.

Lambda Functions:

launchEmrJob.py

Launches a Spark ETL Job upon submission of a message to an SQS queue from an ETL client. Moreover, the function waits for a message in an SQS queue from an ETL server, proceeds to delete the s3 output directory for a Spark job, and kicks of a Spark job on EMR. During runtime, another Lambda function is triggered based on the jobs State.

logEMRJob.py

This function is the second function in our ETL process. Upon initiation of an EMR job this function collects step state from a cloudwatch event e.g. aws.emr and manages the outcome. Failures are sent to an email via SNS while job success triggers a snowflake (datwarehouse) job via an SQS message from an ETL server.

Logging and Debugging:

Users can debug the applications by visiting CloudWatch in the AWS console or by polling the appropriate log groups and streams. In this case CloudWatch -> LogGroups -> /aws/lambda/launchEmrJob and /aws/lambda/logEMRJob

awslambdalaunchemrviasqs's People

Contributors

patalwell avatar

Watchers

James Cloos avatar  avatar

Forkers

bballamudi

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.