How can I import the boto3 ssm ParameterNotFound exception?

前端 未结 2 1472
忘掉有多难
忘掉有多难 2021-02-12 15:48

I would like to import the exception that occurs when a boto3 ssm parameter is not found with get_parameter. I\

2条回答
  •  迷失自我
    2021-02-12 16:39

    mc = boto3.client('ssm')
    try:
      ...
    except mc.exceptions.ParameterNotFound:
      ...
    

提交回复
热议问题