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.2.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.2.0
File Size Uploaded Provenance Actions
netherframe_backends_aws-0.2.0.tar.gz 16.1 kB Without provenance Details for netherframe_backends_aws-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 34.9 kB

Release files / netherframe_backends_aws-0.2.0.tar.gz

Download URL netherframe_backends_aws-0.2.0.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
fa782b6b1d88d1a5c12aca691681c8b1f16435b165b15c3e8ed33548fc8f8cd9
BLAKE2b-256 checksum
How to use checksums
772e45757bfd6617784d6f40f00af35ae62e79b3dd442178a6a934134dbaf614
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","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.2.0-py3-none-any.whl

Download URL netherframe_backends_aws-0.2.0-py3-none-any.whl
Size 18.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e69b9fbe337f0a50f810858c24e173c89beb380a2968f72bbc9414f5ca887ba7
BLAKE2b-256 checksum
How to use checksums
290c6d6c0473e54ed0d59f84eeee63af42320ce6793f47f4941271e60476b022
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":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for netherframe.backends.aws 0.2.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