Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 433
Jim Tebstone Avatar asked Apr 29 '21 20:04

Jim Tebstone


People also ask

How do I configure amplify manually?

To manually deploy an app from Amazon S3 or a public URLSign in to the AWS Management Console and open the Amplify console . At the top of the page, choose Get started. In the Deliver section, choose Get started. On the Host your web app page, choose Deploy without Git provider.

Can I use amplify without CLI?

Q: Can I use the Amplify libraries even if I do not use the CLI? Yes. The libraries can be used to access backend resources that were created without the Amplify CLI.


1 Answers

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"
  }
}
like image 68
Jim Tebstone Avatar answered Oct 23 '22 01:10

Jim Tebstone