【问题标题】:sceptre create fails with ERROR : "Session credentials were not found. Profile: None. Region: us-east-1."scepter create 失败并出现错误:“未找到会话凭据。配置文件:无。区域:us-east-1。”
【发布时间】:2021-02-25 00:01:31
【问题描述】:

我的配置文件中有两个 aws 配置文件,如下所示

[profile projet]
region = us-east-1
output = json

[profile accPersonal]
region = us-east-1
output = json

以及它们各自的凭证文件,如下所示

[accPersonal]
aws_access_key_id = key_id
aws_secret_access_key = access_key

[projet]
aws_access_key_id = key_id
aws_secret_access_key = access_key

当我尝试从命令行启动 scepter create 时

sceptre create dev/api-gateway/admin-key.yaml

我收到以下错误

ERROR : "Session credentials were not found. Profile: None. Region: us-east-1."

我之前多次使用此命令使用 scepter 在 aws 中创建资源,但从未遇到过此问题, 在 aws 文档中检查了配置配置文件,配置看起来正确,我似乎不明白为什么会出现该错误

【问题讨论】:

  • 你使用的是哪个 Scepter 版本?

标签: python python-3.x aws-cli sceptre


【解决方案1】:

我知道为什么会出现这个错误

在我的权杖的 config.yaml 文件中

project_code: projet_api
region: us-east-1
AvailabilityZoneA: us-west-2a
AvailabilityZoneB: us-west-2b

我在文档中搜索 [https://sceptre.cloudreach.com/1.4.2/environment_config.html][1] 我们需要在 .yaml 文件中添加配置文件,以便 septre 读取我们正在创建资源的配置文件

我在我的 config.yaml 中添加了配置文件,它运行良好

project_code: projet_api
region: us-east-1
AvailabilityZoneA: us-west-2a
AvailabilityZoneB: us-west-2b
profile: projet

【讨论】:

    猜你喜欢
    • 2021-11-01
    • 2018-03-26
    • 1970-01-01
    • 2021-12-05
    • 2018-05-19
    • 2020-01-30
    • 2019-05-26
    • 1970-01-01
    • 2023-03-22
    相关资源
    最近更新 更多