Metadata-Version: 2.4
Name: ssm-doctor
Version: 0.1.0
Summary: Diagnose why an EC2 instance is not reachable via AWS Systems Manager
Author: AshSgDe29071999
License: MIT
Project-URL: Homepage, https://github.com/AshSgDe29071999/ssm-doctor
Project-URL: Repository, https://github.com/AshSgDe29071999/ssm-doctor
Keywords: aws,ssm,ec2,cli,diagnostics
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT 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: Topic :: System :: Systems Administration
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: boto3>=1.28
Requires-Dist: typer>=0.9
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Dynamic: license-file

# ssm-doctor

Diagnose why an EC2 instance is not reachable via AWS Systems Manager (SSM).

## Install

```bash
pip install ssm-doctor
```

From source:

```bash
pip install -e .
```

## 60-second demo

```bash
# Text report (exit 0 if PingStatus is Online, else 1)
ssm-doctor i-0123456789abcdef0 --profile myprofile --region us-east-1

# Machine-readable output
ssm-doctor i-0123456789abcdef0 --json --region us-east-1
```

Example output:

```
ssm-doctor: i-0123456789abcdef0
  [PASS] ec2_state: Instance state is 'running'.
           state=running
           vpc_id=vpc-abc
           subnet_id=subnet-xyz
  [PASS] iam_instance_profile: IAM instance profile is attached.
  [PASS] ssm_ping: SSM PingStatus is 'Online'.
           ping_status=Online
           agent_version=3.2.0
Next steps: none — instance appears reachable via SSM.
Result: REACHABLE (Online)
```

## What it checks

Read-only boto3 calls (graceful errors if permissions are missing):

| Check | Source |
|-------|--------|
| Instance state, VPC, subnet | `ec2:DescribeInstances` |
| IAM instance profile present | `ec2:DescribeInstances` |
| SSM registration / PingStatus / AgentVersion / LastPingDateTime | `ssm:DescribeInstanceInformation` |

## Publishing to PyPI

```bash
pip install build twine
python -m build
twine upload dist/*
```

Or push a `v*` tag; GitHub Actions can publish via trusted publishing (see `.github/workflows/publish.yml`).

## License

MIT
