Catching boto3 ClientError subclass

后端 未结 3 1128
没有蜡笔的小新
没有蜡笔的小新 2020-12-31 01:18

With code like the snippet below, we can catch AWS exceptions:

from aws_utils import make_session

session = make_session()
cf = session.resource(\"iam\")
ro         


        
3条回答
  •  有刺的猬
    2020-12-31 01:27

      try:
          something 
     except client.exceptions.NoSuchEntityException:
          something
    

    This worked for me

提交回复
热议问题