0.0.44 • Published 3 years ago

serverless-aws-glue v0.0.44

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Serverless Glue

This is a plugin for Serverless framework that provide the posiblitiy to deploy AWS Glue Jobs

Install

  1. run npm install --save-dev serverless-aws-glue
  2. add serverless-glue in serverless.yml plugin section
    plugins:
        - serverless-aws-glue

How work

The plugin create CloufFormation resources of your configuration before make the serverless deploy then add it to the serverless template.

So any glue-job deployed with this plugin is part of your stack too.

How configure your GlueJobs

Configure yours glue jobs in custom section like this:

custom:
  Glue:
    bucketDeploy: someBucket # Required
    s3Prefix: some/s3/key/location/ # optional, default = 'glueJobs/'
    jobs:
      - job:
          name: super-glue-job # Required
          script: src/glueJobs/test-job.py # Required script will be named with the name after '/' and uploaded to s3Prefix location
          tempDir: true # Optional true | false
          type: spark # spark / pythonshell # Required
          glueVersion: python3-2.0 # Required python3-1.0 | python3-2.0 | python2-1.0 | python2-0.9 | scala2-1.0 | scala2-0.9 | scala2-2.0 
          role: arn:aws:iam::000000000:role/someRole # Required
          MaxConcurrentRuns: 3 # Optional
          WorkerType: Standard  # Optional  | Standard  | G1.X | G2.X
          NumberOfWorkers: 1 # Optional
          Connections: "RDS-MySQL5.7-Connection1,RDS-MySQL5.7-Connection2" # Optional
          extraPyFilePaths: "/path/to/file1.py,/path/to/file2.py" # Optional
          extraJarPaths: "/path/to/file1.jar,/path/to/file2.jar" # Optional
          additionalModules: "mysql-connector-python==8.0.5,pymongo==3.11.4" # Optional
          sparkUIPath: "s3://path" # Optional
          DefaultArguments: # Optional
            stage: "dev"
            table_name: "test"

you can define a lot of jobs..

custom:
    Glue:
    bucketDeploy: someBucket
    jobs:
        - job:
            ...
        - job:
            ...

Glue configuration parameters

ParameterTypeDescriptionRequired
bucketDeployStringS3 Bucket nametrue
jobsArrayArray of glue jobs to deploytrue

Jobs configurations parameters

ParameterTypeDescriptionRequired
nameStringname of jobtrue
scriptStringscript path in the projecttrue
tempDirBooleanflag indicate if job required a temp folder, if true plugin create a bucket for tmpfalse
typeStringIndicate if the type of your job. Values can use are : spark or pythonshelltrue
glueVersionStringIndicate language and glue version to use ( [language][version]-[glue version]) the value can you use are: python3-1.0python3-2.0python2-1.0python2-0.9scala2-1.0scala2-0.9scala2-2.0true
roleStringarn role to execute jobtrue
MaxConcurrentRunsDoublemax concurrent runs of the jobfalse
WorkerTypeStringworker type, default value if you dont indicate is Standardfalse
NumberOfWorkersIntegernumber of workersfalse
ConnectionsStringDatabase connections (For multiple connection use , for seperation)false
extraPyFilesPathStringPython file path (For multiple files use , for seperation)false
extraJarsPathStringJar file path (For multiple files use , for seperation)false
additionalModulesStringAdditional modules (For multiple multiple use , for seperation)false
sparkUIPathStringS3 Pathfalse
DefaultArgumentsJsonKey Value pair valuesfalse

And now?...

Only run serverless deploy

0.0.40

3 years ago

0.0.41

3 years ago

0.0.42

3 years ago

0.0.20

3 years ago

0.0.43

3 years ago

0.0.21

3 years ago

0.0.44

3 years ago

0.0.22

3 years ago

0.0.23

3 years ago

0.0.24

3 years ago

0.0.25

3 years ago

0.0.37

3 years ago

0.0.15

3 years ago

0.0.38

3 years ago

0.0.16

3 years ago

0.0.39

3 years ago

0.0.17

3 years ago

0.0.18

3 years ago

0.0.19

3 years ago

0.0.30

3 years ago

0.0.31

3 years ago

0.0.32

3 years ago

0.0.10

3 years ago

0.0.33

3 years ago

0.0.11

3 years ago

0.0.34

3 years ago

0.0.12

3 years ago

0.0.35

3 years ago

0.0.13

3 years ago

0.0.36

3 years ago

0.0.14

3 years ago

0.0.26

3 years ago

0.0.9

3 years ago

0.0.27

3 years ago

0.0.8

3 years ago

0.0.28

3 years ago

0.0.29

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago