---
title: RELKIT_BUCKET_POLICY_INVALID
description: "Bucket object breaks the bucket policy."
pagination: false
search:
  keywords: [RELKIT_BUCKET_POLICY_INVALID]
sidebar:
  icon: triangle-alert
---

{/* Generated by apps/docs/scripts/generate.ts. Do not edit. */}

**Bucket object breaks the bucket policy.**

## What happened

An object or bucket setting does not match the bucket policy. For example, the object is larger than `maxObjectBytes` or its content type is not allowed.

## What to do

Check the message for the rule that failed, then change the object or update `maxObjectBytes`, `allowedContentTypes` or `metadata` in the bucket definition.

Reported by `@relkit/testing`, `relkit/buckets`, `relkit/diagnostics`.

See [all error codes](/docs/errors).
