Portal Community
  Irreversible Bulk Deletion: This operation deletes ALL objects whose keys begin with the specified folderPath prefix. For unversioned buckets, this is permanent. Confirm the folderPath expression resolves to the intended prefix before execution. A misplaced prefix could delete thousands of objects.
  S3 Folder Model: S3 has no native folders. folder/delete performs a prefix-based batch delete — listing all objects with the matching key prefix and deleting them in batches of up to maxObjectsToDelete per AWS DeleteObjects API call.

When to Use

Configuration

Connection

FieldRequiredDescription
accessKeyIdRequiredAWS Access Key ID. Store in BizFirst Credentials Manager.
secretKeyRequiredAWS Secret Access Key. Never log or expose.
sessionTokenOptionalSTS session token for temporary credentials.
regionRequiredAWS region of the bucket.

Operation Fields

FieldRequiredDescription
bucketNameRequiredName of the bucket containing the folder to delete.
folderPathRequiredPrefix of objects to delete (e.g. tenants/t1024/). All objects whose keys start with this string are deleted. Use a trailing slash to scope to a folder; omitting it may match unintended keys.
verifyEmptyOptionalWhen true, check the prefix is empty before deleting — useful for confirming prior cleanup steps completed. Default: false.
maxObjectsToDeleteOptionalMaximum number of objects to delete per batch. Default: 1000. The node iterates through all pages until all matching objects are deleted.

Sample Configuration

{
  "connection": {
    "accessKeyId": "{{ $credentials.s3_ops.accessKeyId }}",
    "secretKey": "{{ $credentials.s3_ops.secretKey }}",
    "region": "us-east-1"
  },
  "operation": {
    "resource": "folder",
    "action": "delete",
    "bucketName": "acme-tenant-storage",
    "folderPath": "tenants/{{ $node.OffboardTenant.output.tenantId }}/",
    "verifyEmpty": false,
    "maxObjectsToDelete": 1000
  }
}

Validation Errors

Error CodeCause & Resolution
AccessDeniedThe IAM identity lacks s3:DeleteObject or s3:ListBucket on the target bucket. Both permissions are required for prefix-based batch deletion.
NoSuchBucketThe specified bucket does not exist. Verify the bucket name and consider handling gracefully in idempotent offboarding workflows.
PrefixNotEmptyOnly raised when verifyEmpty: true and objects are found. Used as a pre-flight safety check — address the remaining content and retry.

Output

Success Port

FieldTypeDescription
statusstringsuccess when all objects under the prefix have been deleted.
errorCodestringEmpty string on success.
bucketNamestringThe bucket where objects were deleted.
folderPathstringThe prefix that was deleted.
objectsRemovedintTotal number of objects deleted across all batch iterations.

Error Port

On failure, activates with errorCode, errorMessage, and httpStatusCode. Handle NoSuchBucket gracefully in decommission workflows where the bucket may have been deleted already.

Sample Output

{
  "status": "success",
  "errorCode": "",
  "bucketName": "acme-tenant-storage",
  "folderPath": "tenants/t1024/",
  "objectsRemoved": 342
}

Expression Reference

ExpressionResult
{{ $node.DeleteTenantFolder.output.objectsRemoved }}Total objects removed — log to offboarding audit record.
{{ $node.DeleteTenantFolder.output.folderPath }}Confirm deleted prefix in audit trail or notification message.
{{ $node.DeleteTenantFolder.output.bucketName }}Confirm target bucket in log entries.

Node Policies & GuardRails

Policy AreaRecommendation
Credential StorageStore credentials in BizFirst Credentials Manager. Never hardcode.
IAM PermissionsGrant s3:DeleteObject and s3:ListBucket scoped to the target bucket ARN. Restrict further using condition keys if possible.
Prefix ValidationAlways validate the folderPath expression before execution. A missing or truncated prefix could match and delete unintended objects.
Trailing SlashAlways include a trailing / in folderPath to scope deletion to a specific "folder" and prevent accidental prefix overlap.
Approval GateFor tenant offboarding folder deletion, insert a Human-in-Loop Approval node requiring explicit confirmation before executing this operation.
Versioned Bucket HandlingFor versioned buckets, prefix deletion creates delete markers rather than permanently removing data. Follow with a versioned delete sweep to permanently erase all versions.
Audit LoggingLog objectsRemoved, folderPath, and the executing user identity to a persistent audit store immediately after deletion completes.
IdempotencyIf the prefix no longer contains any objects (already deleted), objectsRemoved will be 0 and the operation returns success — safe for idempotent re-runs.

Examples

Example 1: Tenant Offboarding Folder Cleanup

As part of tenant offboarding, delete all objects in the tenant's storage folder after confirming data export.

// Node: ConfirmDataExport (prior step verifies export completed)
// Node: ApprovalGate (Human-in-Loop — require sign-off)
// Node: DeleteTenantData (S3 — folder/delete)
{
  "bucketName": "acme-shared-storage",
  "folderPath": "tenants/{{ $node.OffboardRequest.output.tenantId }}/",
  "maxObjectsToDelete": 1000
}
// Node: LogDeletion → { tenantId, objectsRemoved, deletedAt }

Example 2: Post-Ingestion Landing Zone Cleanup

After all files in an incoming upload folder have been processed and verified, delete the entire landing zone prefix.

// Node: VerifyAllProcessed (If Condition — all items in loop processed)
// Node: CleanupLandingZone (S3 — folder/delete)
{
  "bucketName": "acme-ingest",
  "folderPath": "incoming/{{ $node.BatchJob.output.batchId }}/",
  "maxObjectsToDelete": 1000
}
// On success: mark batchId as completed in database

Example 3: Expired Archive Partition Removal

A monthly scheduled workflow removes archive partitions older than the configured retention period.

// Node: CalculateExpiredPartition (Code Execute)
// Returns: expiryPrefix = "archive/" + expiredYear + "/" + expiredMonth + "/"
// Node: DeleteExpiredPartition (S3 — folder/delete)
{
  "bucketName": "acme-long-term-archive",
  "folderPath": "{{ $node.CalculateExpiredPartition.output.expiryPrefix }}",
  "maxObjectsToDelete": 1000
}
// Log: objectsRemoved, folderPath, executionTimestamp