Skip to main content
Last updated: 3 Dec 2025

govuk-chat-opensearch: Repository management

⚠ ️The frozen OpenSearch instance already has the necessary repositories registered, so you shouldn't need to manage them.

In order to capture a snapshot of an OpenSearch instance, you need to register a repository and assign that to the instance. In our case a repository is a specific S3 bucket.

Configured repositories

The frozen OpenSearch instance has two repositories registered to it:

govuk-chat-frozen-snapshots

Backed by the govuk-production-chat-opensearch-snapshots S3 bucket, this is where we store the snapshots we take from the frozen instance.

govuk-production

This is a repository that contains just one snapshot. The snapshot is updated every day with a copy of the GOV.UK production index.

It's read-only, so all you can do is restore the snapshot to the frozen instance.

Setup

You'll need to set your AWS credentials before running any of these steps:

eval $(gds aws govuk-test-fulladmin -e --art 8h)

Check if a repository is already registered

uv run repository.py list

If there's a repository registered, you can use that to create/restore snapshots.

Register a repository

To register a repository, run the following script:

uv run repository.py create <repository_name> <s3_bucket_name>

To make the repository read-only, run it with the --read-only flag. This allows you to restore a snapshot from the repository, but not to create or delete snapshots.

uv run repository.py create <s3_bucket_name> <repository_name> --read-only

Delete a repository

To delete a repository, run the following script:

uv run repository.py delete <repository_name>