Restoring a saved AWS Amplify Profile?

25 Views Asked by At

I have not used AWS Amplify for a few years and last time I used it I save the profile in a CSV file and it has the following fields in it.

enter image description here

I'm setting up Amplify again on a new machine and I'm wonder if I should just add this configuratino to a config file as described here.

In other words save the contents of the CSV file into ~/.aws/config.

Or is there a more "Updated" way of doing it?

1

There are 1 best solutions below

0
Ole On BEST ANSWER

OK - Since it's a new machine I first had to reinstall the amplify CLI.

npm install -g @aws-amplify/cli

Then add the amplify credentials again.

In order to do this I first create a new Angular project ran amplify init from the root project directory folder.

It outputs the following.


Project information
| Name: test
| Environment: dev
| Default editor: Visual Studio Code
| App type: javascript
| Javascript framework: angular
| Source Directory Path: src
| Distribution Directory Path: dist
| Build Command: npm run-script build
| Start Command: ng serve

? Initialize the project with the above configuration? Yes

Then for authentication method it asks this:

? Select the authentication method you want to use: (Use arrow keys)
❯ AWS profile 

I selected AWS profile.

It then asks whether we want to setup a new user. I said no.

? Setup new user (Y/n) n

It then asks for credentials.

? Setup new user No
? accessKeyId:  ********************
? secretAccessKey:  ****************************************
? region: ***

The amplify setup is now restored using the saved credentials.