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

后端 未结 7 1631
误落风尘
误落风尘 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.

    0 讨论(0)
提交回复
热议问题