Portal Community
  Irreversible Operation: Deleting a bucket is permanent and cannot be undone. All versioned objects and delete markers are also removed. Confirm the bucket name via expression before execution and consider adding a manual approval node for production environments.

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 where the bucket resides.

Operation Fields

FieldRequiredDescription
bucketNameRequiredName of the bucket to delete. Must match exactly — use an expression from a prior node output to avoid typos.
verifyEmptyOptionalWhen true (default), the operation fails with BucketNotEmpty if the bucket contains objects. Set to false only if a preceding workflow step has already emptied the bucket.

Sample Configuration

{
  "connection": {
    "accessKeyId": "{{ $credentials.s3_ops.accessKeyId }}",
    "secretKey": "{{ $credentials.s3_ops.secretKey }}",
    "region": "us-east-1"
  },
  "operation": {
    "resource": "bucket",
    "action": "delete",
    "bucketName": "{{ $node.OffboardTenant.output.storageBucketName }}",
    "verifyEmpty": true
  }
}

Validation Errors

Error CodeCause & Resolution
BucketNotEmptyThe bucket still contains objects. Use folder/delete or object/delete nodes to empty the bucket first, then retry deletion.
NoSuchBucketThe specified bucket does not exist. Check the bucket name expression and region. Consider handling gracefully in idempotent workflows.
AccessDeniedThe IAM identity lacks s3:DeleteBucket permission. Update the IAM policy and ensure the identity is the bucket owner.

Output

Success Port

FieldTypeDescription
statusstringsuccess on successful deletion.
errorCodestringEmpty string on success.
bucketNamestringThe name of the deleted bucket (for audit logging downstream).

Error Port

On failure, activates with errorCode (BucketNotEmpty, NoSuchBucket, or AccessDenied), errorMessage, and httpStatusCode. Route NoSuchBucket to a continue path in idempotent decommissioning workflows.

Sample Output

{
  "status": "success",
  "errorCode": "",
  "bucketName": "acme-tenant-northstar-docs"
}

Expression Reference

ExpressionResult
{{ $node.DeleteBucket.output.status }}Confirm deletion succeeded before updating tenant records.
{{ $node.DeleteBucket.output.bucketName }}Log the deleted bucket name to audit trail or notification message.
{{ $node.DeleteBucket.output.errorCode }}Check for NoSuchBucket to handle idempotent re-runs gracefully.

Node Policies & GuardRails

Policy AreaRecommendation
Credential StorageStore credentials in BizFirst Credentials Manager. Never hardcode accessKeyId or secretKey.
IAM PermissionsGrant only s3:DeleteBucket scoped to the specific bucket ARN. Never grant wildcard delete permissions.
Pre-deletion VerificationAlways precede this node with a workflow step that confirms the correct bucket name and checks business rules (e.g. offboarding confirmed, data exported).
Empty Before DeleteKeep verifyEmpty: true. Use folder/delete to empty the bucket in a prior step if automated emptying is required.
Approval GateFor production bucket deletions, insert a manual approval node before this node to require human confirmation.
Idempotent Error HandlingRoute NoSuchBucket errors to a continue path — re-running a decommission workflow should not fail if the bucket was already deleted.
Audit LoggingLog bucketName and execution timestamp to the workflow audit trail immediately after successful deletion.
Versioning ConsiderationIf the bucket has versioning enabled, ensure all object versions and delete markers are purged before attempting bucket deletion.

Examples

Example 1: Tenant Offboarding — Decommission Storage

After confirming data export is complete, delete the tenant's S3 bucket as the final offboarding step.

// Node: ConfirmDataExport (S3 — bucket/search) — verifies bucket is empty
// Node: DeleteTenantBucket (S3 — bucket/delete)
{
  "bucketName": "{{ $node.GetTenantRecord.output.storageBucket }}",
  "verifyEmpty": true
}
// Next: UpdateTenantStatus → SetStatus("offboarded")

Example 2: CI Pipeline Cleanup

After a successful integration test run, a cleanup step removes the ephemeral test bucket created at pipeline start.

// Node: CleanupTestBucket (S3 — bucket/delete)
{
  "bucketName": "ci-test-{{ $node.PipelineStart.output.runId }}",
  "verifyEmpty": false  // emptied by prior EmptyTestBucket node
}
// Error route: NoSuchBucket → Continue (idempotent)

Example 3: Temporary Import Bucket Teardown

After an ETL migration workflow completes processing, the temporary staging bucket is removed.

// Node: RemoveStagingBucket (S3 — bucket/delete)
{
  "bucketName": "{{ $env.ETL_STAGING_BUCKET }}",
  "verifyEmpty": true
}
// On success: NotifyOpsTeam("Staging bucket removed: " + bucketName)