Skip to main content

nf.backends.aws

AWS backend implementations for Netherframe Infrastructure as Code framework.

Installation

pip install netherframe.backends.aws

Usage

from nf.backends.aws import S3Backend

# For Terraform synthesis mode
backend = S3Backend(nf_scope=stack, bucket="my-terraform-state", key="infrastructure/terraform.tfstate", region="us-east-1", dynamodb_table="terraform-locks")

# Backend config values must be literal strings. You may pass Resource objects
# if their input attributes are literal (for example, bucket=state_bucket).
# Output references like state_bucket.output.id are not supported for Terraform
# backend configuration.

# For native execution mode
state_backend = S3Backend.for_native(bucket="my-terraform-state", key="infrastructure/terraform.tfstate", region="us-east-1", dynamodb_table="terraform-locks")

Features

  • S3-based state storage with optional DynamoDB locking
  • Compatible with Terraform's S3 backend
  • Support for encryption (SSE-S3 and SSE-KMS)
  • State locking to prevent concurrent modifications
  • Automatic stale lock detection and cleanup, and force-unlock by lock ID (nf state force-unlock)
  • Conditional writes: a write replaces only the state version its run read (conditional put on the object's ETag)
  • Pre-apply checkpoints kept beside the state (<key>.checkpoints/)

Bootstrap security

S3BackendBootstrapper.bootstrap() treats its bucket as dedicated state storage: it explicitly enables all four S3 public-access blocks and BucketOwnerEnforced ownership, and adds a scoped deny for non-TLS non-service requests. The service exception avoids relying on redacted service-to-service network context. Encryption/versioning remain enabled as configured; state history is not expired.

Existing policy statements/document metadata are preserved. A conflicting Netherframe transport-policy Sid, malformed policy, failed read or legacy ACL ownership stops before security-control writes. Migrate legacy ownership explicitly rather than disabling ACLs on a shared bucket without review. The bootstrap identity needs read/write permissions for these bucket controls. This API manages backend controls; don't also declare competing bucket-policy writers in an application stack. No transport policy is proof of a successful recovery or of effective account-level permissions. validate() still checks resource existence only, not full security compliance. No new runtime modules or architecture topology are introduced.

Metadata

Release files for netherframe.backends.aws 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for netherframe.backends.aws 0.5.0
File Size Uploaded Provenance Actions
netherframe_backends_aws-0.5.0.tar.gz 17.7 kB Without provenance Details for netherframe_backends_aws-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for netherframe.backends.aws 0.5.0
File Interpreter ABI Platform Actions
netherframe_backends_aws-0.5.0-py3-none-any.whl Python 3 none any Details for netherframe_backends_aws-0.5.0-py3-none-any.whl

Total release size: 38.7 kB

Release files / netherframe_backends_aws-0.5.0.tar.gz

Download URL netherframe_backends_aws-0.5.0.tar.gz
Size 17.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8afe672db91fb3cd12dc83a923c96f7b7439b9837924d15887abb76649603b69
BLAKE2b-256 checksum
How to use checksums
5e236578420f0c39cc63f0d23440a0c62ce9cb5e5148fd36f0df9c42daf04af8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / netherframe_backends_aws-0.5.0-py3-none-any.whl

Download URL netherframe_backends_aws-0.5.0-py3-none-any.whl
Size 21.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1539c7814f3e84c12745099cf6955fb2547d35c01c415e10a77411918a7e8fa8
BLAKE2b-256 checksum
How to use checksums
3ab06e3b36185bd8ec7b5d38e63871a853ff363b9fe18c0852e14e444d842cde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for netherframe.backends.aws 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page