放大:无法获取配置文件:缺少配置文件配置:未定义

Posted

技术标签:

【中文标题】放大:无法获取配置文件:缺少配置文件配置:未定义【英文标题】:Amplify: Failed to get profile: Profile configuration is missing for: undefined 【发布时间】:2021-07-23 06:19:39 【问题描述】:

amplify cli 有一些问题: 不知道是不是跟最近的cli更新有关...

amplify init
? Do you want to use an existing environment? Yes
? Choose the environment you would like to use: staging
Using default provider  awscloudformation
? Select the authentication method you want to use: AWS profile
Failed to get profile: Profile configuration is missing for: undefined

amplify configure
Specify the AWS Region xxx
Specify the username of the new IAM user: xxx
Complete the user creation using the AWS console

Enter the access key of the newly created user:
 accessKeyId:  ********************
 secretAccessKey:  ****************************************

This would update/create the AWS Profile in your local machine
? Profile Name: default
Successfully set up the new user.

amplify push
? Select the authentication method you want to use: AWS profile
Failed to get profile: Profile configuration is missing for: undefined

amplify push
? Select the authentication method you want to use: Amplify Admin UI

好的!这段时间有效

UPDATE_IN_PROGRESS ...
UPDATE_FAILED      DeploymentBucket                         
AWS::S3::Bucket            Thu  API: s3:SetBucketEncryption Access Denied
(as admin)

我该如何解决这个问题?

【问题讨论】:

【参考方案1】:

好的,我找到了解决方案。 在 amplify/.config/local-aws-info.json 里面 改变

  "staging": 
    "configLevel": "amplifyAdmin"
  


  "staging": 
    "configLevel": "project",
    "useProfile": true,
    "profileName": "default"
  

【讨论】:

以上是关于放大:无法获取配置文件:缺少配置文件配置:未定义的主要内容,如果未能解决你的问题,请参考以下文章

当在命令行中未指定配置文件时,Spring Boot 集成测试无法获取默认配置文件并引发错误

以编程方式创建时未保存 Sitecore 用户配置文件设置

SpringBoot中配置文件详解(ymlproperties全局配置和自定义配置),获取配置方式

获取 BitcoinLib 错误 = “在配置文件中未找到 CoinParameters 中定义的一个或多个必需参数!”

缺少DataSource配置文件

C 语言文件操作 ( 配置文件读写 | 写出或更新配置文件 | 逐行遍历文件文本数据 | 获取文件中的文本行 | 查询文本行数据 | 追加文件数据 | 使用占位符方式拼接字符串 )