{"id":27127609,"url":"https://github.com/ceb10n/pydantic-settings-aws","last_synced_at":"2026-04-04T02:01:37.055Z","repository":{"id":247958512,"uuid":"827299116","full_name":"ceb10n/pydantic-settings-aws","owner":"ceb10n","description":"Pydantic Settings for AWS","archived":false,"fork":false,"pushed_at":"2026-04-03T20:52:06.000Z","size":1089,"stargazers_count":24,"open_issues_count":5,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-04-03T20:56:34.588Z","etag":null,"topics":["aws","aws-secrets-manager","configuration","pydantic","pydantic-v2","python","settings"],"latest_commit_sha":null,"homepage":"https://ceb10n.github.io/pydantic-settings-aws/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ceb10n.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-07-11T11:32:10.000Z","updated_at":"2026-04-03T20:52:23.000Z","dependencies_parsed_at":"2024-07-25T19:33:54.008Z","dependency_job_id":"4bfc6d2d-dd83-4192-a3cb-ec83ec1206dd","html_url":"https://github.com/ceb10n/pydantic-settings-aws","commit_stats":null,"previous_names":["ceb10n/pydantic-settings-aws"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/ceb10n/pydantic-settings-aws","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceb10n%2Fpydantic-settings-aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceb10n%2Fpydantic-settings-aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceb10n%2Fpydantic-settings-aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceb10n%2Fpydantic-settings-aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ceb10n","download_url":"https://codeload.github.com/ceb10n/pydantic-settings-aws/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceb10n%2Fpydantic-settings-aws/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31384847,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T01:22:39.193Z","status":"online","status_checked_at":"2026-04-04T02:00:07.569Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-secrets-manager","configuration","pydantic","pydantic-v2","python","settings"],"created_at":"2025-04-07T17:57:19.649Z","updated_at":"2026-04-04T02:01:37.032Z","avatar_url":"https://github.com/ceb10n.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pydantic Settings AWS\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/assets/logo.png\" alt=\"pydantic-settings-aws logo\" width=\"400\"/\u003e\n\u003c/p\u003e\n\n\u003cbr/\u003e\n\n[![CI](https://github.com/ceb10n/pydantic-settings-aws/actions/workflows/ci.yml/badge.svg)](https://github.com/ceb10n/pydantic-settings-aws/actions)\n[![codecov](https://codecov.io/github/ceb10n/pydantic-settings-aws/graph/badge.svg?token=K77HYDZR3P)](https://codecov.io/github/ceb10n/pydantic-settings-aws)\n[![PyPI - Implementation](https://img.shields.io/pypi/implementation/pydantic-settings-aws)](https://pypi.org/project/pydantic-settings-aws)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pydantic-settings-aws)](https://pypi.org/project/pydantic-settings-aws)\n[![Pydantic v2 only](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/pydantic/pydantic/main/docs/badge/v2.json)](https://docs.pydantic.dev/latest/contributing/#badges)\n[![PyPI - License](https://img.shields.io/pypi/l/pydantic-settings-aws)](https://pypi.org/project/pydantic-settings-aws)\n[![Downloads](https://static.pepy.tech/badge/pydantic-settings-aws/month)](https://pepy.tech/project/pydantic-settings-aws)\n\n`pydantic-settings-aws` extends Pydantic Settings to load configuration from AWS Secrets Manager and SSM Parameter Store directly into type-safe Pydantic models, eliminating the need for manual boto3 parsing or environment variable mapping.\n\n📖 **[Full documentation](https://ceb10n.github.io/pydantic-settings-aws)**\n\n## ✨ Why pydantic-settings-aws?\n\n- Define your configuration once using Pydantic models\n- Load secrets and parameters from AWS without manual boto3 code\n- Built-in validation, parsing, and type safety\n- Works with any AWS authentication method — profiles, SSO, IAM roles, access keys\n- Thread-safe and compatible with free-threaded Python\n\n## ⚡ Quick Start\n\nAdd your secret to AWS Secrets Manager as a JSON object:\n\n```json\n{\n    \"username\": \"admin\",\n    \"password\": \"s3cr3t\"\n}\n```\n\nThen create your settings class:\n\n```python\nfrom pydantic_settings_aws import AWSSettingsConfigDict, SecretsManagerBaseSettings\n\n\nclass MySettings(SecretsManagerBaseSettings):\n    model_config = AWSSettingsConfigDict(\n        secrets_name=\"my/secret\"\n    )\n\n    username: str\n    password: str\n\n\nsettings = MySettings()\nprint(settings.username)  # \"admin\"\n```\n\nThat’s it, `boto3` will resolve your AWS credentials automatically using its standard configuration chain.\n\n## ✅ Features\n\n- Load settings from **AWS Secrets Manager**, **SSM Parameter Store**, or both simultaneously\n- Type-safe configuration with full IDE autocomplete via `AWSSettingsConfigDict`\n- Multi-region and multi-account support via per-field boto3 clients\n- Thread-safe client cache, compatible with free-threaded Python (3.13t, 3.14t)\n- Falls back to environment variables, dotenv, and secret files automatically\n\n## 🔧 Requirements\n\n| Python | Pydantic | boto3 |\n| :----- | :------- | :---- |\n| 3.10+  | v2       | v1    |\n\n## 💽 Installation\n\n```bash\npip install pydantic-settings-aws\n```\n\nOr with [uv](https://docs.astral.sh/uv/):\n\n```bash\nuv add pydantic-settings-aws\n```\n\n## 📦 Usage\n\nYou can provide your own boto3 client or let pydantic-settings-aws create one for you. To learn how boto3 resolves credentials, see [Configuring credentials](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html#configuring-credentials).\n\n### 🔐 Secrets Manager — with boto3 client\n\n```python\nimport boto3\nfrom pydantic_settings_aws import AWSSettingsConfigDict, SecretsManagerBaseSettings\n\n\nclient = boto3.client(\"secretsmanager\")\n\n\nclass MySettings(SecretsManagerBaseSettings):\n    model_config = AWSSettingsConfigDict(\n        secrets_name=\"my/secret\",\n        secrets_client=client\n    )\n\n    username: str\n    password: str\n    name: str | None = None\n\n\nsettings = MySettings()\n```\n\nYour secret content must be valid JSON with keys matching the field names:\n\n```json\n{\n    \"username\": \"admin\",\n    \"password\": \"admin\",\n    \"name\": \"John\"\n}\n```\n\n### 📦 SSM Parameter Store\n\n```python\nfrom typing import Annotated\nfrom pydantic_settings_aws import AWSSettingsConfigDict, ParameterStoreBaseSettings\n\n\nclass MySettings(ParameterStoreBaseSettings):\n    model_config = AWSSettingsConfigDict(aws_region=\"us-east-1\")\n\n    # pydantic-settings-aws looks for a parameter named \"db_host\"\n    db_host: str\n\n    # explicit parameter name via Annotated\n    db_port: Annotated[str, \"/myapp/prod/db/port\"]\n```\n\n### 🙋🏾‍♂️ Secrets Manager — with AWS profile\n\n```python\nfrom pydantic_settings_aws import AWSSettingsConfigDict, SecretsManagerBaseSettings\n\n\nclass MySettings(SecretsManagerBaseSettings):\n    model_config = AWSSettingsConfigDict(\n        secrets_name=\"my/secret\",\n        aws_region=\"us-east-1\",\n        aws_profile=\"dev\"\n    )\n\n    username: str\n    password: str\n```\n\n### 🔑 Secrets Manager — with access key\n\n```python\nfrom pydantic_settings_aws import AWSSettingsConfigDict, SecretsManagerBaseSettings\n\n\nclass MySettings(SecretsManagerBaseSettings):\n    model_config = AWSSettingsConfigDict(\n        secrets_name=\"my/secret\",\n        aws_region=\"us-east-1\",\n        aws_access_key_id=\"aws_access_key_id\",\n        aws_secret_access_key=\"aws_secret_access_key\",\n        aws_session_token=\"aws_session_token\"\n    )\n\n    username: str\n    password: str\n```\n\n### 🔒 Secrets Manager — with AWS IAM Identity Center (SSO)\n\n```shell\naws sso login --profile my-profile\n```\n\n```python\nfrom pydantic_settings_aws import AWSSettingsConfigDict, SecretsManagerBaseSettings\n\n\nclass MySettings(SecretsManagerBaseSettings):\n    model_config = AWSSettingsConfigDict(\n        secrets_name=\"my/secret\"\n    )\n\n    username: str\n    password: str\n```\n\n## 👩🏼‍⚖️ License\n\nThis project is licensed under the terms of the [MIT license.](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceb10n%2Fpydantic-settings-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fceb10n%2Fpydantic-settings-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceb10n%2Fpydantic-settings-aws/lists"}