【问题标题】:Ubuntu, Serverless Framework, AWS Credentials FailingUbuntu、无服务器框架、AWS 凭证失败
【发布时间】:2021-11-05 18:16:29
【问题描述】:

我似乎无法让我的 AWS 提供商在 Docker 容器中使用我的 AWS 凭证

到目前为止,我已经运行了所有这些

serverless config credentials --provider provider --key key --secret secret

&

aws configure

☝️ 浏览提示并插入我的信息

&

export AWS_ACCESS_KEY_ID=blah
export AWS_SECRET_ACCESS_KEY=blah
export AWS_DEFAULT_REGION=east-whatever

但是,还是被 AWS 阻止

ServerlessError: AWS provider credentials not found. Learn how to set up AWS provider credentials in our docs here:.

我还多次生成并重新生成了我的 IAM 凭据,当我运行 aws configure list 时它也会返回

      Name                    Value             Type    Location
      ----                    -----             ----    --------
   profile                <not set>             None    None
access_key     ****************67GT shared-credentials-file    
secret_key     ****************6glt shared-credentials-file    
    region                us-east-2      config-file    ~/.aws/config

我不知道还能做什么,我在 Ubuntu 20.04 上使用 Bash

【问题讨论】:

  • 因为我可以有配置文件尚未设置你为什么不尝试手动创建 creatigg config snd 凭据文件

标签: amazon-web-services aws-lambda serverless-framework ubuntu-20.04


【解决方案1】:

我将使用 aws-cli 设置所有内容(因此 aws cli 安装是 imp)

  • 安装 aws cli
  • run aws configure -> 输入您的凭据,此信息将存储在 ~/.aws/credentials 文件中名为 default 的配置文件中。 docs。
  • 通过检查~/.aws/config ~/.aws.credentials 文件来验证您的配置
  • 对于无服务器框架部署,请使用此serverless deploy。
  • 如果需要使用多个配置文件,请使用sls deploy --aws-profile profile-name

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-08-04
    • 2018-07-17
    • 1970-01-01
    • 2018-09-13
    • 2021-05-12
    • 2020-11-08
    • 2017-11-20
    • 2018-12-21
    相关资源
    最近更新 更多