Skip to main content

aws-ssm-env

Fetch environment configurations from AWS SSM Parameter Store as JSON. Supports both AWS environments and local development via IAM role assumption.

Installation

pip install aws-ssm-env

Prerequisites

  • The SSM parameter must be of type String (not StringList or SecureString unless you're decrypting).
  • The value of the parameter must be a valid JSON object string. For example:
{
  "DB_HOST": "localhost",
  "DB_USER": "admin",
  "DB_PASS": "secret"
}

Usage

1. In AWS environment (e.g., EC2, Lambda)

If your code is running in an AWS environment with appropriate IAM permissions, you only need to provide the region and parameter name:

from aws_ssm_env.ssm import get_env_parameters_from_ssm

env_config = get_env_parameters_from_ssm(
    account_id="",  # Optional
    region="us-west-2",
    role_name="",  # Optional
    parameter_name="/my/app/env"
)

print(env_config["DB_HOST"])

2. From local environment (with role assumption)

Use this method when working locally and you need to access parameters from another AWS account:

from aws_ssm_env.ssm import get_env_parameters_from_ssm

env_config = get_env_parameters_from_ssm(
    account_id="123456789012",
    region="us-west-2",
    role_name="MyRole",
    parameter_name="/my/app/env"
)

print(env_config["DB_HOST"])

License

MIT

Metadata

Release files for aws-ssm-env 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aws-ssm-env 0.1.4
File Size Uploaded Provenance
aws_ssm_env-0.1.4.tar.gz 2.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aws-ssm-env 0.1.4
File Interpreter ABI Platform
aws_ssm_env-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 5.9 kB

Release files / aws_ssm_env-0.1.4.tar.gz

Download URL aws_ssm_env-0.1.4.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
bcfa7d285a4613c2cd1a29b53344d4f8395a5b106a3ae2c138856c97c7083c60
BLAKE2b-256 checksum
How to use checksums
b7c7fdbcfaeb417726f37d14b39f8a4a91a6318c633905dfa7bfa6c5f0c1cd11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.10.12 Linux/6.8.0-60-generic

Release files / aws_ssm_env-0.1.4-py3-none-any.whl

Download URL aws_ssm_env-0.1.4-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9fd78372c92b3969884b723254d4a1cbd8c4f18f2be2546cb1adcd299d68c153
BLAKE2b-256 checksum
How to use checksums
bf176d147eb2a9d184c886fceb7c1e63aca2d961f90ff1816808c85a046127db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.10.12 Linux/6.8.0-60-generic

Security for aws-ssm-env 0.1.4

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