@cumulus/aws-client
Advanced tools
Changelog
[v9.3.0] 2021-07-26
@cumulus/api-client
will now throw an error if the status code
does not match the expected response (200 for most requests and 202 for a few requests that
trigger async operations). Previously the helpers in this package would return the response
regardless of the status code, so you may need to update any code using helpers from this
package to catch or to otherwise handle errors that you may encounter.archive_api_reserved_concurrency
terraform variable on the Cumulus module and increased if you are seeing throttling errors.
The default reserved concurrency value is 8.cmr_custom_host
variable for cumulus
module can now be used to configure Cumulus to
integrate with a custom CMR host name and protocol (e.g.
http://custom-cmr-host.com
). Note that you must include a protocol
(http://
or `https://) if specifying a value for this variable.rds_connetion_heartbeat
and it's
behavior has been replaced by a more robust database connection 'retry'
solution. Users can remove this value from their configuration, regardless
of value. See the Changed
section notes on CUMULUS-2528 for more details.Added user doc describing new features related to the Cumulus dead letter archive.
CUMULUS-2327
CUMULUS-2460
POST
/executions/search-by-granules for retrieving executions from a list of granules or granule querysearchExecutionsByGranules
to @cumulus/api-client/executions
CUMULUS-2475
GET
endpoint to distribution APICUMULUS-2463
PUT /granules
reingest action allows a user to override the default execution
to use by providing an optional workflowName
or executionArn
parameter on
the request body.PUT /granules/bulkReingest
action allows a user to override the default
execution/workflow combination to reingest with by providing an optional
workflowName
on the request body.Adds workflowName
and executionArn
params to @cumulus/api-client/reingestGranules
CUMULUS-2476
HEAD
Distribution requests replicating current behavior of TEACUMULUS-2478
CUMULUS-2486
CUMULUS-2487
CUMULUS-2569
CUMULUS-2568
deletePdr
/PDR deletion functionality to @cumulus/api-client/pdrs
removeCollectionAndAllDependencies
to integration test helpersexample/spec/apiUtils.waitForApiStatus
to wait for a
record to be returned by the API with a specific value for
status
example/spec/discoverUtils.uploadS3GranuleDataForDiscovery
to upload granule data fixtures
to S3 with a randomized granule ID for discover-granules
based
integration testsexample/spec/Collections.removeCollectionAndAllDependencies
to remove a collection and
all dependent objects (e.g. PDRs, granules, executions) from the
database via the API@cumulus/api-client
:
pdrs.deletePdr
- Delete a PDR via the APIreplays.postKinesisReplays
- Submit a POST request to the /replays
endpoint for replaying Kinesis messages@cumulus/api-client/granules.getGranuleResponse
to return the raw endpoint response from the GET /granules/<granuleId>
endpoint
@cumulus/integration-tests
to example/spec/helpers/workflowUtils
:
startWorkflowExecution
startWorkflow
executeWorkflow
buildWorkflow
testWorkflow
buildAndExecuteWorkflow
buildAndStartWorkflow
example/spec/helpers/workflowUtils.executeWorkflow
now uses
waitForApiStatus
to ensure that the execution is completed
or
failed
before resolvingexample/spec/helpers/testUtils.updateAndUploadTestFileToBucket
now accepts an object of parameters rather than positional
argumentspayload
in the input payload test fixture for reconciliation report integration testsexample/spec/parallel/ingest/ingestFromPdrSpec.js
example/spec/parallel/ingest/ingestFromPdrWithChildWorkflowMetaSpec.js
example/spec/parallel/ingest/ingestFromPdrWithExecutionNamePrefixSpec.js
example/spec/parallel/ingest/ingestPdrWithNodeNameSpec.js
@cumulus/api-client/CumulusApiClientError
error class to include new properties that can be accessed directly on
the error object:
statusCode
- The HTTP status code of the API responseapiMessage
- The message from the API responseparams.pRetryOptions
parameter to
@cumulus/api-client/granules.deleteGranule
to control the retry
behaviorcmr_custom_host
variable to accept a full protocol and host name
(e.g. http://cmr-custom-host.com
), whereas it previously only accepted a host nameexample/cumulus-tf
deployment to the new Cumulus Distributionexample/README.md
rds_connection_heartbeat
as a configuration option from all
Cumulus terraform modulesdbHeartBeat
as an environmental switch from
@cumulus/db.getKnexClient
in favor of more comprehensive general db
connect retry solutionrds_connection_timing_configuration
string map to allow for
configuration and tuning of Core's internal database retry/connection
timeout behaviors. These values map to connection pool configuration
values for tarn (https://github.com/vincit/tarn.js/) which Core's database
module / knex(https://www.npmjs.com/package/knex) use for this purpose:
@cumulus/db
and all terraform mdules to set default retry
configuration values for the database module to cover existing database
heartbeat connection failures as well as all other knex/tarn connection
creation failures.cmr_custom_host
variable was not properly forwarded into archive
, ingest
, and sqs-message-remover
modules from cumulus
moduleparse-pdr
set a granule's provider to the entire provider record when a NODE_NAME
is present. Expected behavior consistent with other tasks is to set the provider name in that field.@cumulus/api-client/pdrs.getPdr
to request correct endpoint for returning a PDR from the APIpublished: true
and with a CMR link in the Dynamo/PostgreSQL databases. Now,
the CMR deletion and the Dynamo/PostgreSQL record updates will all succeed or fail
together, preventing the database records from being out of sync with CMR.@cumulus/api-client/pdrs.getPdr
to request correct
endpoint for returning a PDR from the APIChangelog
[v9.2.0] 2021-06-22
GET
endpoint to distribution APIHEAD
Distribution requests replicating current behavior of TEAexample/cumulus-tf
deployment to the new Cumulus Distributionexample/README.md
/elasticsearch/index-from-database
from starting.Changelog
[v9.1.0] 2021-06-03
update-granules-cmr-metadata-file-links
task, the
granule UMM-G metadata should have version 1.6.2 or later, since CMR s3
link type 'GET DATA VIA DIRECT ACCESS' is not valid until UMM-G version
1.6.2EarthdataLoginClient
to
@cumulus/oauth-client/EarthdataLoginClient
and updated all references in
Cumulus Core.EarthdataLoginClient
property from earthdataLoginUrl
to
`loginUrl for consistency with new OAuth clients. See example in
oauth-client
README/s3credentials
endpoint to distribute
same-region read-only tokens based on a user's CMR ACLs./s3credentials
endpoint for distribution API/s3credentialsREADME
endpoint to distribution APItf-modules/cumulus_distribution
module to take earthdata or cognito credentialsexample/cumulus-tf/cumulus_distribution.tf
to use CSDAP credentialsS3ObjectStore
to aws-client
. This class allows for interaction with the S3 object store.object-store
package which contains abstracted object store functions for working with various cloud providers/
, /login
and /logout
endpoints to cumulus distribution apiisISOFile()
to check if a CMR file is a CMR ISO file.@cumulus/ingest/sqs
:
archiveSqsMessageToS3
- archives an incoming SQS message to S3deleteArchivedMessageFromS3
- deletes a processed SQS message from S3archiveSqsMessageToS3
to sqs-message-consumer
which
archives all incoming SQS messages to S3.deleteArchivedMessageFrom
to sqs-message-remover
which
deletes archived SQS message from S3 once it has been processed.@cumulus/api/es/*
code to new @cumulus/es-client
packagesfEventSqsToDbRecords
Lambda to 60 seconds to match
timeout for Knex library to acquire database connections@cumulus/cmrjs
updateCMRMetadata
and related functions to add
both HTTPS URLS and S3 URIs to CMR metadata.update-granules-cmr-metadata-file-links
task to add both HTTPS
URLs and S3 URIs to the OnlineAccessURLs field of CMR metadata. The task
configuration parameter cmrGranuleUrlType
now has default value both
.update-granules-cmr-metadata-file-links
task, the
granule UMM-G metadata should have version 1.6.2 or later, since CMR s3 link
type 'GET DATA VIA DIRECT ACCESS' is not valid until UMM-G version
1.6.2@cumulus/earthdata-login-client
to more generic
@cumulus/oauth-client
as a parent class for new OAuth clients.@cumulus/oauth-client/CognitoClient
to interface with AWS cognito login service.@cumulus/cmrjs
package:
@cumulus/cmrjs/cmr-utils.getGranuleTemporalInfo()
so it now
returns temporal info for CMR ISO 19115 SMAP XML files.@cumulus/cmrjs/cmr-utils.isCmrFilename()
to include
isISOFile()
.api-client/granules
functions as opposed to granulesApi from @cumulus/integration-tests
.remoteAltBucket
on download
method to allow for per-file override of
provider bucket for checksumremoteAltBucket
to allow for an override of the passed in provider
bucket for the source file/elasticsearch/index-from-database
from starting.docs/README.md
Changelog
[v8.1.1] 2021-04-30 -- Patch Release
Please note changes in 8.1.1 may not yet be released in future versions, as this is a backport/patch release on the 8.x series of releases. Updates that are included in the future will have a corresponding CHANGELOG entry in future releases.
isISOFile()
to check if a CMR file is a CMR ISO file.remoteAltBucket
on download
method to allow for per-file override of
provider bucket for checksumremoteAltBucket
to allow for an override of the passed in provider
bucket for the source fileCUMULUS-2497
@cumulus/cmrjs
package:
@cumulus/cmrjs/cmr-utils.getGranuleTemporalInfo()
so it now
returns temporal info for CMR ISO 19115 SMAP XML files.@cumulus/cmrjs/cmr-utils.isCmrFilename()
to include
isISOFile()
.Changelog
[v9.0.1] 2021-05-07
Please review the migration steps for 9.0.0 as this release is only a patch to correct a failure in our build script and push out corrected release artifacts. The previous migration steps still apply.
@cumulus/db
configuration to correctly build package.Changelog
[v9.0.0] 2021-05-03
@cumulus/api/models.asyncOperation
class in
favor of the added @cumulus/async-operations
module:
start
startAsyncOperations
async-operations
endpoint will now omit output
instead of
returning none
when the operation did not return output.@cumulus/api/models/granule.unpublishAndDeleteGranule
in favor
of @cumulus/api/lib/granule-remove-from-cmr.unpublishGranule
and
@cumulus/api/lib/granule-delete.deleteGranuleAndFiles
.sf-event-sqs-to-db-records
to write a granule's files to
PostgreSQL only after the workflow has exited the Running
status.
Please note that any workflow that uses sf_sqs_report_task
for
mid-workflow updates will be impacted.file
schema and TypeScript type definition to require
bucket
and key
fields.move granule
endpoint now moves granule files on a per-file basismove granule
endpoint on granule file move failure will retain the
file at it's original location, but continue to move any other granule
files.move
method from the @cumulus/api/models.granule
class.
logic is now handled in @cumulus/api/endpoints/granules
and is
accessible via the Core API.data-migration2
Lambda to be run after data-migration1
data-migration2
Lambda for migrating execution records
from DynamoDB to PostgreSQL@cumulus/async-operations
to core packages, exposing
startAsyncOperation
which will handle starting an async operation and
adding an entry to both PostgreSQL and DynamoDbcollections
tabledata-migration1
Lambda for migrating collection records
from Dynamo to PostgreSQLproviders
tabledata-migration1
Lambda for migrating provider records
from Dynamo to PostgreSQLdata-migration1
Lambda for migrating async operation
records from Dynamo to PostgreSQLdata-migration1
Lambda for migrating rule records from
DynamoDB to PostgreSQLrules
tableasyncOperations
tableexecutions
tabletranslateApiAsyncOperationToPostgresAsyncOperation
function to @cumulus/db
data-migration2
Lambda for migrating PDR records from
DynamoDB to PostgreSQLdata-migration2
Lambda for migrating Granule records from
DynamoDB to PostgreSQL and parse Granule records to store File records in
RDS.granules_executions
table to PostgreSQL schema to allow for a
many-to-many relationship between granules and executions
granules_executions
table referring to that record will also be
deleted.upsertGranuleWithExecutionJoinRecord
helper to @cumulus/db
to
allow for upserting a granule record and its corresponding
granules_execution
record@cumulus/db/translate/file/translateApiFiletoPostgresFile
@cumulus/db/translate/file/translateApiGranuletoPostgresGranule
@cumulus/message/Providers/getMessageProvider
@cumulus/message/Executions/getMessageExecutionOriginalPayload
@cumulus/message/Executions/getMessageExecutionFinalPayload
@cumulus/message/workflows/getMessageWorkflowTasks
@cumulus/message/workflows/getMessageWorkflowStartTime
@cumulus/message/workflows/getMessageWorkflowStopTime
@cumulus/message/workflows/getMessageWorkflowName
@cumulus/message/PDRs/getMessagePdrRunningExecutions
@cumulus/message/PDRs/getMessagePdrCompletedExecutions
@cumulus/message/PDRs/getMessagePdrFailedExecutions
@cumulus/message/PDRs/getMessagePdrStats
@cumulus/message/PDRs/getPdrPercentCompletion
@cumulus/message/workflows/getWorkflowDuration
translateApiRuleToPostgresRule
to @cumulus/db
to translate API
Rule to conform to Postgres Rule definition.sfEventSqsToDbRecords
Lambda for granule and
file writes to the core PostgreSQL databasecreate
in Rules Model to take in optional createdAt
parameter
which sets the value of createdAt if not specified during function call.sfEventSqsToDbRecords
Lambda to write execution, PDR,
and granule records to the core PostgreSQL database in parallel with
writes to DynamoDBsfEventSqsToDbRecords
Lambda for PDR writes
to the core PostgreSQL databasesfEventSqsToDbRecords
Lambda for execution
writes to the core PostgreSQL databaseasync-operations
endpoint will now omit output
instead of
returning none
when the operation did not return output.files
to remove filename
and
name
and only support file_name
.files
to remove size
to only
support file_size
.PostgresFile
to remove duplicate fields filename
and name
and
rename size
to file_size
.sf-event-sqs-to-db-records
behavior to discard and not throw an
error on an out-of-order/delayed message so as not to have it be sent to
the DLQ.DELETE /pdrs/{pdrname}
API behavior to also delete record from
PostgreSQL database.DELETE /granules/{granuleName}
API behavior to also delete
record from PostgreSQL database.Bulk operation BULK_GRANULE_DELETE
API behavior to also delete
records from PostgreSQL database.granule_cumulus_id
foreign key to granule in PostgreSQL files
table to use a CASCADE delete, so records in the files table are
automatically deleted by the database when the corresponding granule is
deleted.write-db-dlq-records-to-s3
lambda.process-dead-letter-archive
lambda to pick up and process dead letters in the S3 system bucket dead letter archive./deadLetterArchive/recoverCumulusMessages
endpoint to trigger an async operation to leverage this capability on demand.translateApiAsyncOperationToPostgresAsyncOperation
to call
JSON.stringify
and then JSON.parse
on output.postgres-migration-async-operation
lambda to start an ECS task to
run a the data-migration2
lambda.async_operations
table to include Data Migration 2
as a new
operation_type
.cumulus-tf/variables.tf
to include optional_dynamo_tables
that
will be merged with dynamo_tables
.packages/db/src/types/summary.ts
with
MigrationSummary
and DataMigration1
and DataMigration2
types.data-migration1
and data-migration2
lambdas to return
MigrationSummary
objects.RecordAlreadyMigrated
logs in data-migration1
and
data-migration2
granuleSearchParams.granuleId
or granuleSearchParams.collectionId
properties in the payload for the
<prefix>-postgres-migration-async-operation
LambdamigrationsList
property in the payload for the
<prefix>-postgres-migration-async-operation
LambdastoreErrors
function which stores errors in system bucket.executions
and granulesAndFiles
data migrations to call storeErrors
to store migration errors.system_bucket
variable to data-migration2
.executions
and granules
migrations to improve performance. The behavior of the parallel scanning and writes can be controlled via the following properties on the event input to the <prefix>-postgres-migration-async-operation
Lambda:
granuleMigrationParams.parallelScanSegments
: How many segments to divide your granules DynamoDB table into for parallel scanninggranuleMigrationParams.parallelScanLimit
: The maximum number of granule records to evaluate for each parallel scanning segment of the DynamoDB tablegranuleMigrationParams.writeConcurrency
: The maximum number of concurrent granule/file writes to perform to the PostgreSQL database across all DynamoDB segmentsexecutionMigrationParams.parallelScanSegments
: How many segments to divide your executions DynamoDB table into for parallel scanningexecutionMigrationParams.parallelScanLimit
: The maximum number of execution records to evaluate for each parallel scanning segment of the DynamoDB tableexecutionMigrationParams.writeConcurrency
: The maximum number of concurrent execution writes to perform to the PostgreSQL database across all DynamoDB segments@cumulus/aws-client/DynamoDb.parallelScan
helper to perform parallel scanning on DynamoDb tablesfailed
in both Postgres and DynamoDB if any/all of its files fail to write to the database.@cumulus/ingest/moveGranuleFiles
Changelog
[v8.1.0] 2021-04-29
@cumulus/api
/granules
and /granules/{granuleId}
endpoints now take getRecoveryStatus
parameter
to include recoveryStatus in result granule(s)@cumulus/api-client.granules.getGranule
function takes a query
parameter which can be used to
request additional granule information.@cumulus/api@7.2.1-alpha.0
for dashboard testingtf-modules/cumulus_distribution
module to standup a skeleton
distribution apiChangelog
[v8.0.0] 2021-04-08
/granules/bulk
to use queueUrl
property instead of a queueName
property for setting the queue to use for scheduling bulk granule workflowsqueueUrl
property in the request body. If provided, this value should be the full URL for an SQS queue.CUMULUS-2374
CUMULUS-2421
ecs_include_docker_cleanup_cronjob
boolean variable to the Cumulus module to enable cron job to clean up docker root storage blocks in ECS cluster template for non-device-mapper
storage drivers. Default value is false
. This fulfills a specific user support request. This feature is otherwise untested and will remain so until we can iterate with a better, more general-purpose solution. Use of this feature is NOT recommended unless you are certain you need it.CUMULUS-1808
deleteSnsTrigger
to give users more context about where to look to resolve ResourceNotFound error when disabling or deleting a rule.Changelog
[v7.2.0] 2021-03-23
@cumulus/api
to get recovery statusCopyToGlacier
step to example IngestAndPublishGranuleWithOrca workflowaddShortnameAndVersionIdToConceptId
field has been added to the config inputs of the hyrax-metadata-updates
task