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

后端 未结 7 1722
误落风尘
误落风尘 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:32

    you can also set environment variables in the script itself, rather than passing region_name parameter

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

    case sensitivity may matter.

提交回复
热议问题