# serverless-aws-glue

> Serverless plugin to deploy AWS Glue Jobs

Latest version **0.0.44** (published 2021-05-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install serverless-aws-glue
pnpm add serverless-aws-glue
yarn add serverless-aws-glue
bun add serverless-aws-glue
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.44 |
| Published | 2021-05-28 |
| First published | 2021-03-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 14.6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Anand Singh |
| Maintainers | sanand404 |
| Keywords | serverless, aws, glue, job, gluejob |

## Links

- npm: https://www.npmjs.com/package/serverless-aws-glue
- npm.io page: https://npm.io/package/serverless-aws-glue

## Dependencies (1)

- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.701.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.0.44 (latest) — 2021-05-28
- 0.0.43 — 2021-05-28
- 0.0.42 — 2021-05-27
- 0.0.41 — 2021-05-27
- 0.0.40 — 2021-05-27
- 0.0.39 — 2021-05-27
- 0.0.38 — 2021-05-27
- 0.0.37 — 2021-05-27
- 0.0.36 — 2021-05-27
- 0.0.35 — 2021-05-27
- 0.0.34 — 2021-05-27
- 0.0.33 — 2021-05-27
- 0.0.32 — 2021-05-27
- 0.0.31 — 2021-05-27
- 0.0.30 — 2021-05-27
- … 29 more at https://npm.io/package/serverless-aws-glue/versions

## README

# 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
    ```yml
    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:

```yml
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..

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

```

### Glue configuration parameters

|Parameter|Type|Description|Required|
|-|-|-|-|
|bucketDeploy|String|S3 Bucket name|true|
|jobs|Array|Array of glue jobs to deploy|true|

### Jobs configurations parameters

|Parameter|Type|Description|Required|
|-|-|-|-|
|name|String|name of job|true|
|script|String|script path in the project|true|
|tempDir|Boolean|flag indicate if job required a temp folder, if true plugin create a bucket for tmp|false|
|type|String|Indicate if the type of your job. Values can use are : `spark` or  `pythonshell`|true|
|glueVersion|String|Indicate language and glue version to use ( `[language][version]-[glue version]`) the value can you use are: <ul><li>python3-1.0</li><li>python3-2.0</li><li>python2-1.0</li><li>python2-0.9</li><li>scala2-1.0</li><li>scala2-0.9</li><li>scala2-2.0</li></ul>|true|
|role|String| arn role to execute job|true|
|MaxConcurrentRuns|Double|max concurrent runs of the job|false|
|WorkerType|String|worker type, default value if you dont indicate is `Standard`|false|
|NumberOfWorkers|Integer|number of workers|false|
|Connections|String|Database connections (For multiple connection use `,` for seperation)|false|
|extraPyFilesPath|String|Python file path (For multiple files use `,` for seperation)|false|
|extraJarsPath|String|Jar file path (For multiple files use `,` for seperation)|false|
|additionalModules|String|Additional modules (For multiple multiple use `,` for seperation)|false|
|sparkUIPath|String|S3 Path|false|
|DefaultArguments|Json|Key Value pair values|false|


## And now?...

Only run `serverless deploy`

---
_Source: https://npm.io/package/serverless-aws-glue · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
