Metadata-Version: 2.4
Name: npmctl-route53
Version: 0.3.7
Summary: AWS Route 53 DNS provider extension for npmctl.
Keywords: aws,route53,dns,nginx-proxy-manager,npmctl
Author: Jacob Stewart
Author-email: Jacob Stewart <jacob@swarmauri.com>
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Internet :: Name Service (DNS)
Classifier: Topic :: System :: Systems Administration
Requires-Dist: boto3>=1.34.0
Requires-Python: >=3.10, <3.15
Project-URL: Homepage, https://github.com/groupsum/npmctl
Project-URL: Repository, https://github.com/groupsum/npmctl
Project-URL: Documentation, https://github.com/groupsum/npmctl/tree/master/packages/npmctl-route53
Project-URL: Issues, https://github.com/groupsum/npmctl/issues
Description-Content-Type: text/markdown

<h1 align="center">npmctl-route53</h1>

<p align="center"><strong>AWS Route 53 DNS provider plugin for npmctl</strong></p>

<p align="center">
  Extend <code>npmctl</code> with Route 53-backed DNS record management for declarative workflows, provider discovery, and DNS-aware automation.
</p>

<p align="center">
  <a href="https://pypi.org/project/npmctl-route53/"><img src="https://img.shields.io/pypi/v/npmctl-route53.svg" alt="PyPI version"></a>
  <a href="https://pypi.org/project/npmctl-route53/"><img src="https://img.shields.io/pypi/pyversions/npmctl-route53.svg" alt="Python versions"></a>
  <a href="https://github.com/groupsum/npmctl/actions/workflows/ci.yml"><img src="https://github.com/groupsum/npmctl/actions/workflows/ci.yml/badge.svg?branch=master" alt="CI"></a>
  <a href="https://github.com/groupsum/npmctl/blob/master/LICENSE"><img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="Apache 2.0 License"></a>
</p>

<p align="center">
  <a href="https://hits.sh/github.com/groupsum/npmctl/blob/master/packages/npmctl-route53/README.md/"><img src="https://hits.sh/github.com/groupsum/npmctl/blob/master/packages/npmctl-route53/README.md.svg?label=npmctl-route53%20package%20hits" alt="npmctl-route53 package hits"></a>
  <a href="https://pepy.tech/projects/npmctl-route53"><img src="https://static.pepy.tech/badge/npmctl-route53" alt="npmctl-route53 downloads"></a>
</p>

<p align="center">
  <img src="https://raw.githubusercontent.com/groupsum/npmctl/master/docs/images/marketing/npmctl-architecture-infographic.png" alt="npmctl architecture infographic">
</p>

`npmctl-route53` is the AWS Route 53 DNS provider package for `npmctl`. Install it when you want desired-state DNS records or DNS diagnostics to resolve through Route 53 instead of using only the base `npmctl` package.

## Supported Python Versions

`npmctl-route53` supports Python `3.10`, `3.11`, `3.12`, `3.13`, and `3.14`.

## Why npmctl-route53

- Adds Route 53 DNS provider discovery to `npmctl`
- Lets DNS workflows live beside proxy and certificate desired state
- Keeps AWS DNS dependencies out of the core CLI package
- Supports operator diagnostics through `npmctl dns doctor`
- Provides client helpers for Route 53 A and CNAME change-batch workflows

## FAQ

### What is npmctl-route53?

**Answer:** `npmctl-route53` is a plugin package that teaches `npmctl` how to talk to AWS Route 53 through `boto3` for DNS record operations and DNS provider diagnostics.

### When do I need npmctl-route53?

**Answer:** You need `npmctl-route53` when your `npmctl` workflow includes Route 53 hosted-zone DNS records or when you want `npmctl` to validate Route 53 DNS connectivity and credentials.

### Does npmctl-route53 work without npmctl?

**Answer:** No. `npmctl-route53` is an extension package for `npmctl`, not a standalone CLI.

### Can npmctl-route53 set A and CNAME records?

**Answer:** Yes. Route 53 supports A and CNAME record sets through `ChangeResourceRecordSets`, and this package exposes helpers for `CREATE`, `UPSERT`, and `DELETE` batches.

### What credentials are required?

**Answer:** Route 53 access uses the standard AWS credential chain or `ROUTE53_PROFILE`. Diagnostics require hosted-zone and record-set list permissions; mutation helpers require `route53:ChangeResourceRecordSets`.

## Install

Install the base CLI and the Route 53 provider package together:

```bash
pipx install npmctl
pipx inject npmctl npmctl-route53
npmctl plugins list
```

With `uv`:

```bash
uv tool install npmctl
uv tool install npmctl-route53
npmctl plugins list
```

Inside a virtual environment:

```bash
python -m venv .venv
. .venv/bin/activate
python -m pip install npmctl npmctl-route53
npmctl plugins list
```

## Configure Route 53

Use the standard AWS credential chain:

```bash
export AWS_ACCESS_KEY_ID=...
export AWS_SECRET_ACCESS_KEY=...
export AWS_SESSION_TOKEN=...
```

Or use a named profile:

```bash
export AWS_PROFILE=production-dns
```

Optional package-specific override:

```bash
export ROUTE53_PROFILE=production-dns
```

## Verify Plugin Discovery

Check that `npmctl` can discover the provider:

```bash
npmctl plugins list
npmctl dns doctor --provider route53
```

## Minimal DNS Workflow

Once the provider is installed and configured, `npmctl` can validate or diagnose Route 53-backed DNS behavior through the base CLI:

```bash
npmctl dns providers
npmctl dns zones --provider route53
npmctl dns records --provider route53 --zone example.com
```

## Route 53 API Surface

The provider follows the AWS Route 53 API through `boto3`:

- `ListHostedZones`: discover hosted zones.
- `ListResourceRecordSets`: list records in one hosted zone.
- `ChangeResourceRecordSets` with `CREATE`: create record sets.
- `ChangeResourceRecordSets` with `UPSERT`: create or update record sets.
- `ChangeResourceRecordSets` with `DELETE`: delete record sets.

Required IAM actions for diagnostics:

- `route53:ListHostedZones`
- `route53:ListResourceRecordSets`

Required IAM action for mutation helpers:

- `route53:ChangeResourceRecordSets`

## Programmatic Record Operations

```python
from npmctl_route53 import Route53Client, Route53Config

client = Route53Client(Route53Config.from_env())
client.create_record("example.com", type="A", name="www", value="192.0.2.10", ttl=300)
client.upsert_record("example.com", type="CNAME", name="app", value="target.example.net", ttl=300)
client.delete_record("example.com", type="A", name="www", value="192.0.2.10", ttl=300)
```

## Safety Notes

- Route 53 changes are hosted-zone scoped. Confirm the selected hosted zone before mutation.
- Prefer IAM policies scoped to the intended hosted zone ARN.
- `UPSERT` can overwrite live DNS answers. Use create-only workflows when adoption is not explicit.
- Use npmctl owner metadata for desired DNS records so future apply support can remain owner-scoped.

## More Documentation

- Related PyPI package: https://pypi.org/project/npmctl/
- Repository: https://github.com/groupsum/npmctl
- DNS provider docs: https://github.com/groupsum/npmctl/tree/master/docs/dns-providers.md
