The Simplest Way to Make Rubrik and Step Functions Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams use rubrik and step functions to run backup jobs through state machines. Step Functions triggers Rubrik tasks and checks job status until the backup finishes. This setup lets engineering teams automate data snapshots before big app updates. It also helps teams test disaster recovery plans on a set schedule. Instead of running manual checks, the state machine handles retries and alerts. How rubrik and step functions share permissions and data Step Functions needs a clear path to call th

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

Teams use rubrik and step functions to run backup jobs through state machines. Step Functions triggers Rubrik tasks and checks job status until the backup finishes.

This setup lets engineering teams automate data snapshots before big app updates. It also helps teams test disaster recovery plans on a set schedule. Instead of running manual checks, the state machine handles retries and alerts.

How rubrik and step functions share permissions and data

Step Functions needs a clear path to call the Rubrik API endpoints. Most teams use serverless compute tasks inside the workflow to send requests. The state machine starts a task, which logs in to the Rubrik cluster. That task uses a service account key or a token to prove identity.

Once logged in, the workflow sends a request to start a backup snapshot. Rubrik receives the call, starts the job, and returns a job ID. Step Functions saves that job ID in its state payload for later steps. A wait state pauses the workflow while Rubrik copies the data.

After the pause, Step Functions asks Rubrik for the current job status. If the job is still running, the workflow loops back and waits again. When Rubrik reports success, the state machine moves to the next task. This data flow keeps the orchestration logic separate from the heavy storage work.

Common failure modes and how to scope roles

Many teams make the mistake of using one shared admin account for everything. If a state machine has full admin rights, a bug can delete snapshots. Broad tokens also make it hard to see which workflow triggered a change. Unlogged API calls leave security teams blind during an audit.

To fix this, give each state machine its own limited Rubrik role. A workflow that takes snapshots before deployments only needs rights to create backups. It should never have permission to delete old backups or change cluster rules. Store the API tokens in a secret manager and rotate them often.

Cloud Functions IAM + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Network paths between the cloud state machine and the backup cluster also matter. Keep backup traffic on private network links instead of the public internet. Set strict timeout rules in your state machine so hung jobs fail fast. Log every API request ID alongside the state machine run ID for audits.

Building reliable recovery tests with state machines

Taking backups is only half the battle for platform teams. You also need to know if those backups actually work during an outage. Step Functions can run weekly recovery drills without waking up an engineer.

The workflow requests a test mount of a recent snapshot into a sandbox. Next, a task runs health checks against the restored database or host. When the check passes, the workflow tells Rubrik to tear down the sandbox. If any step fails, the state machine pages the on-call team right away.

During these tests, be careful with sensitive production data in the sandbox. Masking rewrites matched fields in results, like emails, phone numbers, or card numbers. This keeps test logs clean while proving your recovery steps work.

Govern statements and responses across databases and APIs

Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.

First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

How should Step Functions wait for long Rubrik backup jobs?

Use a polling loop with a wait state or a callback task token. Polling checks the job ID every few minutes without paying for idle compute.

What permissions does the state machine need in Rubrik?

Grant a custom role that only allows starting snapshots and reading job status. Avoid using cluster admin accounts for automated workflows.

How do we handle Rubrik API rate limits in Step Functions?

Add retry rules with exponential backoff to your task states. This pauses the workflow and tries again when the cluster is busy.

The query runs. The emails stay hidden.