The Simplest Way to Make Cohesity and Lambda Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Running Cohesity and Lambda together lets teams automate backup tasks without managing extra servers. A serverless function can trigger snapshots, check job status, or start restores on demand. This setup helps teams respond to alerts fast and keep data safe. It removes manual steps from daily backup operations and disaster recovery tests. When an event fires in your cloud account, a small function runs right away. It talks to the backup cluster API to protect new workloads or check recovery po

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.

Running Cohesity and Lambda together lets teams automate backup tasks without managing extra servers. A serverless function can trigger snapshots, check job status, or start restores on demand.

This setup helps teams respond to alerts fast and keep data safe. It removes manual steps from daily backup operations and disaster recovery tests. When an event fires in your cloud account, a small function runs right away. It talks to the backup cluster API to protect new workloads or check recovery points.

How Cohesity and Lambda handle keys, roles, and data flow

To make Cohesity and Lambda work together, both sides need clear trust rules. The serverless function runs inside your cloud account using an execution role. That role controls which cloud resources the function can read or change. To talk to the backup cluster, the function needs an API key or session token.

Data flow usually goes in one of two ways during daily runs. First, a cloud event or schedule wakes up the function. The function fetches a secret key from a cloud secret store. Then it sends an HTTPS request to the backup cluster API endpoint. The cluster runs the backup job and returns a status message to the function.

In the second pattern, the backup platform starts the flow after an alert. When a backup finishes or fails, the cluster sends a webhook over the network. A cloud endpoint receives the message and starts the serverless function. The function reads the payload and opens a ticket or runs a recovery task.

Common failure modes and how to scope roles

Many teams hit trouble when they share one admin account across all functions. If five functions use the same static key, audit logs lose value fast. You cannot tell which function changed a backup policy or deleted a snapshot. Worse, a leaked key gives an attacker full control over all backup data.

Broad permissions create another major risk in automated backup workflows. A function that only checks job status should never hold restore or delete rights. Give each function its own role on the backup cluster with narrow permissions. Create separate roles for reading status, starting backups, and running test restores.

Lambda Execution Roles + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Network paths and timeouts also break these workflows in production. Backup clusters often sit in private subnets or on-premises data centers. Place your serverless functions in a virtual private cloud with strict security groups. Allow outbound traffic only to the specific backup API port and IP address.

Remember that serverless functions have short run limits while backups take hours. Never make a function wait for a large backup or restore to finish. Instead, have the function start the job, log the job ID, and exit. Use a second scheduled function to poll the status until the task completes.

Keeping audit logs and secrets safe across runs

Unlogged API calls make incident reviews painful for security and ops teams. Every time a function calls the backup cluster, record the request details. Log the function name, the caller identity, the target policy, and the timestamp. Send these logs to a central store where no user can edit them.

Never store backup API keys in plain text inside function settings or code. Store keys in a dedicated secret manager and rotate them on a strict schedule. If your backup jobs touch sensitive tables, protect personal data during test restores. Data masking rewrites matched fields like emails, phone numbers, card numbers, or national IDs in results.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

How should a Lambda function store Cohesity API credentials?

Store API keys or user passwords in a managed cloud secret store. Have the function fetch the secret at runtime using its scoped execution role. Rotate those keys often and never hardcode them in function variables.

Why do backup automation functions time out in production?

Functions time out when they wait for long data transfers to finish, or when firewall rules block the cluster IP. Design functions to trigger the backup job and stop right away. Check job progress later using webhooks or a fast polling schedule.

How can teams limit blast radius for backup scripts?

Create a dedicated backup role for each function with only the needed rights. A status check script should only have read permissions on job states. Also restrict network egress so the function can only reach the backup API endpoint.

The query runs. The emails stay hidden.