def clientWrapper(service, region=None):
if region:
cl = boto3.client(service, region_name=region)
else:
try:
cl = boto3.client(service)
except NoRegionError:
print("You need to specify a region in some way. See "
"http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-"
"getting-started.html for ways that you can set it "
"globally, or pass 'region' as an argument to this task.")
raise SystemExit(1)
return cl
# Default namespace
评论列表
文章目录