---
title: "Retain more logs for longer with Flex Logs BYOBucket"
description: "Store Flex Logs in your cloud bucket with unlimited retention to control storage costs and keep logs searchable in Datadog for investigations and audits."
author: "Corey Brincks, Bobby Vellanki"
date: 2026-11-19
tags: ["flex logs", "log management", "storage", "audit logs"]
blog_type_id: the-monitor
locale: en
---

Keeping logs available for investigations, troubleshooting, and audits can be expensive. To control costs, teams often discard logs or shorten retention periods, but this approach can create critical gaps in visibility. Missing data can leave engineers unable to detect incidents or understand what happened. For audit-relevant logs, this can expose organizations to compliance risk.

[Datadog Flex Logs](https://docs.datadoghq.com/logs/log_configuration/flex_logs.md) helps you retain more logs cost-effectively while keeping them readily queryable. With [Flex Logs Bring Your Own Bucket (BYOBucket), available in Preview](https://www.datadoghq.com/product-preview/flex-logs-bring-your-own-bucket/), you can more easily retain all your logs at scale without compromising visibility.

In this post, we'll show how you can:

- [Use Flex Logs as your default log index](#use-flex-logs-as-your-default-log-index)
- [Improve scalability by retaining logs in your own cloud bucket](#improve-scalability-by-retaining-logs-in-your-own-cloud-bucket)

## Use Flex Logs as your default log index

Customers have increasingly adopted Flex Logs as the default destination for indexed logs because they want to retain more logs, or retain logs for longer, while keeping storage costs in check. These cost advantages are made possible with a pricing model that separates billing into two parts: low-cost object storage and a fixed monthly fee for compute capacity. 

Flex Logs supports comprehensive observability through familiar Datadog capabilities and tools, including:

- **Agentic querying**: Use [Bits Chat](https://docs.datadoghq.com/bits_ai/bits_chat.md) and MCP-compatible tools to accelerate investigations.
- **Log Explorer**: Search and analyze indexed logs to investigate errors, troubleshoot incidents, and review historical activity.
- **Dashboards**: Visualize log data alongside other observability data to track application behavior and investigate changes.
- **Monitoring**:** **Generate metrics from logs to power alerts. Standard Indexing is not required.

## Improve scalability by retaining logs in your own cloud bucket

With BYOBucket, you can send all your indexed logs to Flex Logs and store them in your own cloud bucket while maintaining the same Flex Logs experience. Because the bucket is yours, you control retention and storage costs directly. You pay your cloud provider (instead of Datadog) for log storage, using your own negotiated rates. As an additional benefit, Datadog writes logs in a compressed format, so the volume landing in your bucket is a fraction of the original event volume. This means that BYOBucket gives you access to readily queryable logs in Datadog at a low storage cost per gigabyte.

![New Destination form for configuring an Amazon S3 bucket, role, and path to store Flex Logs.](https://web-assets.dd-static.net/42588/1795031461-1-flex-logs-byobucket-s3-destination-configuration.png)

### Keep historical logs available for investigations

Longer retention can help engineers answer questions that emerge well after an event occurs. An application issue might not become apparent until months after a deployment, or an audit might require log records from an earlier period. 

However, keeping logs readily queryable for months to years is usually cost-prohibitive. With BYOBucket, you decide how long to retain logs without paying Datadog any storage fees for that retention. This lets you keep more evidence for investigations and audits searchable in Datadog.

## Retain more logs while controlling storage costs

Flex Logs BYOBucket helps organizations scale and extend log retention while controlling storage costs through their own cloud provider. Engineers can keep historical logs available for investigations and audits while continuing to use Datadog's search and analysis capabilities.

To learn more about Flex Logs, see the [Flex Logs documentation](https://docs.datadoghq.com/logs/log_configuration/flex_logs.md). To try Flex Logs with your own storage bucket, [request access to the Flex Logs BYOBucket Preview](https://www.datadoghq.com/product-preview/flex-logs-bring-your-own-bucket/).

If you don't have a Datadog account, <!-- Sign-up trigger (sign up for a free 14-day trial ) omitted --> to get started with Datadog Log Management.