@rlyle1179/serverless-aws-batch 1.1.14 → 1.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/batchtask.js CHANGED
@@ -91,7 +91,7 @@ function compileBatchTask(functionName) {
91
91
  name: functionObject.name,
92
92
  memorySize: 128,
93
93
  timeout: 6,
94
- runtime: this.provider.serverless.runtime || 'nodejs16.x',
94
+ runtime: _.get(this.serverless.service,"custom.runtime", "nodejs18.x" ),
95
95
  package: {
96
96
  artifact: `${path.join(this.serverless.config.servicePath, '.serverless', functionName)}.zip`
97
97
  },
package/lib/schedule.js CHANGED
@@ -7,8 +7,8 @@
7
7
 
8
8
  'use strict';
9
9
  const process = require("process");
10
- const AWS = process.env._X_AMZN_TRACE_ID ? require("aws-xray-sdk").captureAWS(require("aws-sdk")) : require("aws-sdk");
11
- const batch = new AWS.Batch();
10
+ const { BatchClient, SubmitJobCommand } = require('@aws-sdk/client-batch')
11
+ const batch = new BatchClient();
12
12
 
13
13
  function zeroPad(n) {
14
14
  return n <= 9 ? "0" + n : n;
@@ -56,7 +56,7 @@ module.exports.schedule = (event, context, callback) => {
56
56
  }
57
57
  };
58
58
 
59
- batch.submitJob(params, function(err, data) {
59
+ batch.send( new SubmitJobCommand(params), function(err, data) {
60
60
  let response;
61
61
 
62
62
  const jsonHeaders = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rlyle1179/serverless-aws-batch",
3
- "version": "1.1.14",
3
+ "version": "1.1.16",
4
4
  "description": "Serverless Framework Plugin for interacting with AWS Batch",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -23,6 +23,7 @@
23
23
  },
24
24
  "homepage": "https://github.com/rlyle/serverless-aws-batch#readme",
25
25
  "dependencies": {
26
+ "@aws-sdk/client-batch": "^3.609.0",
26
27
  "bluebird": "^3.7.2",
27
28
  "cross-spawn": "^6.0.5",
28
29
  "fs-extra": "^7.0.1",
@@ -30,7 +31,5 @@
30
31
  "lodash": "^4.17.13",
31
32
  "serverless": "^1.70.0"
32
33
  },
33
- "devDependencies": {
34
- "aws-sdk": "^2.672.0"
35
- }
34
+ "devDependencies": {}
36
35
  }