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.3.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.3.0
File Size Uploaded Provenance Actions
netherframe_backends_aws-0.3.0.tar.gz 17.7 kB Without provenance Details for netherframe_backends_aws-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 38.7 kB

Release files / netherframe_backends_aws-0.3.0.tar.gz

Download URL netherframe_backends_aws-0.3.0.tar.gz
Size 17.7 kB
Tags Source
SHA-256 checksum
How to use checksums
39b4e8df207018cdada31bf624948a4fc64fce6a41a45bcca946394c8ea442d3
BLAKE2b-256 checksum
How to use checksums
8a64aae3d07a8731dedcc563780a3546668f8dde4f3e257cda70e75e248ed8c4
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.3.0-py3-none-any.whl

Download URL netherframe_backends_aws-0.3.0-py3-none-any.whl
Size 21.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0fb7890f845896c3b57dcf5723378d19b3daff5905da22623fde93dac8eb3863
BLAKE2b-256 checksum
How to use checksums
bd82002fe53530ba8044e93a78e60af228d4fffa957ebe271dc6efb4f10241f6
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.3.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