amazon-iamaws-amplifyaws-amplify-cli

Amplify: Failed to get profile: Profile configuration is missing for: undefined


I've some problems with the amplify cli: I don't know if it's related to a recent cli update...

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

OK! this time is working

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

How do I solve this issue?


Solution

  • Ok, I found a solution. Inside the amplify/.config/local-aws-info.json change

      "staging": {
        "configLevel": "amplifyAdmin"
      }
    

    with

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