Skip to content

AWS Secrets Utility Files (aws_secrets_utils)

Daniel Wu edited this page Sep 4, 2022 · 8 revisions

About

This page contains documentation for the files in the /backend/aws_helpers/aws_secrets_utils directory of the Github repo. This page is regularly updated when new changes are added to these files.

AWS Secrets Handler (aws_secrets.py)

get_secret_response: fetches secret from AWS Secrets Manager and returns the response. Contains code to handle exceptions listed here (right now it just rethrows the exceptions): https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_GetSecretValue.html

get_secret_string: Gets the SecretString from the response from get_secret_response.

has_secret_string: Checks if the SecretString exists in the response from get_secret_response.

get_secret_binary_decoded: Gets the SecretBinary from the response from get_secret_response.

get_secret_env: Get the env value from from the response from get_secret_response. Mainly used for .aws\build-env.py.

create_secret: Creates a secret given a name, secret (JSON object), and description. If no description provided, the description defaults to an empty string.

Clone this wiki locally