Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
490 B
9
Indexable
Never
def get_ssh_key(base_ss, base_env):
    client = boto3.client('secretsmanager')
    response = client.get_secret_value(
            SecretId='/my-path/secret/key'
            )
    print(response) # This works and print the json (which includes SecretString

    ssh_key = json.loads(response['SecretString'])
    print(ssh_key) # This fails and prints raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)