boto3 client NoRegionError: You must specify a region error only sometimes

后端 未结 7 1647
误落风尘
误落风尘 2021-01-30 07:30

I have a boto3 client :

boto3.client(\'kms\')

But it happens on new machines, They open and close dynamically.

    if endpoint         


        
7条回答
  •  心在旅途
    2021-01-30 08:31

    os.environ['AWS_DEFAULT_REGION'] = 'your_region_name'
    

    In my case sensitivity mattered.

提交回复
热议问题