@rlyle1179/serverless-aws-batch 1.0.22 → 1.0.26

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
@@ -77,7 +77,7 @@ function compileBatchTask(functionName) {
77
77
  name: functionObject.name,
78
78
  memorySize: 128,
79
79
  timeout: 6,
80
- runtime: 'nodejs10.x',
80
+ runtime: 'nodejs12.x',
81
81
  package: {
82
82
  artifact: `${path.join(this.serverless.config.servicePath, '.serverless', functionName)}.zip`
83
83
  },
@@ -148,7 +148,9 @@ function updateContainerProperties(newFunction, functionObject, functionName) {
148
148
  {
149
149
  'AWS_LAMBDA_FUNCTION_TIMEOUT': getTimeout(functionObject),
150
150
  'AWS_LAMBDA_FUNCTION_MEMORY_SIZE': getMemorySize(functionObject),
151
- 'AWS_REGION': this.serverless.service.provider.region || 'us-east-1'
151
+ 'AWS_REGION': this.serverless.service.provider.region || 'us-east-1',
152
+ 'AWS_SECRET_ACCESS_KEY': process.env.AWS_SECRET_ACCESS_KEY,
153
+ 'AWS_ACCESS_KEY_ID': process.env.AWS_ACCESS_KEY_ID
152
154
  },
153
155
  this.serverless.service.provider.environment,
154
156
  functionObject.environment,
package/lib/schedule.js CHANGED
@@ -36,6 +36,10 @@ module.exports.schedule = (event, context, callback) => {
36
36
 
37
37
  console.log(`Submitting job: ${jobName} with jobDefinition: ${jobDefinition} to queue: ${jobQueue}`);
38
38
 
39
+ // delete headers from the event, we are exceeding the 8092 limit for container overrides
40
+ delete event.headers;
41
+ delete event.multiValueHeaders;
42
+
39
43
  let params = {
40
44
  jobDefinition: jobDefinition,
41
45
  jobName: jobName,
@@ -45,7 +49,6 @@ module.exports.schedule = (event, context, callback) => {
45
49
  },
46
50
  containerOverrides: {
47
51
  environment: [
48
- { name: "_X_AMZN_TRACE_ID", value: process.env._X_AMZN_TRACE_ID },
49
52
  { name: "AWS_LAMBDA_FUNCTION_NAME", value: process.env.AWS_LAMBDA_FUNCTION_NAME },
50
53
  { name: "AWS_LAMBDA_FUNCTION_VERSION", value: process.env.AWS_LAMBDA_FUNCTION_VERSION },
51
54
  { name: "AWS_REQUEST_ID", value: context.awsRequestId }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rlyle1179/serverless-aws-batch",
3
- "version": "1.0.22",
3
+ "version": "1.0.26",
4
4
  "description": "Serverless Framework Plugin for interacting with AWS Batch",
5
5
  "main": "index.js",
6
6
  "scripts": {