doushi8599
doushi8599
2019-09-23 20:03

“ MissingRegion”:找不到区域配置,但是我在〜/ .aws.config中有它

  • it技术
  • 互联网问答
  • IT行业问题
  • 编程语言问答
  • 计算机技术

My code:

sess = session.Must(session.NewSessionWithOptions(session.Options{
    Profile: "gms-ai",
}))

My ~/.aws/config:

[default]
output = json
region = us-east-1

[profile gms-ai]
output = json
region = us-east-2

But for example this is working snipet from my deployment script:

AWS_PROFILE=gms-ai \
aws lambda update-function-code...

So looks like aws cli do read region but AWS SDK ignore it?

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答

为你推荐