Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write DiscoverGranulesMap output to S3 #301

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions app/stacks/cumulus/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,16 @@ data "aws_iam_policy_document" "allow_sfn_distributed_maps" {
resources = ["*"]
}

# Allow StepFunctions to read input from S3, which is necessary when the size
# of the input array message might exceed the quota (256KiB).
# Allow StepFunctions to read input from S3, as well as write output to it,
# which is necessary when the size of the input array message might exceed the
# quota (256KiB).
statement {
effect = "Allow"
actions = [
"s3:Get*",
"s3:List*"
"s3:List*",
"s3:PutObject",
"s3:AbortMultipartUpload",
]
resources = ["*"]
}
Expand Down
18 changes: 18 additions & 0 deletions app/stacks/cumulus/templates/discover-granules-workflow.asl.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@
"Key.$": "$.key"
}
},
"ResultWriter": {
"Resource": "arn:aws:states:::s3:putObject",
"Parameters": {
"Bucket.$": "$.bucket",
"Prefix": "mapRun"
}
},
"ItemProcessor": {
"ProcessorConfig": {
"Mode": "DISTRIBUTED",
Expand Down Expand Up @@ -140,7 +147,18 @@
"MaxConcurrency": 10,
"ToleratedFailurePercentage": 0,
"ItemsPath": "$",
"ResultWriter": {
"Resource": "arn:aws:states:::s3:putObject",
"Parameters": {
"Bucket.$": "$.[0].cumulus_meta.system_bucket",
"Prefix": "mapRun"
}
},
"ItemProcessor": {
"ProcessorConfig": {
"Mode": "DISTRIBUTED",
"ExecutionType": "STANDARD"
},
"StartAt": "UnbatchGranules",
"States": {
"UnbatchGranules": {
Expand Down
Loading
Loading