Temporal Cloud Workflow History Export to S3 or GCS

Temporal Cloud can export closed workflow histories to S3 or Google Cloud Storage for audit and analytics. This page covers the setup, the delivery model and what to confirm before you rely on it.

On this page

When Temporal Cloud workflow history export fits your audit and analytics needs

If your team needs closed workflow histories outside Temporal Cloud for audit, incident investigation or analytics, the history export feature is the first thing to evaluate. It writes closed workflow histories from a Temporal Cloud namespace to an Amazon S3 bucket or a Google Cloud Storage bucket that you own, on a recurring schedule, so your security, compliance and data teams can query that history with the tools they already run. The export is a Temporal Cloud feature configured in the Cloud console for a namespace, so it is not something your own team operates on a database or runs as a job. No research figures were supplied for this feature, so before you design around it, confirm the current export schedule, the delivery guarantees, which workflow executions are eligible, and how the bucket must be configured against Temporal's Cloud documentation. Those details are the ones most likely to change and most likely to matter to an auditor.

This is a different problem from self-hosted Temporal. When you run Temporal yourself, your team owns the persistence layer, so the workflow history is already in a database you control, and you decide how it is backed up, retained, queried and access controlled. With Temporal Cloud, Temporal Technologies operates that persistence layer, and you cannot read it directly. The export is therefore the supported way to get a copy of closed history out of the service. Ask whether your use case needs the exported files, the live visibility API, or both, because the export captures closed executions and does not replace querying running workflows. Confirm also who can read the bucket and how the data is encrypted at rest, since those controls will sit with your own cloud account once the export lands there.

Plan for at-least-once delivery before you build a consumer. If the export can deliver the same history more than once, your loader must deduplicate by namespace, workflow ID and run ID rather than assume each file is unique. Plan for lag as well: an hourly schedule means the newest closed workflows will not appear in the bucket immediately, so an investigation that depends on a workflow that closed minutes ago needs the live API. Before committing, ask your Temporal account team for written answers on the schedule, the delivery semantics, the file format and the IAM permissions required on the bucket, and test the full path with a non-production namespace. Use the same evidence for your audit file so a reviewer can trace each exported record back to its source.

Choosing the destination, scope and access model for exports

This table compares how the S3 and Google Cloud Storage options change ownership, access reviews, retention, encryption and cost. Read each row against where your analytics and audit tools already run. The main takeaway is that the exported bucket is a second copy of workflow history, so its access model needs the same review as the source namespace.

DecisionAmazon S3Google Cloud Storage
Best fitYour data lake or analytics stack already runs on AWSYour data lake or analytics stack already runs on Google Cloud
Bucket ownershipBucket sits in an AWS account your security team controls, separate from workloadsBucket sits in a Google Cloud project your security team controls, separate from workloads
Access reviewsReview bucket policies and every AWS identity that can read or list exportsReview bucket permissions and every Google identity bound to the bucket or project
Who reads the dataAnalysts, auditors and tools authenticate with AWS identities you already manageAnalysts, auditors and tools authenticate with Google identities you already manage
RetentionSet bucket lifecycle rules to match the audit retention period your policy statesSet bucket lifecycle rules to match the audit retention period your policy states
EncryptionConfirm the encryption and key ownership model with your security team before enabling exportConfirm the encryption and key ownership model with your security team before enabling export
Cost effectStorage and request charges appear in your AWS bill next to existing dataStorage and operation charges appear in your Google Cloud bill next to existing data
Cross-cloud readsReading from a Google Cloud workload adds network and credential setup to reviewReading from an AWS workload adds network and credential setup to review

How exported histories move from Temporal Cloud to your bucket

The flow starts in a Temporal Cloud namespace, which produces closed workflow histories. A scheduled export run by the managed service writes those histories to an S3 or Google Cloud Storage bucket in your cloud account. The trust boundary sits at that bucket: once objects land there, audit and analytics readers reach them only through the IAM policies you set. Before you rely on the data, confirm the export target and its permissions, and confirm delivery behavior with Temporal, since delivery is at-least-once.

Illustrative flow showing the trust boundary between Temporal's service and your bucket.

Setting up the export in the right order

This sequence gets the bucket, the write identity and the export configuration in place before any history leaves Temporal Cloud. Each step ends with a check, so a misconfiguration shows up in a test object rather than during an audit request.

  1. Decide which namespaces are in scope

    List every Temporal Cloud namespace whose closed workflow histories must be retained or analyzed, and record the owner, the data classification and the retention period your audit team requires. Include production namespaces and any namespace that may carry regulated or sensitive payloads, and confirm with each namespace owner what the workflows handle. Done when the list is approved and each namespace maps to a destination prefix you will use later.

  2. Create the destination bucket with versioning

    Create the S3 or Google Cloud Storage bucket in the region and account your data policy names, with object versioning enabled and public access blocked. Plan access logging to a separate, locked-down log bucket before any data arrives, because access history is hard to reconstruct after the fact. Check that a test object overwritten once keeps both versions and that the public access settings report as blocked.

  3. Create a write identity limited to that bucket

    Create a dedicated identity for the export, such as an AWS IAM role or a Google Cloud service account, and grant only the object write and listing permissions that Temporal's export documentation requires for that one bucket and prefix. Confirm the exact permission set in the current documentation before granting it, and grant nothing beyond it, including administrative rights. Check the policy with the cloud provider's policy simulator or a live test: writes to the export prefix should succeed, and reads or listings in other buckets should be denied.

  4. Configure the export in the Temporal Cloud account

    In the Temporal Cloud account, add an export configuration for each namespace in scope, pointing at its bucket and prefix and using the write identity from the previous step. Record who made each change and when, since the configuration is part of your control plane evidence. Check that each configuration shows as active with the correct destination, and that no namespace from the approved list is missing.

  5. Wait for the first scheduled run

    Do not judge the export from the configuration screen. Use a closed test workflow in a non-production namespace, and wait for the next scheduled run to finish. Confirm the schedule interval in the current Temporal Cloud documentation, since delivery runs on a schedule rather than immediately, and plan for duplicate objects because delivery is at least once. Check that the test workflow's history appears in the bucket after that run.

  6. Verify object layout, file naming and timestamps

    Open the exported objects and confirm that the prefix structure matches the scheme you recorded, that file names identify the namespace and workflow, and that timestamps fall in the expected window for the run. Compare the object contents with the workflow's event history in the Temporal Cloud UI. Confirm that a downstream query or analytics job can locate the object by namespace and time without manual lookup, then record the layout in a runbook entry for consumers.

  7. Confirm write-only access and access logging

    Repeat the access test from the write identity step against the final configuration, and confirm that access logs for the bucket are arriving in the separate log bucket. Check that the write identity cannot read other buckets and cannot change the export bucket's policy or versioning settings. Save the access test results and the log check alongside the change record from the configuration step.

Protecting exported workflow histories in your bucket

Exported workflow histories are a copy of what your workflows did, so the bucket holding them needs the same care as the systems that produced them. The cards below cover classification, access, encryption, payload handling, audit evidence and change control, and they are the checks to settle before the first export runs.

Classify the exported history

A closed workflow history records inputs, results and activity details, so it often contains customer, payment or case data. Treat the export bucket as a store of that data class, not as a technical log bucket. Confirm with your data owners which classification applies, which retention period they approve, and whether the export may leave the region where the source data lives. Write the answers down before you enable the export, because they decide the bucket's access and retention settings.

Temporal security docs

Scope the writer and named readers

Grant write access only to the export identity that Temporal Cloud uses to deliver files, and give read access to a short list of named analytics and audit roles. Avoid broad bucket-level grants such as project-wide readers or public listing. Ask Temporal how the export is authenticated to your bucket for your configuration, then review the bucket policy and IAM bindings against that answer. Check that no other workload can overwrite or delete objects under the export prefix.

Confirm encryption and key ownership

Confirm that the bucket uses server-side encryption at rest and find out who controls the keys. On AWS this means deciding between S3-managed keys and a customer-managed KMS key, and on Google Cloud between Google-managed keys and customer-managed keys in Cloud KMS. A customer-managed key lets you revoke access to the data, but it also means the export identity needs permission to use that key. Confirm the choice with your cloud security team before go-live.

Decide what payloads stay readable

Whether exported payloads are readable depends on how your SDK encodes them. If workflows use a custom payload codec that encrypts data before it reaches Temporal, the exported files hold ciphertext, and only systems with the key can read the values. If no codec is in place, inputs and results appear in plain form in the bucket. Confirm the codec configuration in each worker, and plan key management and rotation for it before you rely on the export for analytics.

Payload encryption docs

Retain access logs and object locks

Audit evidence depends on knowing who read or changed each object. Enable access logging on the bucket, send logs to a separate account or project where the export team cannot edit them, and set retention or object lock where your audit policy requires immutable copies. Confirm the retention period with your compliance team, since the export does not set one for you. Test that a deleted or overwritten object can be recovered or traced as your policy expects.

Version control the identity and policies

Keep the bucket policy, IAM roles, encryption settings and lifecycle rules in version control, and route changes through review. Drift from console edits is hard to detect in a bucket that receives files all day, so compare the live configuration with the reviewed definition on a schedule. Record who approved each change and why, so the evidence trail matches the access model you described to auditors.

Designing downstream consumers for at-least-once delivery

At-least-once delivery means the same closed workflow history can arrive in your bucket more than once, so the loader must be built on the assumption that duplicates will happen. Do not design the audit or analytics pipeline to treat each exported file as a unique, single-copy record. Instead, key every row on the workflow identifiers (workflow ID and run ID) and make the load step idempotent, so that loading the same history twice leaves the target table in the same state as loading it once. Upserts keyed on the run identity, or a merge that discards exact duplicates, are typical patterns. Confirm in Temporal's Cloud documentation exactly which identifiers and fields each exported record carries before you write the loader, because the deduplication key depends on them.

Exports run on a scheduled cadence rather than as a live stream, so a closed workflow may appear in storage after the time window your reports expect. Plan for late-arriving records by reprocessing a trailing window instead of only appending new files, and by making reports tolerant of rows that show up after a figure was first published. Keep the raw exported files immutable so that a reload can be reproduced from source. Record the export time window and the file manifest for each load, so auditors can see which history was loaded when.

Before you build, confirm three points with Temporal: the delivery guarantee the export documents, the exact object key layout and file format in your bucket, and whether any export or retention settings change what is written. Write those answers into the loader's design notes and test the deduplication logic against deliberately repeated files in a non-production bucket.

Limits to confirm before you commit to export

The export design depends on a handful of values that our researched facts do not establish. Confirm each one with Temporal and in your own environment before you commit storage, retention and audit obligations to the export. Several of them change the cost and the evidence you can give an auditor.

Export cadence and schedule

Confirm how often the export runs and whether the hourly schedule described for this topic is what Temporal delivers today. Ask for the documented interval, the maximum delay between a workflow closing and its history appearing in the bucket, and what happens when an export run is late. Your recovery and audit timelines should be built on those answers, not on an assumed cadence.

Workflow states included

Confirm which workflow states the export includes, such as completed, failed, canceled, terminated and timed out executions. Ask whether continue-as-new chains and reset runs are exported as separate histories. Gaps here become gaps in your audit trail, so map each state your compliance team cares about to an explicit yes or no.

Behavior for open histories

Confirm whether workflows that are still running are exported at all, and if so, whether they are exported partially and again after closing. Ask how a history that closes after an export run is picked up and whether it can be exported twice. Your downstream deduplication logic depends on the answer, since delivery is documented as at-least-once.

Supported regions and bucket types

Confirm which cloud regions, S3 and Google Cloud Storage bucket configurations and encryption settings the export supports. Check whether object lock, bucket versioning and customer-managed keys are compatible with the export role you grant. Test these against a non-production bucket before your data residency review, not after.

Storage cost split

Separate the costs you pay in your cloud account from the costs Temporal charges. Temporal bills retained storage in its own pricing, but the exported objects, their request charges, lifecycle tiers and retrieval fees land on your bill. Ask Temporal whether exported history changes your retention charges, and model your bucket costs at your expected volume with your cloud provider's calculator.

Temporal pricing

Namespace changes and account migrations

Confirm how exports behave when a namespace is renamed, deleted, moved to another account or migrated to a new region. Ask whether an export continues without a gap, whether it restarts from a point you can name, and who is responsible for any missing hours. Put this question in writing before any planned namespace or account change.

Common questions about exporting Temporal Cloud histories

How much does exporting Temporal Cloud histories to S3 or GCS cost?

The cost comes from three places: Temporal Cloud charges, your bucket charges, and any partner effort. Temporal Cloud pay-as-you-go pricing starts at 50 US dollars per million actions, with active storage at 0.042 dollars per GB-hour and retained storage at 0.00105 dollars per GB-hour, according to the Temporal pricing page. Confirm with Temporal whether the export itself carries a separate charge. Bucket storage and request charges come from AWS or Google Cloud and recur with the volume you keep. Partner effort is mostly one-time setup, plus any ongoing support you choose. Ask for a quote that separates setup from recurring items and states which Temporal Cloud rates it assumes.

How long does setup take, and what makes it longer?

No setup duration is set in the sources for this page, so treat any timeline as a quote item. Setup time depends on how many namespaces you export, the bucket layout and encryption settings your security team requires, the identity model for the writer, and how quickly access requests are approved. Payload encryption also matters. If your workflows use a custom codec, your analytics team needs an agreed key path before data is useful. Ask for a written scope that lists namespaces, buckets, identities, a test export in a sample namespace and the production cutover step.

What does the export need from our cloud and security teams?

Expect cloud IAM work in your AWS or Google Cloud account, a bucket your team owns, and a decision on where closed histories land. Cloud teams usually set bucket policies, lifecycle or retention rules, encryption keys and a dedicated writer identity with only the write access the export needs. Security teams should review what workflow data leaves Temporal Cloud, whether payloads stay encrypted, who can read the bucket and how access is logged. Confirm the exact permissions and export steps with Temporal's current documentation before anyone grants access, because permission sets change between releases.

Can our own engineers set up the export without a partner?

Often yes, if they have cloud IAM experience, admin access to Temporal Cloud and a small scope such as one or two namespaces writing to a bucket they already operate. The work is mostly configuration, identity and verification rather than workflow code, so the main risk is getting ownership and access wrong. A partner adds more value when several namespaces, multiple regions, compliance evidence or downstream deduplication are in scope, or when the internal team lacks the time. Whichever path you choose, test with a sample namespace, check object layout and access logs, and write a runbook. DeployOpen plans fixed-scope work with the scope agreed in writing before work starts.

How do we handle duplicate records in downstream systems?

Plan for duplicates from the start. The export is designed for at-least-once delivery, so the same closed history can arrive more than once, and every consumer must tolerate that. Make loads idempotent by keying each record on namespace, workflow ID and run ID, then either overwrite the existing row or skip keys already loaded. A staging table with a merge step in your analytics platform works well for this. Run reconciliation counts against Temporal Cloud data for a sample period, and confirm the exact key fields and delivery behavior in Temporal's documentation before you build the consumer.

Can exported histories replace a self-hosted archive?

Not on their own. Archival is not available in Temporal Cloud, so the export gives you a copy of closed histories for audit and analytics, and it does not stand in for a managed archive. Compare what you need to retrieve, how long you must keep it, and whether anyone must query or reopen workflows later. If your archive needs a specific format, query path or retention control that a bucket cannot provide, a self-hosted design may fit better. Ask Temporal to confirm which fields the export contains and whether payloads remain readable to your team.

Does the hourly export schedule fit our audit timing?

The export runs on an hourly schedule, so a closed workflow reaches your bucket in a later export cycle rather than the moment it closes. Check whether that delay fits your audit and reporting windows, and confirm the exact lag with Temporal because no lag figure is set in the sources for this page. Monitor for missed or late runs, since an audit that depends on completeness needs an alert when a cycle does not land. Record the schedule and the monitoring method in your audit evidence so reviewers can see how coverage was checked.

How DeployOpen scopes and delivers Temporal Cloud history export

DeployOpen plans the Temporal Cloud Workflow History Export to S3 or GCS work around your audit and analytics requirements, then builds and documents it in your own cloud accounts. Engagements are fixed-scope, with the export target, schedule, access model and handover agreed in writing before work starts.

How we scope

  • Confirm which namespaces, closed workflow types and retention periods the export must cover for audit and analytics.
  • Agree whether the target is an S3 bucket or a Google Cloud Storage bucket, and who owns the account, keys and lifecycle rules.
  • Document the hourly export schedule, the at-least-once delivery behavior and how downstream readers will handle duplicate records.

How we build

  • Configure the export target with least-privilege write access and confirm the Temporal Cloud side can reach it as specified.
  • Build the reader or loader that deduplicates records, so analytics and audit queries are not skewed by at-least-once delivery.
  • Test a full export cycle, check that object layout and record counts match the agreed design, and record the results.

How we hand over

  • Deliver a written runbook covering configuration, bucket policies, key rotation, monitoring and the steps to recover from a failed export.
  • Provide the evidence your audit team needs: configuration records, access grants, test results and a description of the data flow.
  • Walk your platform and security teams through the design so they can operate and review the export without DeployOpen.

How we support

  • Support is available as a retainer for monitoring the export, responding to changes in bucket policy or Temporal Cloud settings, and reviewing access.
  • Retainers can also cover periodic retesting of the export pipeline after changes to namespaces, cloud accounts or downstream tools.
  • Ongoing scope and fees are set in a separate written agreement, and DeployOpen prepares a quote from the agreed scope.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.