Skip to main content

test GitHub Downloads

aws-sm

A Python wrapper around AWS Secrets Manager using Boto3.

Installation

Installing from PyPI is as easy as doing:

$ pip install aws-sm

Usage

from aws_sm import SecretsManager

AWS_ACCESS_KEY_ID = ***************
AWS_SECRET_ACCESS_KEY = ***************

secretsmanager = SecretsManager('us-east-1', AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
secrets = secretsmanager.get_secret_values('tutorials/MyFristTutorialSecret')

USER_NAME = secretsmanager.get_secret_value('USER_NAME', secrets)
PASSWORD = secretsmanager.get_secret_value('PASSWORD', secrets)

This is sample code using aws-sm to get USER_NAME and PASSWORD from tutorials/MyFristTutorialSecret.

USER_NAME and PASSWORD are Secret value.
tutorials/MyFristTutorialSecret is Secret name.

0030-09-25 22 32 21

This is AWS Console of Secrets Manager.

AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are unnecessary when attaching the appropriate IAM Role. The default policy is SecretsManagerReadWrite.

Set Up Loacally

Make sure you have Docker Compose.

$ docker-compose up

Run test

$ docker-compose exec app bash
root@d5d52d6765d9:/app# py.test -v

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aws-sm-1.3.0.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aws_sm-1.3.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file aws-sm-1.3.0.tar.gz.

File metadata

  • Download URL: aws-sm-1.3.0.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for aws-sm-1.3.0.tar.gz
Algorithm Hash digest
SHA256 4c847108cca77b97fbcf79a3102cf722f07f62004b545f23dec41d6339e0204c
MD5 8a5ecc83828496d826c19e2d64731229
BLAKE2b-256 6321cb8fc19a62c59eb5568b6a187711d8bc729d76589f0abed976bbf30c210d

See more details on using hashes here.

File details

Details for the file aws_sm-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: aws_sm-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for aws_sm-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f21e14ef56f6a96d0611b71f441c9c859297fb469df7b5cf1a4664f006db5e73
MD5 a702f22fd3746212fbfc21397dde89fd
BLAKE2b-256 255a264eebc5064a511530292ae0d261f5408c782d12daf13caf590d6c88d3e1

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 files

1.2.1

1 file

1.2.0

2 files

1.1.0

2 files

1.0.0

2 files

0.1.0

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page