Giter Site home page Giter Site logo

aws-samples / aws-glue-cdk-cicd Goto Github PK

View Code? Open in Web Editor NEW
33.0 4.0 17.0 1.3 MB

Build, Test and Deploy ETL solutions using AWS Glue and AWS CDK based CI/CD pipelines

License: MIT No Attribution

Python 93.26% Shell 5.83% Batchfile 0.91%
athena aws cdk cloudformation codebuild codecommit codepipeline dataops devops glue

aws-glue-cdk-cicd's Introduction

Build, Test and Deploy ETL solutions using AWS Glue and AWS CDK based CI/CD pipelines

About The Project

This repository demonstrates building a Continuous Integration and Continuous Delivery (CI/CD) pipeline using AWS CodeCommit, AWS CodeBuild and AWS CodePipeline to provision AWS Glue based data pipelines using AWS Cloud Development Kit (CDK).

Please refer to the accompanying post Build, Test and Deploy ETL solutions using AWS Glue and AWS CDK based CI/CD pipelines for additional information.

Solution Overview

The AWS CDK based solution deploys a CI/CD pipeline using AWS CodeCommit, AWS CodeBuild and AWS CodePipeline, executes docker based PyTests and deploys a data pipeline using AWS Glue. The data pipeline consists of AWS Glue Workflow, Triggers, Jobs and Crawlers. The data pipeline uses COVID-19 Harmonized Data managed by Talend / Stitch to construct a data pipeline.

Architecture Diagram

The diagram shows the various components of the solution:

alt text

Prerequisites

Getting Started

Please follow the below instructions to deploy the solution in your AWS account:

Download the source code aws-glue-cdk-cicd

$ git clone https://github.com/aws-samples/aws-glue-cdk-cicd.git

Create virtualenv:

$ cd aws-glue-cdk-cicd
$ python3 -m venv .venv

On MacOS and Linux, activate the virtual environment:

$ source .venv/bin/activate

On Windows platform, activate the virtualenv:

% .venv\Scripts\activate.bat

Install required dependencies:

$ pip install -r requirements.txt

Bootstrap CDK app:

$ cdk bootstrap 

The above command will create the below CloudFormation stack:

  • CDKToolkit.

Synthesize CloudFormation template:

$ cdk synth  # optional if not default (-c stage=default)

Deploy CodePipeline:

$ cdk deploy  # optional if not default (-c stage=default)

The above command will create the below CloudFormation stack:

  • cdk-covid19-glue-stack-pipeline
  • cdk-covid19-glue-stack

Staring AWS Glue Covid19 Workflow

$ aws glue start-workflow-run --name Covid_19

Query the tables using Amazon Athena:

SELECT "country", "location", "date", "cases", "deaths", "ecdc-countries", "acute_care", "acute_care_per_100K", "critical_care", "critical_care_per_100K" FROM "AwsDataCatalog"."covid19db"."neherlab_denormalized" limit 10;

Athena Query Engine

Cleanup

Log into the AWS console, select the appropriate region, navigate to the AWS CloudFormation console , and select and click Delete on the following stacks:

  • cdk-covid19-glue-stack-pipeline
  • cdk-covid19-glue-stack
  • CDKToolkit.

Log into the AWS console, select the appropriate region, navigate to the AWS S3 console and delete the associated S3 buckets:

  • cdk-covid19-glue-stack-p-pipelineartifactsbucketa-*
  • cdk-*-assets-<AWS_ACCOUNT_ID>-<AWS_REGION>
  • covid19-glue-config-<AWS_ACCOUNT_ID>-<AWS_REGION>
  • neherlab-denormalized-dataset-<AWS_ACCOUNT_ID>-<AWS_REGION>

Interested in Contributing?

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

aws-glue-cdk-cicd's People

Contributors

amazon-auto avatar justinkuskowski avatar puneetbabbar avatar suvojitdasgupta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

aws-glue-cdk-cicd's Issues

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.