Skip to content

State Backends

Orch uses one state backend per manifest.

If state is omitted, Orch uses the local backend with .orch as the root.

state:
backend: local
config:
path: .orch

Config fields:

FieldRequiredDefaultDescription
pathNo.orchLocal directory where environment state bundles are stored.

Layout:

<root>/<env-id>/state.json
<root>/<env-id>/artifacts/<component-name>/<artifact-path>

After a successful down, Orch removes <root>/<env-id>.

state:
backend: s3
config:
bucket: my-orch-state
prefix: previews
region: eu-central-1
server_side_encryption: aws:kms
kms_key_id: alias/orch

Config fields:

FieldRequiredDefaultDescription
bucketYesNoneS3 bucket that stores state objects.
prefixNoEmptyKey prefix before <env-id>/state.json. Leading and trailing slashes are normalized.
regionNoAWS SDK defaultRegion passed to the AWS SDK config loader.
server_side_encryptionNoBucket defaultEither AES256 or aws:kms.
kms_key_idNoEmptyKMS key ID or alias. Requires server_side_encryption: aws:kms.

Layout:

s3://<bucket>/<prefix>/<env-id>/state.json
s3://<bucket>/<prefix>/<env-id>/artifacts/<component-name>/<artifact-path>

The S3 backend uses ambient AWS authentication through the AWS SDK default config chain.

After a successful down, Orch deletes objects under <prefix>/<env-id>/.

The current backend interface does not implement locking or optimistic revisions. Avoid concurrent writes to the same env-id.