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.4.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.4.0
File Size Uploaded Provenance Actions
netherframe_backends_aws-0.4.0.tar.gz 17.7 kB Without provenance Details for netherframe_backends_aws-0.4.0.tar.gz

Built distribution (wheel)

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

Total release size: 38.7 kB

Release files / netherframe_backends_aws-0.4.0.tar.gz

Download URL netherframe_backends_aws-0.4.0.tar.gz
Size 17.7 kB
Tags Source
SHA-256 checksum
How to use checksums
45a8647485de04dcd4c4827616bb8ff31db26c0193a5d52dcee5c84a5dceb43a
BLAKE2b-256 checksum
How to use checksums
8ce6d899c88cf0f8d7ff8f73463d75badcc3b9a4ece04bd49d30ecfb71957032
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","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.4.0-py3-none-any.whl

Download URL netherframe_backends_aws-0.4.0-py3-none-any.whl
Size 21.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83b6aed12e7198004871723e8eee0b0f205f9df739d64eb38af49680a7e40dd0
BLAKE2b-256 checksum
How to use checksums
68fc7420ea1738397790fe2f0edb384f3ac2bc92d2faab20363d0069833c064d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","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.4.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