diff --git a/.nvmrc b/.nvmrc index 22ec1e649434..f228857c9fd6 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -8.10 +10.16.3 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 94dc16fa7c50..0158bf1d3a4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Changed +- **CUMULUS-1626** + - Updates Cumulus to use node10/CMA 1.1.2 for all of it's internal lambdas in prep for AWS node 8 EOL + - **CUMULUS-1578** - Updates SAML launchpad configuration to authorize via configured userGroup. [See the NASA specific documentation (protected)](https://wiki.earthdata.nasa.gov/display/CUMULUS/Cumulus+SAML+Launchpad+Integration) diff --git a/bamboo/bootstrap-tf-deployment.sh b/bamboo/bootstrap-tf-deployment.sh index 50c7e5c30fa6..37ed3011650b 100755 --- a/bamboo/bootstrap-tf-deployment.sh +++ b/bamboo/bootstrap-tf-deployment.sh @@ -69,7 +69,7 @@ echo "Deploying Cumulus example to $DEPLOYMENT" -input=false \ -var-file="../deployments/sandbox.tfvars" \ -var-file="../deployments/$DEPLOYMENT.tfvars" \ - -var "cumulus_message_adapter_lambda_layer_arn=arn:aws:lambda:us-east-1:$AWS_ACCOUNT_ID:layer:Cumulus_Message_Adapter:9" \ + -var "cumulus_message_adapter_lambda_layer_arn=arn:aws:lambda:us-east-1:$AWS_ACCOUNT_ID:layer:Cumulus_Message_Adapter:10" \ -var "cmr_username=$CMR_USERNAME" \ -var "cmr_password=$CMR_PASSWORD" \ -var "cmr_client_id=cumulus-core-$DEPLOYMENT" \ diff --git a/bamboo/docker-compose.yml b/bamboo/docker-compose.yml index 152faa5011a7..1a2458c08270 100644 --- a/bamboo/docker-compose.yml +++ b/bamboo/docker-compose.yml @@ -37,7 +37,7 @@ services: environment: SERVICES: "kinesis,lambda,s3,sns,sqs,dynamodb,cloudwatch,cloudwatchlogs" build_env: - image: jlkovarik/cumulus_build_env:1 + image: jlkovarik/cumulus_build_env:2 volumes: - ../:/source/cumulus environment: diff --git a/docs/data-cookbooks/sns.md b/docs/data-cookbooks/sns.md index 4ba3811f8ddb..42e44b51ea6f 100644 --- a/docs/data-cookbooks/sns.md +++ b/docs/data-cookbooks/sns.md @@ -113,7 +113,7 @@ resource "aws_lambda_function" "test_lambda" { source_code_hash = filebase64sha256("./testLambda.zip") handler = "index.handler" role = module.cumulus.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" } resource "aws_sns_topic_subscription" "test_lambda" { diff --git a/docs/workflows/developing-workflow-tasks.md b/docs/workflows/developing-workflow-tasks.md index eccb9df08eeb..57c3cce2c72e 100644 --- a/docs/workflows/developing-workflow-tasks.md +++ b/docs/workflows/developing-workflow-tasks.md @@ -28,7 +28,7 @@ For a step-by-step example of using the `cumulus_ecs_module`, please see the rel ### Cumulus Docker Image -ECS activities require a docker image. Cumulus provides a docker image ([source](https://github.com/nasa/cumulus-ecs-task) for node 8.10 lambdas on dockerhub: [cumuluss/cumulus-ecs-task](https://hub.docker.com/r/cumuluss/cumulus-ecs-task). +ECS activities require a docker image. Cumulus provides a docker image ([source](https://github.com/nasa/cumulus-ecs-task) for node 10x+ lambdas on dockerhub: [cumuluss/cumulus-ecs-task](https://hub.docker.com/r/cumuluss/cumulus-ecs-task). ### Alternate Docker Images diff --git a/docs/workflows/lambda.md b/docs/workflows/lambda.md index 848c346fa3bb..79eaa1449860 100644 --- a/docs/workflows/lambda.md +++ b/docs/workflows/lambda.md @@ -12,7 +12,7 @@ AWS provides great getting started guide for building Lambdas in the [developer Cumulus currently supports the following environments for Cumulus Message Adapter enabled functions: -* [Node.js 8.10](https://docs.aws.amazon.com/lambda/latest/dg/programming-model.html) +* [Node.js 10.16.3](https://docs.aws.amazon.com/lambda/latest/dg/programming-model.html) * [Java 8](https://docs.aws.amazon.com/lambda/latest/dg/java-programming-model.html) * [Python 2.7, 3.6](https://docs.aws.amazon.com/lambda/latest/dg/python-programming-model.html) @@ -31,7 +31,7 @@ resource "aws_lambda_function" "myfunction" { source_code_hash = filebase64sha256("/path/to/zip/lambda.zip") handler = "index.handler" role = module.cumulus.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" tags = { Deployment = var.prefix } diff --git a/example/cumulus-tf/lambdas.tf b/example/cumulus-tf/lambdas.tf index a60aecf3a1e9..e780357b372d 100644 --- a/example/cumulus-tf/lambdas.tf +++ b/example/cumulus-tf/lambdas.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "async_operation_fail" { source_code_hash = filebase64sha256("${path.module}/../lambdas/asyncOperations/lambda.zip") handler = "index.fail" role = module.cumulus.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" tags = local.default_tags @@ -20,7 +20,7 @@ resource "aws_lambda_function" "async_operation_success" { source_code_hash = filebase64sha256("${path.module}/../lambdas/asyncOperations/lambda.zip") handler = "index.success" role = module.cumulus.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" tags = local.default_tags @@ -36,7 +36,7 @@ resource "aws_lambda_function" "sns_s3_test" { source_code_hash = filebase64sha256("${path.module}/../lambdas/snsS3Test/lambda.zip") handler = "index.handler" role = module.cumulus.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" environment { variables = { diff --git a/example/cumulus-tf/modules/s3_access_test/main.tf b/example/cumulus-tf/modules/s3_access_test/main.tf index 3abd7369c9d3..3d050614ca17 100644 --- a/example/cumulus-tf/modules/s3_access_test/main.tf +++ b/example/cumulus-tf/modules/s3_access_test/main.tf @@ -17,7 +17,7 @@ resource "aws_lambda_function" "s3_acccess_test" { source_code_hash = filebase64sha256("${path.module}/../../../lambdas/s3AccessTest/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" tags = local.default_tags } diff --git a/example/package.json b/example/package.json index cabdefc9eb1c..00abec9d1b02 100644 --- a/example/package.json +++ b/example/package.json @@ -56,7 +56,8 @@ "@cumulus/sf-sns-report": "1.16.0", "@cumulus/sync-granule": "1.16.0", "@cumulus/test-processing": "1.16.0", - "aws-sdk": "^2.227.1" + "aws-sdk": "^2.585.0", + "ssh2-streams": "^0.4.8" }, "devDependencies": { "@cumulus/test-data": "1.16.0", diff --git a/package.json b/package.json index a04f88b28ff4..e611878fcff9 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "url": "https://github.com/nasa/cumulus" }, "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "bin": { "build-tasks-doc": "./bin/build-tasks-doc.js" @@ -76,9 +76,10 @@ "simple-git": "^1.96.0" }, "dependencies": { - "aws-sdk": "^2.238.1", + "aws-sdk": "^2.585.0", "fs-extra": "^5.0.0", "latest-version": "^4.0.0", - "semver": "^5.5.0" + "semver": "^5.5.0", + "ssh2-streams": "^0.4.8" } } diff --git a/packages/api/.babelrc b/packages/api/.babelrc index 6cbf72f6c48e..bd9cdb62e795 100644 --- a/packages/api/.babelrc +++ b/packages/api/.babelrc @@ -4,7 +4,7 @@ "presets": [ ["env", { "targets": { - "node": "8.10" + "node": "10.16.3" } }] ], diff --git a/packages/api/ecs/async-operation/Dockerfile b/packages/api/ecs/async-operation/Dockerfile index 768cb33850f5..43049fef0b75 100644 --- a/packages/api/ecs/async-operation/Dockerfile +++ b/packages/api/ecs/async-operation/Dockerfile @@ -1,4 +1,4 @@ -FROM node:8.10 +FROM node:10.16.3 USER root RUN sed -i -e '/jessie-updates/d' /etc/apt/sources.list diff --git a/packages/api/ecs/async-operation/package.json b/packages/api/ecs/async-operation/package.json index 69976d4ba70f..7797a9f0c11b 100644 --- a/packages/api/ecs/async-operation/package.json +++ b/packages/api/ecs/async-operation/package.json @@ -1,10 +1,10 @@ { "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "dependencies": { "@cumulus/logger": "^1.13.0", - "aws-sdk": "^2.279.1", + "aws-sdk": "^2.585.0", "got": "^9.2.2", "lodash.iserror": "^3.1.1", "p-retry": "^2.0.0" diff --git a/packages/api/es/indexer.js b/packages/api/es/indexer.js index b59fcd06ed38..02021aa160f5 100644 --- a/packages/api/es/indexer.js +++ b/packages/api/es/indexer.js @@ -38,6 +38,50 @@ async function createIndex(esClient, indexName) { log.info(`Created esIndex ${indexName}`); } + +/** + * Parses a StepFunction log payload and returns a es logsrecord object + * + * @param {Object} payload - Stepfunction log payload + * @returns {Object} - ElasticSearch log record + */ +function parsePayload(payload) { + let record; + try { + // cumulus log message has extra aws messages before the json message, + // only the json message should be logged to elasticsearch. + // example message: + // 2018-06-0 1T17:45:27.108Z a714a0ef-f141-4e52-9661-58ca2233959a + // {"level": "info", "timestamp": "2018-06-01T17:45:27.108Z", + // "message": "uploaded s3://bucket/MOD09GQ.A2016358.h13v04.006.2016360104606.hdf.met"} + const entryParts = payload.message.trim().split('\t'); + // cumulus log message + const messageStartIndex = entryParts.findIndex((e) => e.startsWith('{')); + if (entryParts.length >= 3 && messageStartIndex + && entryParts[entryParts.length - 1].endsWith('}')) { + record = JSON.parse(entryParts.slice(messageStartIndex).join('\t')); + record.RequestId = entryParts[1]; + } else { // other logs e.g. cumulus-ecs-task + record = JSON.parse(payload.message); + } + // level is number in elasticsearch + if (isString(record.level)) record.level = log.convertLogLevel(record.level); + } catch (e) { + record = { + message: payload.message.trim(), + sender: payload.sender, + executions: payload.executions, + timestamp: payload.timestamp, + version: payload.version, + level: 30, + pid: 1, + name: 'cumulus' + }; + } + return record; +} + + /** * Extracts info from a stepFunction message and indexes it to * an ElasticSearch @@ -51,40 +95,10 @@ async function createIndex(esClient, indexName) { async function indexLog(esClient, payloads, index = defaultIndexAlias, type = 'logs') { const body = []; - payloads.forEach((p) => { - body.push({ index: { _index: index, _type: type, _id: p.id } }); - let record; - try { - // cumulus log message has extra aws messages before the json message, - // only the json message should be logged to elasticsearch. - // example message: - // 2018-06-01T17:45:27.108Z a714a0ef-f141-4e52-9661-58ca2233959a - // {"level": "info", "timestamp": "2018-06-01T17:45:27.108Z", - // "message": "uploaded s3://bucket/MOD09GQ.A2016358.h13v04.006.2016360104606.hdf.met"} - const entryParts = p.message.trim().split('\t'); - // cumulus log message - if (entryParts.length >= 3 && entryParts[2].startsWith('{') - && entryParts[entryParts.length - 1].endsWith('}')) { - record = JSON.parse(entryParts.slice(2).join('\t')); - record.RequestId = entryParts[1]; - } else { // other logs e.g. cumulus-ecs-task - record = JSON.parse(p.message); - } - // level is number in elasticsearch - if (isString(record.level)) record.level = log.convertLogLevel(record.level); - } catch (e) { - record = { - message: p.message.trim(), - sender: p.sender, - executions: p.executions, - timestamp: p.timestamp, - version: p.version, - level: 30, - pid: 1, - name: 'cumulus' - }; - } - body.push(record); + payloads.forEach((payload) => { + body.push({ index: { _index: index, _type: type, _id: payload.id } }); + const parsedPayload = parsePayload(payload); + body.push(parsedPayload); }); const actualEsClient = esClient || (await Search.es()); @@ -175,6 +189,7 @@ function indexProvider(esClient, payload, index = defaultIndexAlias, type = 'pro * @param {string} type - Elasticsearch type (default: rule) * @returns {Promise} Elasticsearch response */ + function indexRule(esClient, payload, index = defaultIndexAlias, type = 'rule') { return genericRecordUpdate(esClient, payload.name, payload, index, type); } diff --git a/packages/api/package.json b/packages/api/package.json index a84bd97b52bd..f52766bf69a2 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -4,7 +4,7 @@ "description": "Lambda functions for handling all daac's API operations", "main": "index.js", "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "bin": { "cumulus-api": "./bin/cli.js" @@ -58,7 +58,7 @@ "@mapbox/dyno": "^1.4.2", "ajv": "^5.2.2", "aws-elasticsearch-connector": "^8.2.0", - "aws-sdk": "^2.238.1", + "aws-sdk": "^2.585.0", "aws-serverless-express": "^3.3.5", "body-parser": "^1.18.3", "boolean": "^0.1.3", diff --git a/packages/api/tests/serial/es/test-es-indexer.js b/packages/api/tests/serial/es/test-es-indexer.js index 92407c5dc4a7..a44c27a50b77 100644 --- a/packages/api/tests/serial/es/test-es-indexer.js +++ b/packages/api/tests/serial/es/test-es-indexer.js @@ -2,6 +2,7 @@ const test = require('ava'); const sinon = require('sinon'); +const rewire = require('rewire'); const fs = require('fs'); const path = require('path'); const aws = require('@cumulus/common/aws'); @@ -11,7 +12,7 @@ const { constructCollectionId } = require('@cumulus/common/collection-config-sto const StepFunctions = require('@cumulus/common/StepFunctions'); const workflows = require('@cumulus/common/workflows'); -const indexer = require('../../../es/indexer'); +const indexer = rewire('../../../es/indexer'); const { Search } = require('../../../es/search'); const models = require('../../../models'); const { fakeGranuleFactory, fakeCollectionFactory, deleteAliases } = require('../../../lib/testUtils'); @@ -492,3 +493,51 @@ test.serial('Create new index - index already exists', async (t) => { await esClient.indices.delete({ index: newIndex }); }); + +test.serial('parsePayload correctly parses AWS Linux style console output', async (t) => { + const parsePayload = indexer.__get__('parsePayload'); + const expected = { + some: 'key', + sender: 'some sender', + message: 'a messaage', + RequestId: 'a714a0ef-f141-4e52-9661-58ca2233959a' + }; + const actual = parsePayload({ sender: 'fixture_sender', message: '2018-06-01T17:45:27.108Z\ta714a0ef-f141-4e52-9661-58ca2233959a\t{"some": "key", "sender": "some sender", "message": "a messaage"}' }); + t.deepEqual(actual, expected); +}); + +test.serial('parsePayload correctly parses AWS Linux 2 style console output', async (t) => { + const parsePayload = indexer.__get__('parsePayload'); + const expected = { + some: 'key', + sender: 'some sender', + message: 'a messaage', + RequestId: 'a714a0ef-f141-4e52-9661-58ca2233959a' + }; + const actual = parsePayload({ sender: 'fixture_sender', message: '2018-06-01T17:45:27.108Z\ta714a0ef-f141-4e52-9661-58ca2233959a\tINFO\t{"some": "key", "sender": "some sender", "message": "a messaage"}' }); + t.deepEqual(actual, expected); +}); + + +test.serial('parsePayload correctly handles unparseable record', async (t) => { + const parsePayload = indexer.__get__('parsePayload'); + const testPayload = { + message: 'INFO MESSAGE', + sender: 'AWS sender', + executions: 'some execution value', + timestamp: '2018-06-01T17:45:27.108Z', + version: '1' + }; + const expected = { + message: 'INFO MESSAGE', + sender: 'AWS sender', + executions: 'some execution value', + timestamp: '2018-06-01T17:45:27.108Z', + version: '1', + level: 30, + pid: 1, + name: 'cumulus' + }; + const actual = parsePayload(testPayload); + t.deepEqual(actual, expected); +}); diff --git a/packages/checksum/package.json b/packages/checksum/package.json index 200dab62fb7f..bc9d7c11b948 100644 --- a/packages/checksum/package.json +++ b/packages/checksum/package.json @@ -3,7 +3,7 @@ "version": "1.16.0", "description": "Cumulus checksum utilities", "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "scripts": { "test": "ava", diff --git a/packages/cmr-client/package.json b/packages/cmr-client/package.json index 0784b4db254d..d59d6e6a7cb9 100644 --- a/packages/cmr-client/package.json +++ b/packages/cmr-client/package.json @@ -2,7 +2,7 @@ "name": "@cumulus/cmr-client", "version": "1.16.0", "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "scripts": { "build-docs": "jsdoc2md --heading-depth 2 --template templates/API.hbs CMR.js CMRSearchConceptQueue.js > API.md", diff --git a/packages/cmrjs/package.json b/packages/cmrjs/package.json index ddebc484a915..48a71193f3b5 100644 --- a/packages/cmrjs/package.json +++ b/packages/cmrjs/package.json @@ -3,7 +3,7 @@ "version": "1.16.0", "description": "A node SDK for CMR", "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "scripts": { "test": "ava", diff --git a/packages/common/package.json b/packages/common/package.json index 6646ba6859b7..d3b56c76f5af 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -8,7 +8,7 @@ "NASA" ], "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "publishConfig": { "access": "public" @@ -44,7 +44,7 @@ "@cumulus/checksum": "1.16.0", "@cumulus/logger": "1.16.0", "ajv": "^5.2.2", - "aws-sdk": "^2.250.1", + "aws-sdk": "^2.585.0", "follow-redirects": "^1.2.4", "fs-extra": "^5.0.0", "got": "^9.2.1", @@ -72,7 +72,7 @@ "p-retry": "^4.2.0", "pump": "^3.0.0", "randexp": "^0.4.9", - "ssh2": "^0.5.5", + "ssh2": "^0.8.7", "url-join": "^4.0.0", "uuid": "^3.2.1" }, diff --git a/packages/deployment/package.json b/packages/deployment/package.json index fe3d433c8b5a..ca43db613a42 100644 --- a/packages/deployment/package.json +++ b/packages/deployment/package.json @@ -16,7 +16,7 @@ "files": "test" }, "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "keywords": [ "CUMULUS" @@ -43,7 +43,7 @@ "license": "Apache-2.0", "dependencies": { "@cumulus/common": "1.16.0", - "aws-sdk": "^2.479.0", + "aws-sdk": "^2.585.0", "commander": "^2.20.0", "extract-zip": "^1.6.6", "fs-extra": "^5.0.0", diff --git a/packages/ingest/package.json b/packages/ingest/package.json index c3d187d5c52f..2b9fdaca6e2b 100644 --- a/packages/ingest/package.json +++ b/packages/ingest/package.json @@ -3,7 +3,7 @@ "version": "1.16.0", "description": "Ingest utilities", "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "scripts": { "test": "ava", @@ -38,13 +38,13 @@ "dependencies": { "@cumulus/common": "1.16.0", "@cumulus/pvl": "1.16.0", - "aws-sdk": "^2.238.1", + "aws-sdk": "^2.585.0", "cksum": "^1.3.0", "encodeurl": "^1.0.2", "fs-extra": "^5.0.0", "got": "^9.2.1", "is-ip": "^2.0.0", - "jsftp": "https://github.com/yjpa7145/jsftp.git#Fix-partial-file-issue", + "jsftp": "https://github.com/jkovarik/jsftp.git#add_288", "lodash.clonedeep": "^4.5.0", "lodash.flatten": "^4.4.0", "lodash.get": "^4.4.2", diff --git a/packages/integration-tests/.babelrc b/packages/integration-tests/.babelrc index 6cbf72f6c48e..bd9cdb62e795 100644 --- a/packages/integration-tests/.babelrc +++ b/packages/integration-tests/.babelrc @@ -4,7 +4,7 @@ "presets": [ ["env", { "targets": { - "node": "8.10" + "node": "10.16.3" } }] ], diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index ab65538f112f..d14b0321cd77 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -6,7 +6,7 @@ "cumulus-test": "./bin/cli.js" }, "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "main": "index.js", "publishConfig": { @@ -28,7 +28,7 @@ "@cumulus/cmrjs": "1.16.0", "@cumulus/common": "1.16.0", "@cumulus/deployment": "1.16.0", - "aws-sdk": "^2.238.1", + "aws-sdk": "^2.585.0", "base-64": "^0.1.0", "commander": "^2.15.0", "fs-extra": "^5.0.0", diff --git a/packages/logger/package.json b/packages/logger/package.json index d8e4548e9511..ffa93a054c78 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -8,7 +8,7 @@ "NASA" ], "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "publishConfig": { "access": "public" diff --git a/packages/pvl/package.json b/packages/pvl/package.json index cf763b3515e5..48b6358266cb 100644 --- a/packages/pvl/package.json +++ b/packages/pvl/package.json @@ -4,7 +4,7 @@ "description": "Parse and serialize Parameter Value Language, a data markup language used by NASA", "main": "index.js", "engine": { - "node": ">=4.3" + "node": ">=10.16.3" }, "scripts": { "test": "ava", diff --git a/packages/task-debug/README.md b/packages/task-debug/README.md index 654065e2019d..c56586f096bf 100644 --- a/packages/task-debug/README.md +++ b/packages/task-debug/README.md @@ -30,7 +30,7 @@ is always used. * Currently only linear workflows are supported, e.g., no branching, but it should be pretty simple to add branching support later. -* Because of the dynamic loading of tasks it is recommend to use node 8 without transpiling when +* Because of the dynamic loading of tasks it is recommend to use node 10 without transpiling when debugging to avoid the need to generate and deal with source maps ## About Cumulus diff --git a/packages/task-debug/package.json b/packages/task-debug/package.json index 86256b25f78a..31d1c6f4cd7c 100644 --- a/packages/task-debug/package.json +++ b/packages/task-debug/package.json @@ -10,7 +10,7 @@ "url": "https://github.com/nasa/cumulus" }, "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "author": "Cumulus Authors", "license": "Apache-2.0", diff --git a/packages/test-data/package.json b/packages/test-data/package.json index fc2225ce2306..dbcc90ec31c5 100644 --- a/packages/test-data/package.json +++ b/packages/test-data/package.json @@ -16,7 +16,7 @@ "url": "https://github.com/nasa/cumulus" }, "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "author": "Cumulus Authors", "license": "Apache-2.0" diff --git a/tasks/discover-granules/.babelrc b/tasks/discover-granules/.babelrc index 6cbf72f6c48e..bd9cdb62e795 100644 --- a/tasks/discover-granules/.babelrc +++ b/tasks/discover-granules/.babelrc @@ -4,7 +4,7 @@ "presets": [ ["env", { "targets": { - "node": "8.10" + "node": "10.16.3" } }] ], diff --git a/tasks/discover-granules/package.json b/tasks/discover-granules/package.json index 8811d0fb21d5..2cf83c5731a2 100644 --- a/tasks/discover-granules/package.json +++ b/tasks/discover-granules/package.json @@ -12,7 +12,7 @@ "url": "https://github.com/nasa/cumulus" }, "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "scripts": { "test": "ava", @@ -39,7 +39,7 @@ "license": "Apache-2.0", "dependencies": { "@cumulus/common": "1.16.0", - "@cumulus/cumulus-message-adapter-js": "^1.0.10", + "@cumulus/cumulus-message-adapter-js": "^1.1.0", "@cumulus/ingest": "1.16.0" }, "devDependencies": { diff --git a/tasks/discover-pdrs/.babelrc b/tasks/discover-pdrs/.babelrc index 6cbf72f6c48e..bd9cdb62e795 100644 --- a/tasks/discover-pdrs/.babelrc +++ b/tasks/discover-pdrs/.babelrc @@ -4,7 +4,7 @@ "presets": [ ["env", { "targets": { - "node": "8.10" + "node": "10.16.3" } }] ], diff --git a/tasks/discover-pdrs/package.json b/tasks/discover-pdrs/package.json index 229820f40568..4b302f1550bb 100644 --- a/tasks/discover-pdrs/package.json +++ b/tasks/discover-pdrs/package.json @@ -12,7 +12,7 @@ "url": "https://github.com/nasa/cumulus" }, "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "scripts": { "test": "ava", @@ -38,7 +38,7 @@ "license": "Apache-2.0", "dependencies": { "@cumulus/common": "1.16.0", - "@cumulus/cumulus-message-adapter-js": "^1.0.10", + "@cumulus/cumulus-message-adapter-js": "^1.1.0", "@cumulus/ingest": "1.16.0", "lodash.get": "^4.4.2" }, diff --git a/tasks/files-to-granules/.babelrc b/tasks/files-to-granules/.babelrc index 6cbf72f6c48e..bd9cdb62e795 100644 --- a/tasks/files-to-granules/.babelrc +++ b/tasks/files-to-granules/.babelrc @@ -4,7 +4,7 @@ "presets": [ ["env", { "targets": { - "node": "8.10" + "node": "10.16.3" } }] ], diff --git a/tasks/files-to-granules/package.json b/tasks/files-to-granules/package.json index 4c9eb9af5965..fcb821d0cc96 100644 --- a/tasks/files-to-granules/package.json +++ b/tasks/files-to-granules/package.json @@ -22,7 +22,7 @@ "prepare": "npm run build && (cd dist && zip -r lambda.zip index.js schemas)" }, "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "nyc": { "exclude": [ @@ -32,7 +32,7 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "@cumulus/cumulus-message-adapter-js": "^1.0.10", + "@cumulus/cumulus-message-adapter-js": "^1.1.0", "lodash.flatten": "^4.4.0", "lodash.get": "^4.4.2", "lodash.keyby": "^4.6.0" diff --git a/tasks/hello-world/.babelrc b/tasks/hello-world/.babelrc index 6cbf72f6c48e..bd9cdb62e795 100644 --- a/tasks/hello-world/.babelrc +++ b/tasks/hello-world/.babelrc @@ -4,7 +4,7 @@ "presets": [ ["env", { "targets": { - "node": "8.10" + "node": "10.16.3" } }] ], diff --git a/tasks/hello-world/package.json b/tasks/hello-world/package.json index 5c227c209ee3..fba86d76bedc 100644 --- a/tasks/hello-world/package.json +++ b/tasks/hello-world/package.json @@ -12,7 +12,7 @@ "url": "https://github.com/nasa/cumulus" }, "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "scripts": { "test": "ava", @@ -36,7 +36,7 @@ "license": "Apache-2.0", "dependencies": { "@cumulus/common": "1.16.0", - "@cumulus/cumulus-message-adapter-js": "^1.0.10" + "@cumulus/cumulus-message-adapter-js": "^1.1.0" }, "devDependencies": { "ava": "^2.1.0", diff --git a/tasks/move-granules/.babelrc b/tasks/move-granules/.babelrc index 6cbf72f6c48e..bd9cdb62e795 100644 --- a/tasks/move-granules/.babelrc +++ b/tasks/move-granules/.babelrc @@ -4,7 +4,7 @@ "presets": [ ["env", { "targets": { - "node": "8.10" + "node": "10.16.3" } }] ], diff --git a/tasks/move-granules/package.json b/tasks/move-granules/package.json index 6d00123992cf..93117277d14d 100644 --- a/tasks/move-granules/package.json +++ b/tasks/move-granules/package.json @@ -15,7 +15,7 @@ "access": "public" }, "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "scripts": { "test": "ava", @@ -43,7 +43,7 @@ "dependencies": { "@cumulus/cmrjs": "1.16.0", "@cumulus/common": "1.16.0", - "@cumulus/cumulus-message-adapter-js": "^1.0.10", + "@cumulus/cumulus-message-adapter-js": "^1.1.0", "@cumulus/ingest": "1.16.0", "lodash.clonedeep": "^4.5.0", "lodash.flatten": "^4.4.0", diff --git a/tasks/parse-pdr/.babelrc b/tasks/parse-pdr/.babelrc index 6cbf72f6c48e..bd9cdb62e795 100644 --- a/tasks/parse-pdr/.babelrc +++ b/tasks/parse-pdr/.babelrc @@ -4,7 +4,7 @@ "presets": [ ["env", { "targets": { - "node": "8.10" + "node": "10.16.3" } }] ], diff --git a/tasks/parse-pdr/package.json b/tasks/parse-pdr/package.json index 3368f2bc28fe..4898188d84cc 100644 --- a/tasks/parse-pdr/package.json +++ b/tasks/parse-pdr/package.json @@ -16,7 +16,7 @@ "access": "public" }, "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "scripts": { "test": "ava", @@ -32,7 +32,7 @@ }, "dependencies": { "@cumulus/common": "1.16.0", - "@cumulus/cumulus-message-adapter-js": "^1.0.10", + "@cumulus/cumulus-message-adapter-js": "^1.1.0", "@cumulus/ingest": "1.16.0", "lodash.clonedeep": "^4.5.0", "lodash.get": "^4.4.2" diff --git a/tasks/pdr-status-check/.babelrc b/tasks/pdr-status-check/.babelrc index 6cbf72f6c48e..bd9cdb62e795 100644 --- a/tasks/pdr-status-check/.babelrc +++ b/tasks/pdr-status-check/.babelrc @@ -4,7 +4,7 @@ "presets": [ ["env", { "targets": { - "node": "8.10" + "node": "10.16.3" } }] ], diff --git a/tasks/pdr-status-check/package.json b/tasks/pdr-status-check/package.json index 0ac64f493bd5..9247f73c373a 100644 --- a/tasks/pdr-status-check/package.json +++ b/tasks/pdr-status-check/package.json @@ -10,7 +10,7 @@ "access": "public" }, "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "scripts": { "test": "ava", @@ -36,7 +36,7 @@ }, "dependencies": { "@cumulus/common": "1.16.0", - "@cumulus/cumulus-message-adapter-js": "^1.0.10" + "@cumulus/cumulus-message-adapter-js": "^1.1.0" }, "devDependencies": { "ava": "^2.1.0", diff --git a/tasks/post-to-cmr/.babelrc b/tasks/post-to-cmr/.babelrc index 6cbf72f6c48e..bd9cdb62e795 100644 --- a/tasks/post-to-cmr/.babelrc +++ b/tasks/post-to-cmr/.babelrc @@ -4,7 +4,7 @@ "presets": [ ["env", { "targets": { - "node": "8.10" + "node": "10.16.3" } }] ], diff --git a/tasks/post-to-cmr/package.json b/tasks/post-to-cmr/package.json index 7ef2e9005c42..bc5febc72be9 100644 --- a/tasks/post-to-cmr/package.json +++ b/tasks/post-to-cmr/package.json @@ -15,7 +15,7 @@ "access": "public" }, "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "scripts": { "test": "ava", @@ -38,7 +38,7 @@ "dependencies": { "@cumulus/cmrjs": "1.16.0", "@cumulus/common": "1.16.0", - "@cumulus/cumulus-message-adapter-js": "^1.0.10", + "@cumulus/cumulus-message-adapter-js": "^1.1.0", "lodash.keyby": "^4.6.0" }, "devDependencies": { diff --git a/tasks/queue-granules/.babelrc b/tasks/queue-granules/.babelrc index 6cbf72f6c48e..bd9cdb62e795 100644 --- a/tasks/queue-granules/.babelrc +++ b/tasks/queue-granules/.babelrc @@ -4,7 +4,7 @@ "presets": [ ["env", { "targets": { - "node": "8.10" + "node": "10.16.3" } }] ], diff --git a/tasks/queue-granules/package.json b/tasks/queue-granules/package.json index 730ee0d66ff9..63eb5517765c 100644 --- a/tasks/queue-granules/package.json +++ b/tasks/queue-granules/package.json @@ -15,7 +15,7 @@ "access": "public" }, "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "scripts": { "test": "ava", @@ -33,7 +33,7 @@ "license": "Apache-2.0", "dependencies": { "@cumulus/common": "1.16.0", - "@cumulus/cumulus-message-adapter-js": "^1.0.10", + "@cumulus/cumulus-message-adapter-js": "^1.1.0", "@cumulus/ingest": "1.16.0", "lodash.get": "^4.4.2" }, diff --git a/tasks/queue-pdrs/.babelrc b/tasks/queue-pdrs/.babelrc index 6cbf72f6c48e..bd9cdb62e795 100644 --- a/tasks/queue-pdrs/.babelrc +++ b/tasks/queue-pdrs/.babelrc @@ -4,7 +4,7 @@ "presets": [ ["env", { "targets": { - "node": "8.10" + "node": "10.16.3" } }] ], diff --git a/tasks/queue-pdrs/package.json b/tasks/queue-pdrs/package.json index 8f5bd6364c80..d38e0736f1f8 100644 --- a/tasks/queue-pdrs/package.json +++ b/tasks/queue-pdrs/package.json @@ -15,7 +15,7 @@ "access": "public" }, "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "scripts": { "test": "ava", @@ -33,7 +33,7 @@ "license": "Apache-2.0", "dependencies": { "@cumulus/common": "1.16.0", - "@cumulus/cumulus-message-adapter-js": "^1.0.10", + "@cumulus/cumulus-message-adapter-js": "^1.1.0", "@cumulus/ingest": "1.16.0", "lodash.get": "^4.4.2" }, diff --git a/tasks/sf-sns-report/.babelrc b/tasks/sf-sns-report/.babelrc index 6cbf72f6c48e..bd9cdb62e795 100644 --- a/tasks/sf-sns-report/.babelrc +++ b/tasks/sf-sns-report/.babelrc @@ -4,7 +4,7 @@ "presets": [ ["env", { "targets": { - "node": "8.10" + "node": "10.16.3" } }] ], diff --git a/tasks/sf-sns-report/package.json b/tasks/sf-sns-report/package.json index 7aa9463bcdd7..45e8c8076a69 100644 --- a/tasks/sf-sns-report/package.json +++ b/tasks/sf-sns-report/package.json @@ -15,7 +15,7 @@ "access": "public" }, "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "scripts": { "test": "ava", @@ -34,7 +34,7 @@ "license": "Apache-2.0", "dependencies": { "@cumulus/api": "1.16.0", - "@cumulus/cumulus-message-adapter-js": "^1.0.10", + "@cumulus/cumulus-message-adapter-js": "^1.1.0", "lodash.get": "^4.4.2" }, "devDependencies": { diff --git a/tasks/sync-granule/.babelrc b/tasks/sync-granule/.babelrc index 6cbf72f6c48e..bd9cdb62e795 100644 --- a/tasks/sync-granule/.babelrc +++ b/tasks/sync-granule/.babelrc @@ -4,7 +4,7 @@ "presets": [ ["env", { "targets": { - "node": "8.10" + "node": "10.16.3" } }] ], diff --git a/tasks/sync-granule/package.json b/tasks/sync-granule/package.json index 0270d81b244a..648196699789 100644 --- a/tasks/sync-granule/package.json +++ b/tasks/sync-granule/package.json @@ -15,7 +15,7 @@ "access": "public" }, "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "scripts": { "test": "ava", @@ -36,7 +36,7 @@ }, "dependencies": { "@cumulus/common": "1.16.0", - "@cumulus/cumulus-message-adapter-js": "^1.0.10", + "@cumulus/cumulus-message-adapter-js": "^1.1.0", "@cumulus/ingest": "1.16.0", "p-map": "^2.1.0" }, diff --git a/tasks/test-processing/.babelrc b/tasks/test-processing/.babelrc index 6cbf72f6c48e..bd9cdb62e795 100644 --- a/tasks/test-processing/.babelrc +++ b/tasks/test-processing/.babelrc @@ -4,7 +4,7 @@ "presets": [ ["env", { "targets": { - "node": "8.10" + "node": "10.16.3" } }] ], diff --git a/tasks/test-processing/package.json b/tasks/test-processing/package.json index 9028e13d108f..ea64a810523b 100644 --- a/tasks/test-processing/package.json +++ b/tasks/test-processing/package.json @@ -9,7 +9,7 @@ "url": "https://github.com/nasa/cumulus" }, "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "scripts": { "build": "webpack", @@ -20,7 +20,7 @@ "license": "Apache-2.0", "dependencies": { "@cumulus/common": "1.16.0", - "@cumulus/cumulus-message-adapter-js": "^1.0.10", + "@cumulus/cumulus-message-adapter-js": "^1.1.0", "@cumulus/integration-tests": "1.16.0", "lodash.clonedeep": "^4.5.0" }, diff --git a/tf-modules/archive/api.tf b/tf-modules/archive/api.tf index 74fb70d1177c..1695148c2ed4 100644 --- a/tf-modules/archive/api.tf +++ b/tf-modules/archive/api.tf @@ -16,7 +16,7 @@ resource "aws_lambda_function" "api" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/app/lambda.zip") handler = "index.handler" role = aws_iam_role.lambda_api_gateway.arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 100 environment { variables = { diff --git a/tf-modules/archive/bootstrap.tf b/tf-modules/archive/bootstrap.tf index a6ce0176bb66..d01258f1f291 100644 --- a/tf-modules/archive/bootstrap.tf +++ b/tf-modules/archive/bootstrap.tf @@ -12,7 +12,7 @@ resource "aws_lambda_function" "custom_bootstrap" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/bootstrap/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 300 memory_size = 320 environment { diff --git a/tf-modules/archive/bulk_delete.tf b/tf-modules/archive/bulk_delete.tf index 024fc7953ecb..3f2c19104afb 100644 --- a/tf-modules/archive/bulk_delete.tf +++ b/tf-modules/archive/bulk_delete.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "bulk_delete" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/bulkDelete/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" memory_size = 1024 timeout = 300 environment { diff --git a/tf-modules/archive/bulk_operation.tf b/tf-modules/archive/bulk_operation.tf index db21c95fd51c..e6396b363e67 100644 --- a/tf-modules/archive/bulk_operation.tf +++ b/tf-modules/archive/bulk_operation.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "bulk_operation" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/bulkOperation/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 300 memory_size = 512 environment { diff --git a/tf-modules/archive/clean_executions.tf b/tf-modules/archive/clean_executions.tf index cbd909ed7079..e0b82aab982e 100644 --- a/tf-modules/archive/clean_executions.tf +++ b/tf-modules/archive/clean_executions.tf @@ -12,7 +12,7 @@ resource "aws_lambda_function" "clean_executions" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/cleanExecutions/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 900 memory_size = 192 dead_letter_config { diff --git a/tf-modules/archive/cw_sf_execution_event_to_db.tf b/tf-modules/archive/cw_sf_execution_event_to_db.tf index 061e4e44c2e1..1c86ff8488e3 100644 --- a/tf-modules/archive/cw_sf_execution_event_to_db.tf +++ b/tf-modules/archive/cw_sf_execution_event_to_db.tf @@ -67,7 +67,7 @@ resource "aws_lambda_function" "cw_sf_execution_event_to_db" { function_name = "${var.prefix}-cwSfExecutionEventToDb" role = "${aws_iam_role.cw_sf_execution_event_to_db_lambda.arn}" handler = "index.handler" - runtime = "nodejs8.10" + runtime = "nodejs10.x" dead_letter_config { target_arn = aws_sqs_queue.cw_sf_execution_event_to_db_dead_letter_queue.arn diff --git a/tf-modules/archive/db_indexer.tf b/tf-modules/archive/db_indexer.tf index cc4e144692fd..28453625fe10 100644 --- a/tf-modules/archive/db_indexer.tf +++ b/tf-modules/archive/db_indexer.tf @@ -12,7 +12,7 @@ resource "aws_lambda_function" "db_indexer" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/dbIndexer/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 300 memory_size = 320 dead_letter_config { diff --git a/tf-modules/archive/ems_reporting.tf b/tf-modules/archive/ems_reporting.tf index 23321f8b72ce..70f07b00377b 100644 --- a/tf-modules/archive/ems_reporting.tf +++ b/tf-modules/archive/ems_reporting.tf @@ -6,7 +6,7 @@ resource "aws_lambda_function" "ems_distribution_report" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/emsDistributionReport/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 900 memory_size = 320 environment { @@ -61,7 +61,7 @@ resource "aws_lambda_function" "ems_product_metadata_report" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/emsProductMetadataReport/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 300 memory_size = 320 environment { @@ -124,7 +124,7 @@ resource "aws_lambda_function" "ems_ingest_report" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/emsIngestReport/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 300 memory_size = 320 dead_letter_config { diff --git a/tf-modules/archive/execute_migrations.tf b/tf-modules/archive/execute_migrations.tf index 2579ab3af9f9..8874656abbe6 100644 --- a/tf-modules/archive/execute_migrations.tf +++ b/tf-modules/archive/execute_migrations.tf @@ -134,7 +134,7 @@ resource "aws_lambda_function" "execute_migrations" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/executeMigrations/lambda.zip") handler = "index.handler" role = aws_iam_role.migration_processing.arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 300 memory_size = 1024 environment { diff --git a/tf-modules/archive/index_from_database.tf b/tf-modules/archive/index_from_database.tf index 7cec1f0c9083..093ff1da21d9 100644 --- a/tf-modules/archive/index_from_database.tf +++ b/tf-modules/archive/index_from_database.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "index_from_database" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/indexFromDatabase/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 300 memory_size = 512 environment { diff --git a/tf-modules/archive/ingest-reporting.tf b/tf-modules/archive/ingest-reporting.tf index 0734cd2458d7..9f6a0d02e81f 100644 --- a/tf-modules/archive/ingest-reporting.tf +++ b/tf-modules/archive/ingest-reporting.tf @@ -70,7 +70,7 @@ resource "aws_lambda_function" "publish_executions" { function_name = "${var.prefix}-publishExecutions" role = aws_iam_role.publish_executions_lambda_role.arn handler = "index.handler" - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 30 memory_size = 128 @@ -193,7 +193,7 @@ resource "aws_lambda_function" "report_granules" { function_name = "${var.prefix}-reportGranules" role = aws_iam_role.report_granules_lambda_role.arn handler = "index.handler" - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 30 memory_size = 256 @@ -307,7 +307,7 @@ resource "aws_lambda_function" "report_pdrs" { function_name = "${var.prefix}-reportPdrs" role = "${aws_iam_role.report_pdrs_lambda_role.arn}" handler = "index.handler" - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 30 memory_size = 128 diff --git a/tf-modules/archive/log2elasticsearch.tf b/tf-modules/archive/log2elasticsearch.tf index a2227753f90a..b09cc3aca505 100644 --- a/tf-modules/archive/log2elasticsearch.tf +++ b/tf-modules/archive/log2elasticsearch.tf @@ -11,7 +11,7 @@ resource "aws_lambda_function" "log2elasticsearch" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/indexer/lambda.zip") handler = "index.logHandler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 100 memory_size = 320 dead_letter_config { diff --git a/tf-modules/archive/publish_reports.tf b/tf-modules/archive/publish_reports.tf index cad1c681de72..8cfa953d63a6 100644 --- a/tf-modules/archive/publish_reports.tf +++ b/tf-modules/archive/publish_reports.tf @@ -102,7 +102,7 @@ resource "aws_lambda_function" "publish_reports" { function_name = "${var.prefix}-publishReports" role = "${aws_iam_role.publish_reports_lambda_role.arn}" handler = "index.handler" - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 30 memory_size = 512 diff --git a/tf-modules/archive/reconciliation_report.tf b/tf-modules/archive/reconciliation_report.tf index 3b4fa4ea154a..346d4908f5fd 100644 --- a/tf-modules/archive/reconciliation_report.tf +++ b/tf-modules/archive/reconciliation_report.tf @@ -6,7 +6,7 @@ resource "aws_lambda_function" "create_reconciliation_report" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/createReconciliationReport/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 300 memory_size = 256 environment { diff --git a/tf-modules/distribution/main.tf b/tf-modules/distribution/main.tf index 3303923be473..f7b78a63685f 100644 --- a/tf-modules/distribution/main.tf +++ b/tf-modules/distribution/main.tf @@ -148,7 +148,7 @@ resource "aws_lambda_function" "s3_credentials" { source_code_hash = filebase64sha256("${path.module}/dist/src.zip") handler = "index.handler" role = aws_iam_role.s3_credentials_lambda[0].arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 10 memory_size = 320 diff --git a/tf-modules/distribution/package.json b/tf-modules/distribution/package.json index 00aa7ef288a2..78a69d70fad9 100644 --- a/tf-modules/distribution/package.json +++ b/tf-modules/distribution/package.json @@ -3,7 +3,7 @@ "private": true, "version": "1.16.0", "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "scripts": { "build": "webpack && (cd dist && rm -f package.zip && zip src.zip index.js)", diff --git a/tf-modules/ingest/discover-granules-task.tf b/tf-modules/ingest/discover-granules-task.tf index 8decba810175..eb1b97284bd9 100644 --- a/tf-modules/ingest/discover-granules-task.tf +++ b/tf-modules/ingest/discover-granules-task.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "discover_granules_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/discover-granules/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 300 memory_size = 512 diff --git a/tf-modules/ingest/discover-pdrs-task.tf b/tf-modules/ingest/discover-pdrs-task.tf index 3fdfba394cab..015f3a4ed954 100644 --- a/tf-modules/ingest/discover-pdrs-task.tf +++ b/tf-modules/ingest/discover-pdrs-task.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "discover_pdrs_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/discover-pdrs/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 300 memory_size = 1024 diff --git a/tf-modules/ingest/fake-processing-task.tf b/tf-modules/ingest/fake-processing-task.tf index 583f94c7db2c..c0d81911b0d5 100644 --- a/tf-modules/ingest/fake-processing-task.tf +++ b/tf-modules/ingest/fake-processing-task.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "fake_processing_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/test-processing/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 300 memory_size = 1024 diff --git a/tf-modules/ingest/files-to-granules-task.tf b/tf-modules/ingest/files-to-granules-task.tf index 1a767a41dcb2..8f40d07713bd 100644 --- a/tf-modules/ingest/files-to-granules-task.tf +++ b/tf-modules/ingest/files-to-granules-task.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "files_to_granules_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/files-to-granules/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 300 memory_size = 1024 diff --git a/tf-modules/ingest/hello-world-task.tf b/tf-modules/ingest/hello-world-task.tf index 8998dc00fdbc..70aa5bb5c388 100644 --- a/tf-modules/ingest/hello-world-task.tf +++ b/tf-modules/ingest/hello-world-task.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "hello_world_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/hello-world/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 300 memory_size = 256 diff --git a/tf-modules/ingest/lambda-functions.tf b/tf-modules/ingest/lambda-functions.tf index 26da563ddcee..f9dd08e2b192 100644 --- a/tf-modules/ingest/lambda-functions.tf +++ b/tf-modules/ingest/lambda-functions.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "fallback_consumer" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/messageConsumer/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 100 memory_size = 256 dead_letter_config { @@ -34,7 +34,7 @@ resource "aws_lambda_function" "kinesis_inbound_event_logger" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/payloadLogger/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 300 memory_size = 128 environment { @@ -57,7 +57,7 @@ resource "aws_lambda_function" "kinesis_outbound_event_logger" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/payloadLogger/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 300 memory_size = 512 environment { @@ -80,7 +80,7 @@ resource "aws_lambda_function" "manual_consumer" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/manualConsumer/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 100 memory_size = 256 environment { @@ -108,7 +108,7 @@ resource "aws_lambda_function" "message_consumer" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/messageConsumer/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 100 memory_size = 256 environment { @@ -137,7 +137,7 @@ resource "aws_lambda_function" "schedule_sf" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/sfScheduler/lambda.zip") handler = "index.schedule" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 100 memory_size = 192 dead_letter_config { @@ -165,7 +165,7 @@ resource "aws_lambda_function" "sf_semaphore_down" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/sfSemaphoreDown/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 100 memory_size = 512 environment { @@ -189,7 +189,7 @@ resource "aws_lambda_function" "sf_sns_report_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/sf-sns-report/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 300 memory_size = 1024 @@ -220,7 +220,7 @@ resource "aws_lambda_function" "sqs2sf" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/sfStarter/lambda.zip") handler = "index.sqs2sfHandler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 200 memory_size = 128 environment { @@ -243,7 +243,7 @@ resource "aws_lambda_function" "sqs2sfThrottle" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/sfStarter/lambda.zip") handler = "index.sqs2sfThrottleHandler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 200 memory_size = 128 environment { @@ -268,7 +268,7 @@ resource "aws_lambda_function" "sqs_message_consumer" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/sqsMessageConsumer/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 100 memory_size = 256 environment { @@ -295,7 +295,7 @@ resource "aws_lambda_function" "sqs_message_remover" { source_code_hash = filebase64sha256("${path.module}/../../packages/api/dist/sqsMessageRemover/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 100 memory_size = 256 environment { diff --git a/tf-modules/ingest/move-granules-task.tf b/tf-modules/ingest/move-granules-task.tf index 78be6623f36c..61e32808f6c5 100644 --- a/tf-modules/ingest/move-granules-task.tf +++ b/tf-modules/ingest/move-granules-task.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "move_granules_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/move-granules/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 300 memory_size = 1024 diff --git a/tf-modules/ingest/parse-pdr-task.tf b/tf-modules/ingest/parse-pdr-task.tf index 48cb7fd41a1a..a73f08ccf359 100644 --- a/tf-modules/ingest/parse-pdr-task.tf +++ b/tf-modules/ingest/parse-pdr-task.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "parse_pdr_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/parse-pdr/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 300 memory_size = 1024 diff --git a/tf-modules/ingest/pdr-status-check-task.tf b/tf-modules/ingest/pdr-status-check-task.tf index c14cc788bad3..b7a1327c009b 100644 --- a/tf-modules/ingest/pdr-status-check-task.tf +++ b/tf-modules/ingest/pdr-status-check-task.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "pdr_status_check_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/pdr-status-check/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 300 memory_size = 1024 diff --git a/tf-modules/ingest/post-to-cmr-task.tf b/tf-modules/ingest/post-to-cmr-task.tf index c886a463968c..b85f8ea4ee27 100644 --- a/tf-modules/ingest/post-to-cmr-task.tf +++ b/tf-modules/ingest/post-to-cmr-task.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "post_to_cmr_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/post-to-cmr/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 300 memory_size = 256 diff --git a/tf-modules/ingest/queue-granules-task.tf b/tf-modules/ingest/queue-granules-task.tf index a1a8ede4878d..cd6a62205ae3 100644 --- a/tf-modules/ingest/queue-granules-task.tf +++ b/tf-modules/ingest/queue-granules-task.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "queue_granules_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/queue-granules/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 300 memory_size = 1024 diff --git a/tf-modules/ingest/queue-pdrs-task.tf b/tf-modules/ingest/queue-pdrs-task.tf index 7f8537b40494..165a05673d6f 100644 --- a/tf-modules/ingest/queue-pdrs-task.tf +++ b/tf-modules/ingest/queue-pdrs-task.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "queue_pdrs_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/queue-pdrs/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 300 memory_size = 1024 diff --git a/tf-modules/ingest/sync-granule-task.tf b/tf-modules/ingest/sync-granule-task.tf index 0775ae780481..56156aaeff48 100644 --- a/tf-modules/ingest/sync-granule-task.tf +++ b/tf-modules/ingest/sync-granule-task.tf @@ -4,7 +4,7 @@ resource "aws_lambda_function" "sync_granule_task" { source_code_hash = filebase64sha256("${path.module}/../../tasks/sync-granule/dist/lambda.zip") handler = "index.handler" role = var.lambda_processing_role_arn - runtime = "nodejs8.10" + runtime = "nodejs10.x" timeout = 300 memory_size = 1024 diff --git a/tf-modules/s3-replicator/package.json b/tf-modules/s3-replicator/package.json index 2be19ed48246..4aff25b4639f 100644 --- a/tf-modules/s3-replicator/package.json +++ b/tf-modules/s3-replicator/package.json @@ -4,7 +4,7 @@ "description": "Replicate S3 Events to alternate bucket. Solves same-region replication.", "main": "index.js", "engines": { - "node": ">=8.10.0" + "node": ">=10.16.3" }, "scripts": { "test": "ava" @@ -12,7 +12,7 @@ "author": "Cumulus Authors", "license": "Apache-2.0", "dependencies": { - "aws-sdk": "^2.487.0" + "aws-sdk": "^2.585.0" }, "devDependencies": { "ava": "^2.1.0"