---
title: "What a backup host's key needs in your own bucket, per provider: steps, least-privilege policy, and for AWS a CloudFormation and a Terraform template that create the bucket with Object Lock"
method: GET
path: "/api/v1/storage/bucket-setup"
---

# What a backup host's key needs in your own bucket, per provider: steps, least-privilege policy, and for AWS a CloudFormation and a Terraform template that create the bucket with Object Lock

`GET /api/v1/storage/bucket-setup`

## Request

- Base URL: `https://safegrd.dev`
- URL: `https://safegrd.dev/api/v1/storage/bucket-setup`
- Auth: none required

## Query parameters

- `provider` 'aws' | 'wasabi' | 'minio' | 'b2' | 'r2' | 'other', required
- `bucket` string, required
- `expiry` '0' | '1'

## Response `200`

The setup

- object

## Other responses

- `400`: An unknown provider or a bucket name S3 does not allow

---

[API](https://skmtc.dev/safegrd/apis/safegrd-api.md) · [All operations](https://skmtc.dev/safegrd/apis/safegrd-api/llms.txt) · [OpenAPI document](https://skmtc.dev/safegrd/apis/safegrd-api/revisions/4dbca90c8a74?raw)
