awswrangler.secretsmanager.get_secret

awswrangler.secretsmanager.get_secret(name: str, boto3_session: Optional[boto3.session.Session] = None) Union[str, bytes]

Get secret value.

Parameters
  • name (str:) – Specifies the secret containing the version that you want to retrieve. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.

  • boto3_session (boto3.Session(), optional) – Boto3 Session. The default boto3 session will be used if boto3_session receive None.

Returns

Secret value.

Return type

Union[str, bytes]

Examples

>>> import awswrangler as wr
>>> value = wr.secretsmanager.get_secret("my-secret")