6

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?

Jim Tebstone
  • 552
  • 6
  • 13

2 Answers2

17

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"
  }
}
Jim Tebstone
  • 552
  • 6
  • 13
0

Provided solution solved my issue when trying to remove and environment via amplify env remove test-env

I always got the following error:
Failed to get profile credentials
Amplify logs:
amplify-provider-awscloudformation.system-config-manager.getProfileConfig([null])

Changing configLevel from amplifyAdmin to project solved the error.
Thanks for sharing.

0xAPPA
  • 1
  • 1