diff --git a/v10.x/bootstrap.js b/v10.x/bootstrap.js index 622ab0c..a0e5bb9 100644 --- a/v10.x/bootstrap.js +++ b/v10.x/bootstrap.js @@ -79,7 +79,7 @@ async function nextInvocation() { const deadlineMs = +res.headers['lambda-runtime-deadline-ms'] - let context = { + const context = { awsRequestId: res.headers['lambda-runtime-aws-request-id'], invokedFunctionArn: res.headers['lambda-runtime-invoked-function-arn'], logGroupName: AWS_LAMBDA_LOG_GROUP_NAME, @@ -182,8 +182,8 @@ function request(options) { options.port = PORT return new Promise((resolve, reject) => { - let req = http.request(options, res => { - let bufs = [] + const req = http.request(options, res => { + const bufs = [] res.on('data', data => bufs.push(data)) res.on('end', () => resolve({ statusCode: res.statusCode, diff --git a/v12.x/bootstrap.js b/v12.x/bootstrap.js index 622ab0c..a0e5bb9 100644 --- a/v12.x/bootstrap.js +++ b/v12.x/bootstrap.js @@ -79,7 +79,7 @@ async function nextInvocation() { const deadlineMs = +res.headers['lambda-runtime-deadline-ms'] - let context = { + const context = { awsRequestId: res.headers['lambda-runtime-aws-request-id'], invokedFunctionArn: res.headers['lambda-runtime-invoked-function-arn'], logGroupName: AWS_LAMBDA_LOG_GROUP_NAME, @@ -182,8 +182,8 @@ function request(options) { options.port = PORT return new Promise((resolve, reject) => { - let req = http.request(options, res => { - let bufs = [] + const req = http.request(options, res => { + const bufs = [] res.on('data', data => bufs.push(data)) res.on('end', () => resolve({ statusCode: res.statusCode,