@rlyle1179/serverless-aws-batch 1.0.21 → 1.0.25
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/batchenvironment.js +9 -1
- package/lib/batchtask.js +4 -2
- package/lib/schedule.js +0 -1
- package/package.json +1 -1
package/lib/batchenvironment.js
CHANGED
|
@@ -237,7 +237,15 @@ function generateLambdaScheduleExecutionRole() {
|
|
|
237
237
|
"Effect": "Allow",
|
|
238
238
|
"Action": [
|
|
239
239
|
"xray:PutTraceSegments",
|
|
240
|
-
"xray:PutTelemetryRecords"
|
|
240
|
+
"xray:PutTelemetryRecords"
|
|
241
|
+
],
|
|
242
|
+
"Resource": [
|
|
243
|
+
"*"
|
|
244
|
+
]
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"Effect": "Allow",
|
|
248
|
+
"Action": [
|
|
241
249
|
"ec2:CreateNetworkInterface",
|
|
242
250
|
"ec2:DescribeNetworkInterfaces",
|
|
243
251
|
"ec2:DetachNetworkInterface",
|
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: '
|
|
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
|
@@ -45,7 +45,6 @@ module.exports.schedule = (event, context, callback) => {
|
|
|
45
45
|
},
|
|
46
46
|
containerOverrides: {
|
|
47
47
|
environment: [
|
|
48
|
-
{ name: "_X_AMZN_TRACE_ID", value: process.env._X_AMZN_TRACE_ID },
|
|
49
48
|
{ name: "AWS_LAMBDA_FUNCTION_NAME", value: process.env.AWS_LAMBDA_FUNCTION_NAME },
|
|
50
49
|
{ name: "AWS_LAMBDA_FUNCTION_VERSION", value: process.env.AWS_LAMBDA_FUNCTION_VERSION },
|
|
51
50
|
{ name: "AWS_REQUEST_ID", value: context.awsRequestId }
|